Provision phone number
cooper_provision_phone_numberProvision a US local number for an inbox. Requires auth. Free includes no numbers (HTTP 402). Starter caps at 3. Pro includes 3 and caps at 25. Each billable number is $3/month with 100 segments. With COOPER_SMS_BILLING=stripe the number is added to the Stripe subscription, prorated, before Cooper buys it. Otherwise billing.status is stub and this call does not charge. The number can receive SMS. Send returns 409 outbound_not_registered. Inputs: inbox_id (required), area_code or phone_number, idempotency_key (optional). Returns the phone number and billing.
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": {
"inbox_id": "<inbox_id>"
},
"name": "cooper_provision_phone_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes | Inbox id (inb_…) that owns the phone number. Get it from cooper_list_inboxes. | |
| area_code | No | Three-digit US area code with numbers in stock, for example 650. Check GET /api/v1/phone-numbers/available?area_code= first: an empty list means no stock in that area code, and the search then suggests nearby or any US numbers. A sold-out area_code is refused with 409 area_code_sold_out and nearby_area_codes, and nothing is charged. Use this or phone_number. | |
| phone_number | No | A specific available number in E.164 from GET /api/v1/phone-numbers/available, for example +16505550100. Use this or area_code. | |
| idempotency_key | No | Optional key. Retrying with the same key returns the first result and does not buy a second number. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Stable id of the returned object. Pass it to the matching get, update, or delete tool. | |
| e164 | No | The phone number in E.164. | |
| object | No | Object type name, such as list, message, or thread. | |
| status | No | active or released. | |
| billing | No | Billing result for this number, such as {status}. | |
| inbox_id | No | Inbox id (inb_…) this object belongs to. Null when it applies to every inbox. | |
| outbound | No | Outbound SMS registration state. Sends fail with outbound_not_registered until it is ready. | |
| provider | No | Carrier provider name. | |
| account_id | No | Cooper account id (acct_…) that owns this object. | |
| created_at | No | ISO-8601 time the object was created. | |
| number_type | No | Number type, such as local. | |
| released_at | No | ISO-8601 time the number was released, or null. | |
| capabilities | No | What the number supports, such as sms and voice. |