Phone numbers
Save Carrier Account
Saves the keys of your own account with a carrier, which lets its brought numbers be confirmed, answered and called out from. The keys are checked with the carrier before anything is stored, stored sealed, and never returned. One account per carrier: switching to a different account while numbers are still brought on the first is refused. telnyx takes its API key as token alone. Needs a full key — a carrier credential can spend money on your account.
PUT/phone-numbers/carrier-accounts/{provider}
Path parameters
- providerstringrequired
- Which carrier the account is with. One of:
plivo,vobiz,twilio,telnyx.
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
- accountIdstring
- Your account's id (its Auth ID or Account SID). Required for every carrier but
telnyx, which ignores it. - tokenstringrequired
- The account's secret: its auth token, or for
telnyxits API key.
Example request
bash
curl -X PUT "https://app.katexs.com/api/v1/phone-numbers/carrier-accounts/{provider}" \
-H "Authorization: Bearer $KATEXS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accountId": "AC3f9e2b7d41c08a6e5b1d2f7c9e04a41c",
"token": "9b7c2e4f1a8d3065c7e2b9f14d6a8e3c"
}'Responses
| Status | Description |
|---|---|
200 | The keys were checked and saved. |
400 | token is missing, or accountId is missing where the carrier needs one. |
401 | The key is missing, wrong or revoked. The answer is always the same, whichever it is. |
403 | The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden. |
404 | Not a carrier this accepts. |
409 | Numbers are still brought on a different account with this carrier. |
410 | The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date. |
422 | The carrier turned the keys down. |
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. |
500 | The keys were good but could not be saved. Nothing was stored; safe to retry. |
503 | The carrier could not be reached to check the keys. Nothing was stored; try again in a moment. |
Response fields
- providerstringrequired
- A carrier a brought number can be on — whose network your own account is with. One of:
plivo,vobiz,twilio,telnyx. - accountEndingstring | nullrequired
- The last four characters of the account id, so you can tell which account is connected; empty for an id too short to hint at.
200 response
{
"provider": "twilio",
"accountEnding": "a41c"
}Last updated November 2026 · Found a problem? Email support@katexs.com
