Phone numbers
Import Phone Number
Brings a number you own on your own carrier account. It stays on your account and you keep paying your carrier for it; we never bill it. For carriers that sign their calls with your account's secret, save the account's keys first (Save Carrier Account) — we also use them to check the number is really on that account. setup says what is left to do: where the number must send its calls, and whether we pointed it there ourselves. Bringing the same number again is not an error; it corrects provider. The number arrives answered by nobody — Update Phone Number points it at an agent. Needs a paid plan and a full key.
POST/phone-numbers/import
Headers
- Katexs-Workspacestring
- Developers only: the customer workspace this request acts in — its
org_…id fromPOST /customers. Leave it out to act in your own workspace. Refused with404(Workspace not found.) when the id is unknown, is not one of your customers, or is not anorg_…id;410when that customer was deleted (restore it withPOST /customers/{id}/restoreuntil it is erased);403when the key belongs to one customer workspace (it cannot act as another);400when your workspace is not a developer workspace./customers/*andGET /customers/usageare your own workspace's and refuse the header with400: call them without it.
Request body
- numberstringrequired
- The number in E.164 (
+14155550100). Include the country code: a number without one is refused. - providerstringrequired
- A carrier a brought number can be on — whose network your own account is with. One of:
plivo,vobiz,twilio,telnyx.
Example request
bash
curl -X POST "https://app.katexs.com/api/v1/phone-numbers/import" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"number": "+14155550100",
"provider": "twilio"
}'Responses
| Status | Description |
|---|---|
201 | The number is recorded. |
400 | number cannot be read, or provider is not one this accepts. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key may not do this, or the Free plan cannot answer phone numbers. |
404 | The Katexs-Workspace header names a workspace that is unknown, is not one of your customers, or is not an org_… id. Always this one sentence, so a key cannot learn which ids exist in other accounts. |
409 | The number is already held here by another workspace, or the carrier account's keys are not saved yet. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
422 | Your carrier says the number is not on the account whose keys you saved. |
429 | Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit. |
503 | We could not check whether the number is already held. Try again. |
Response fields
- numberstringrequired
- The number. A rented number reads as digits with its country code (
918041234567); a brought one as you brought it, usually E.164. - labelstring | nullrequired
- Its name, or null. Always null for a brought number in List Phone Numbers.
- sourcestringrequired
rentedhere and charged monthly, orbroughtfrom your own carrier account and never billed by us. One of:rented,brought.- agentstring | nullrequired
- The agent that answers it (
ag_…), or null for nobody. - sincestring (date-time) | nullrequired
- When a rented number was rented; null for a brought one.
- providerstring | nullrequired
- Your own carrier account a brought number is on (
plivo,vobiz,twilioortelnyx); null for a number rented here. - callingAgentstring | nullrequired
- The agent lent this number to call out on (
ag_…), or null. May differ fromagent. - forwardTostring | nullrequired
- Where every call to this number is forwarded (E.164) instead of the agent answering - and when no agent answers it - or null when the agent answers as usual.
- setupobjectrequired
- Where the number must send its calls.
201 response
{
"number": "+14155550100",
"label": null,
"source": "brought",
"agent": null,
"since": null,
"provider": "twilio",
"callingAgent": null,
"setup": {
"answerUrl": "https://app.katexs.com/api/voice/twilio/answer",
"statusUrl": "https://app.katexs.com/api/voice/twilio/status",
"pointed": true,
"replaced": null
}
}Last updated November 2026 · Found a problem? Email support@katexs.com
