Buy Phone Number
buy_numberRequest a real phone-number purchase. This is APPROVAL-GATED: the carrier bills immediately on execution, so the tool only prepares a request for authenticated owner review. Caller-supplied human_confirmed, dashboard_session, or system_policy fields never authorize execution. Returns the stored request and a review URL for the owner; while approval is pending, no number has been purchased. Existing entitlement and carrier reservation checks still apply. In the acquisition flow this follows set_owner_phone, which saves a reachable owner number or records a decline.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"phone_number": "<phone_number>"
},
"name": "buy_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| actor | No | Who is asking: { type: agent|human|system|integration, id, display_name }. | |
| reason | No | Optional reason recorded in the durable audit. | |
| dry_run | No | Validate tenant, scope, and policy without buying anything. | |
| agent_id | No | Agent ID to route this number to directly once purchased (optional; requires the number to also be voice-runtime-imported, which is not guaranteed at purchase time — a follow-up attach_number call routes it reliably). | |
| authority | No | Attribution only. human_confirmed and other caller-supplied modes cannot authorize a purchase. Authenticated owner review of the exact stored request is required. | |
| source_ref | No | External source reference, such as a ticket or automation run ID. | |
| business_id | No | Business ID (optional only when the token can access exactly one business). | |
| phone_number | Yes | The exact E.164 phone number to purchase, as returned by search_available_numbers. | |
| idempotency_key | No | Stable key for the purchase request; repeating it returns the original outcome. Defaults to a key derived from the phone number — a new key retries a previously failed purchase. | |
| queue_for_approval | No | Create a durable owner-review request (default true). Setting false returns needs_approval, but an authority-envelope retry still cannot execute. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| error | No | Present when success is false | |
| result | No | On executed: { number, voice_agent_registered, agent_attached, compliance: { high_risk_category, disclosure_note } }. | |
| status | No | ||
| message | No | ||
| success | Yes | Whether the tool completed successfully | |
| summary | No | ||
| approval | No | ||
| request_id | No | ||
| risk_level | No | ||
| business_id | No |