---
title: "Unlink an agent from a phone number"
method: POST
path: "/v2/phone-numbers/unlink-agent"
tags: ["Phone Numbers"]
---

# Unlink an agent from a phone number

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

Removes the agent association from a phone number for the given direction.

## Request body

- UnlinkAgentRequest
  - `phone_number_id` string, required
  - `direction` 'inbound' | 'outbound' | 'both', required

## Response `200`

Updated phone number.

- PhoneNumberResponse
  - `id` string, required
  - `phone_number` string, required
  - `name` string
  - `inbound_agent_uid` string
  - `outbound_agent_uid` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `401` — Missing or invalid API key.
- `404` — The requested resource does not exist.
- `429` — Rate limit exceeded.
- `500` — Unexpected 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/58dc5cff0ca7/schema)
