> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orova.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Assign Phone Number

> Assign a phone number to an agent

## Request

```bash theme={null}
curl -X PUT "https://app.orova.ai/api/phone-numbers/PHONE_ID/assign" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agentId": "AGENT_ID",
    "assignmentType": "inbound"
  }'
```

## Path parameters

| Parameter | Type   | Description     |
| --------- | ------ | --------------- |
| `id`      | string | Phone number ID |

## Body parameters

| Field            | Type   | Required | Description             |
| ---------------- | ------ | -------- | ----------------------- |
| `agentId`        | string | Yes      | Agent to assign to      |
| `assignmentType` | string | Yes      | `inbound` or `outbound` |

## Response

Returns the updated phone number object.

## Assignment types

* **inbound** — Calls to this number are answered by the agent
* **outbound** — This number is used as caller ID for outbound calls from the agent
