---
title: "Unlink Bot from Phone Number"
method: POST
path: "/v1/phone-numbers/unlink-agent"
tags: ["Phone Numbers"]
---

# Unlink Bot from Phone Number

`POST /v1/phone-numbers/unlink-agent`

Unlink a bot (agent) from a phone number.

## Request body

- object
  - `phone_number_id` string, required — The unique identifier of the phone number
  - `direction` 'inbound' | 'outbound' | 'both', required — Direction to unlink (inbound, outbound, or both)

## Response `200`

Bot unlinked from phone number successfully

- LinkBotToPhoneNumberResponse
  - `phone_number_id` string, required — Unique identifier of the phone number
  - `phone_number` string, required — Phone number in E.164 format
  - `inbound_agent_id` string — Bot ID for inbound calls
  - `outbound_agent_id` string — Bot ID for outbound calls
  - `message` string, required — Success message

## Other responses

- `400` — Bad request - validation error
- `401` — Unauthorized - missing or invalid API key
- `404` — Phone number not found
- `500` — Internal server error

---

[API](https://skmtc.net/openmicai/apis/openmic-v1-external-api.md) · [All operations](https://skmtc.net/openmicai/apis/openmic-v1-external-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmicai/openmic-v1-external-api/revisions/71c32e6ffd95/schema)
