---
title: "bind additional listening ports"
method: PUT
path: "/mockserver/bind"
tags: ["control"]
---

# bind additional listening ports

`PUT /mockserver/bind`

## Request

- Base URL: `http://localhost:1080`
- URL: `http://localhost:1080/mockserver/bind`
- Auth: none declared

only supported on Netty version

## Request body

- Ports: list of ports
  - `ports` number[]
  - `dnsPort` number: UDP port of the DNS mock server; only in the answer to /mockserver/status, and only while DNS mocking is on

## Response `200`

listening on additional requested ports, note: the response ony contains ports added for the request, to list all ports use /status

- Ports: list of ports
  - `ports` number[]
  - `dnsPort` number: UDP port of the DNS mock server; only in the answer to /mockserver/status, and only while DNS mocking is on

## Other responses

- `400`: incorrect request format
- `406`: unable to bind to ports (i.e. already bound or JVM process doesn't have permission)

---

[API](https://skmtc.dev/mock-server/apis/mockserver-api.md) · [All operations](https://skmtc.dev/mock-server/apis/mockserver-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mock-server/apis/mockserver-api/revisions/9239b693996e?raw)
