---
title: "Set Ports Server"
method: POST
path: "/servers/{id}/protection/ports"
---

# Set Ports Server

`POST /servers/{id}/protection/ports`

## Request

- Base URL: `https://app.bitlaunch.io/api`
- URL: `https://app.bitlaunch.io/api/servers/{id}/protection/ports`
- Auth: API key in header `Authorization`

Set the ports to use for DDoS protection.

## Path parameters

- `id` string, required

## Request body

- object
  - `ports` unknown[], required: Array of port objects to be enabled. See [Port Object](ref:port-object) for more information.
    - unknown

## Response `200`

200

- object
  - `id` string
  - `name` string
  - `host` integer
  - `ipv4` string
  - `region` string
  - `size` string
  - `sizeDescription` string
  - `image` string
  - `imageDescription` string
  - `created` string
  - `rate` integer
  - `bandwidthUsed` integer
  - `bandwidthAllowance` integer
  - `status` string
  - `errorText` string
  - `backupsEnabled` boolean
  - `version` string
  - `abuse` boolean
  - `diskGB` integer
  - `protection` object
    - `enabled` boolean
    - `proxy` object
      - `ip` string
      - `region` string
      - `ports` object[]
        - `portNumber` integer
        - `protocol` string
      - `target` string

## Other responses

- `400`: 400

## Changes

- **2026-11-03** `89cafcc1ee63`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bitlaunch/apis/bitlaunch-api/changes/servers/:id/protection/ports/post.md)

---

[API](https://skmtc.dev/bitlaunch/apis/bitlaunch-api.md) - [All operations](https://skmtc.dev/bitlaunch/apis/bitlaunch-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bitlaunch/apis/bitlaunch-api/revisions/89cafcc1ee63?raw)
