Get a phone number
phone-numbers:readAuthenticationReturns complete safe configuration, assignment, capacity, and provisioning state.
bearerAuthAuthorizationBearer <token>Use a Voice API key or connected-app OAuth access token. Authentication.
id*stringuuidThe phone number.
application/json- response
Complete safe phone-number configuration and provider state. Raw provider errors are never present in the public representation.
inbound_routing_rules?array<|>Ordered SIP-header routes. First matching route wins; agent_id on the phone number is the required default. A route may use one legacy condition or a conditions group matched with all (AND) or any (OR). At most 8 conditions are allowed per route and 64 across the number. Requires livekit_sip transport and inbound or both direction. Omit on PATCH to preserve; [] removes all routes; null is invalid. Changes provision header mappings automatically and return provisioning until reconciled. Values ignore case unless case_sensitive is true. Missing headers match only not_exists, never negative comparisons. An archived matching agent falls back to the default agent. Only new calls use changes; existing calls continue with their selected agent.
items <= 32id*stringuuidtrunk_id*stringuuidtrunk_name*stringe164*E164PhoneNumberAn E.164 number with a non-zero country code and 7 to 15 digits, or a bare internal number/extension of 1 to 20 [0-9*#] characters (e.g. 103, 2770124).
^(\+[1-9][0-9]{7,14}|[0-9*#]{1,20})$label*string|nullagent_id*|uuidagent_slug*string|nullflow_id*|The flow this number answers with, or null when it answers with a single agent. Exactly one of the agent_id/agent_slug pair and the flow_id/flow_slug pair is ever non-null. The agent that actually answers a flow-targeted number is the flow's start agent; it is deliberately not mirrored into agent_slug, so this read model keeps reporting what the operator configured.
uuidflow_slug*string|nullgroup_id*|The group this number answers with, or null. When set, agent_id and agent_slug read null: the agent that answers is picked per call from the group's members, and the session records it (group_member_id on the call). At most one of agent_id, flow_id and group_id is non-null.
uuidgroup_name*string|nulldirection*PhoneNumberDirection"inbound""outbound""both"transport*PhoneNumberTransport"livekit_sip""twilio_media_streams"livekit_inbound_trunk_id*string|nulllivekit_dispatch_rule_id*string|nullstatus*PhoneNumberStatus"provisioning""active""error""archived"last_error*|Sanitized recovery-oriented message.
last_error_code*|Stable machine-readable provider/provisioning error code.
archived_at*|date-timecreated_at*stringdate-timeupdated_at*stringdate-timeoutbound_capacity_mode*PhoneNumberOutboundCapacityMode"inherit""fixed""unlimited"max_concurrent_outbound*integer|nulloutbound_weight*integer1 <= valueoutbound_draining*booleancurl -X GET 'https://api.kejue.co/v1/phone-numbers/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "inbound_routing_rules": [ { "header": "string", "operator": "equals", "value": "string", "case_sensitive": false, "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978" } ], "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "trunk_id": "d1c0247b-6570-4df5-9107-7986a22149d1", "trunk_name": "string", "e164": "string", "label": "string", "agent_id": "2b1e3b65-2c04-4fa2-a2d7-467901e98978", "agent_slug": "string", "flow_id": "0746f03b-16cc-49fb-9833-df3713d407d2", "flow_slug": "string", "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f", "group_name": "string", "direction": "inbound", "transport": "livekit_sip", "livekit_inbound_trunk_id": "string", "livekit_dispatch_rule_id": "string", "status": "provisioning", "last_error": "string", "last_error_code": "string", "archived_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "outbound_capacity_mode": "inherit", "max_concurrent_outbound": 0, "outbound_weight": 1, "outbound_draining": true}