Purchase a phone number
purchase_phone_numberCOSTS MONEY: Purchase a phone number
Buys one of the numbers returned by the search and attaches it to the account. Buying numbers needs an active Voice subscription (Voice, Bundle or a voice capable plan) and is not possible during the free trial; otherwise the request is rejected with 403 and one of the codes voice_subscription_required, voice_subscription_inactive or trial_not_allowed, before anything is charged. This charges money: the setup price plus the first month, plus VAT, is deducted from the account wallet, a balance transaction is written and an invoice is issued. An account managed by a provider (a partner of EchoCall) pays the provider's price as the search shows it and gets the invoice from that provider; when the provider cannot take the order right now the request is rejected with 400 provider_unavailable, nothing is bought and the provider is informed. Pass the listing from the search result back unchanged.
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": {
"body": "<body>"
},
"name": "purchase_phone_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | The listing to buy, exactly as returned by the search. `availableDidId` and `skuId` identify the listing at the marketplace, `features` lists the capabilities of the number, and `requirementId` names the regulatory requirement set to satisfy, if there is one. The four price fields are deprecated: they are optional, they are ignored, and the server prices the purchase itself. They remain in the schema only so integrations that echo a whole search result back keep working. | |
| confirm | No | Leave out on the first call. EchoCall then answers with a confirmation value. Ask the user for a clear yes, then repeat the call with the same arguments and this value. |