API referencePhone

Update a phone number's inbox, agent, inbound agent, or metadata

Configures an owned number: bind it to an inbox with inboxId — every call it answers then lands in that mailbox alongside your other channels — assign it to an agent with agentId, replace its metadata (a JSON object of at most 8 KiB; null clears it, anything else is a 400), and set up the agent that answers when someone calls it.

Endpoint
PATCH https://api.dairo.app/v1/phone/numbers/{id}

Configures an owned number: bind it to an inbox with inboxId — every call it answers then lands in that mailbox alongside your other channels — assign it to an agent with agentId, replace its metadata (a JSON object of at most 8 KiB; null clears it, anything else is a 400), and set up the agent that answers when someone calls it. inboundInstructions (≤8,000 characters) says who the agent is and what the line is for — null restores the default assistant that takes messages and notes; inboundGreeting (≤500 characters) is its first line — null uses a short default greeting, by first name for a known contact; inboundVoice must be a Dairo Live voice id (any other value is a 400); and inboundLanguage is the ISO code it speaks. After an inbound call, the summary, the caller's structured notes, and the transcript arrive in the bound inbox as a voice message whose channelMetadata carries callId, callerNumber, dialedNumber, durationSeconds, summary, and notes, firing the normal message.received event. Provide at least one field or the request is a 400. Each inboxId/agentId must name a resource this account owns; an id you do not own is rejected with a 400 rather than silently bound. Pass null for inboxId or agentId to unbind. See inbound calls. Requires the phone:write scope.

Scope: phone:write. Send the API key as a bearer token; Scopes lists what each one reaches.

Request

cURL
curl -X PATCH "https://api.dairo.app/v1/phone/numbers/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
  -H "Authorization: Bearer $DAIRO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Path parameters

NameTypeRequiredDescription
idstring (uuid)yesThe phone number's ID.

Body

Required, application/json: PhoneNumberUpdateRequest.

At least one property is required. An explicit null unbinds (inboxId, agentId) or resets an inbound* field to its default.

FieldTypeRequiredDescription
inboxIdstring (uuid) or nullno
agentIdstring (uuid) or nullno
inboundInstructionsstring or nullnoWho the inbound agent is and what the line is for. null = the default assistant that takes messages and notes. (max length 8000)
inboundGreetingstring or nullnoOpening line for inbound calls. null = a short default greeting (by first name for a known contact). (max length 500)
inboundVoice"marin", "cedar", "alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "quartz", "ripple", "vesper", "willow", "stone", "gleam", "meridian", "bossa", "tempo", "beacon", "delta", "cinder", nullnoDairo Live voice id for the inbound agent.
inboundLanguagestring or nullnoISO language code the inbound agent speaks.
metadataobjectno

Response

200 Success. Body: application/json, PhoneNumber.

FieldTypeRequiredDescription
object"phone_number"yes
idstring (uuid)yes
phoneNumberstringyesE.164.
countryCodestringyes
numberType"local", "toll_free", "national", "mobile"yes
capabilitiesarray of stringno
status"pending", "active", "releasing", "released", "failed"yespending means the provider reserved the number but regulatory documents are still outstanding (common for German local numbers). It is not an error.
inboxIdstring (uuid) or nullnoWhen set, every inbound call to this number (summary, the caller's notes and the transcript) lands in that inbox as a channel: "voice" message.
agentIdstring (uuid) or nullno
inboundInstructionsstring or nullnoWho the inbound agent is and what the line is for. null = the default assistant that takes messages and notes. (max length 8000)
inboundGreetingstring or nullnoOpening line for inbound calls. null = a short default greeting (by first name for a known contact). (max length 500)
inboundVoice"marin", "cedar", "alloy", "ash", "ballad", "coral", "echo", "sage", "shimmer", "verse", "quartz", "ripple", "vesper", "willow", "stone", "gleam", "meridian", "bossa", "tempo", "beacon", "delta", "cinder", nullnoDairo Live voice id for the inbound agent.
inboundLanguagestring or nullnoISO language code the inbound agent speaks.
monthlyCostUsdnumber or nullno
setupCostUsdnumber or nullno
requirementsobjectnoOutstanding regulatory requirements, when status is pending.
metadataobjectno
purchasedAtstring (date-time) or nullno
releasedAtstring (date-time) or nullno
createdAtstring (date-time)yes
200
{
  "object": "phone_number",
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "phoneNumber": "string",
  "countryCode": "string",
  "numberType": "local",
  "capabilities": [
    "string"
  ],
  "status": "pending",
  "inboxId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "agentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "inboundInstructions": null,
  "inboundGreeting": null,
  "inboundVoice": "marin",
  "inboundLanguage": null,
  "monthlyCostUsd": null,
  "setupCostUsd": null,
  "requirements": {},
  "metadata": {},
  "purchasedAt": "2026-10-19T09:30:00Z",
  "releasedAt": "2026-10-19T09:30:00Z",
  "createdAt": "2026-10-19T09:30:00Z"
}

Errors

Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.

StatusMeaning
400The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch).
401The API key is missing or invalid.
403The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted).
404No such resource in this account (resource_not_found).
429Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached).
500An unexpected error; retry with backoff, then contact support (internal_error).

On this page