Update Virtual Number
Update settings on a virtual number.
PATCH
https://api.identitycall.ai/api/v1/public/virtual_numbers/:idUpdates the display name, active state, recording flag, or routing strategy.
Requires write permission
Scopes
| API key scope | Behavior |
|---|---|
| Account-wide | Can update any virtual number on the account. |
| Project-scoped | Returns 404 if the number is not in the key’s project. |
Path Parameters
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | integer | Yes | - | Virtual number ID |
Request Body
Body Parameters (application/json)
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | - | Display name for the number |
active | boolean | No | - | Whether the number receives calls |
recording | boolean | No | - | Whether inbound calls are recorded |
routing_strategy | string | No | - | Operator routing mode: priority, round_robin, or simultaneous |
Only fields present in the request body are updated; omitted fields keep their current values.
Request
cURL
curl -X PATCH "https://api.identitycall.ai/api/v1/public/virtual_numbers/7" \
-H "Authorization: Bearer $IDENTITYCALL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "US Sales Line - Primary",
"active": true,
"recording": true,
"routing_strategy": "round_robin"
}'Response
Returns the same detail payload as Get Virtual Number.
Response200 OK
{
"data": {
"id": 7,
"phone_number": "+15551234567",
"name": "US Sales Line - Primary",
"country_code": "US",
"active": true,
"recording": true,
"routing_strategy": "round_robin",
"ai_receptionist_enabled": false,
"stats": { "total_calls": 142, "answered_calls": 118, "missed_calls": 24, "average_duration_seconds": 184 },
"operators": [
{ "id": 12, "name": "Alice Carter", "phone_number": "+15555550112", "initials": "AC", "priority": 0 }
],
"available_operators": [],
"recent_calls": []
}
}Errors
| Status | Error | Description |
|---|---|---|
| 404 | ”Resource not found” | Virtual number doesn’t exist or isn’t accessible |
| 422 | Validation errors | Invalid field values (e.g. unknown routing_strategy) |
See Also
- Get Virtual Number — read current settings
- Add Operator
- Remove Operator