Account

Sub-account API keys

Create an API key for a customer's sub-account, so your platform can act for that customer.

Create an API key for each customer from your main account. Your platform then uses that key for the customer's numbers, calls and records. Everything the key does stays inside that sub-account, and charges come from your wallet.

A sub-account can't create keys for itself. Only its main account can.

Create a key

POSThttps://api.tryvox.io/v1/tenants/{tenant_id}/sub-accounts/{subaccount_id}/api-keys

Authenticate with your main-account credentials. {tenant_id} is your Auth ID or tenant UUID, and {subaccount_id} is the id returned when you created the sub-account.

FieldTypeRequiredDescription
namestringYesA label for the key, 1–255 characters
curl -X POST "https://api.tryvox.io/v1/tenants/$TRYVOX_AUTH_ID/sub-accounts/$SUBACCOUNT_ID/api-keys" \
  -u "$TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "acme-production"}'

Response — 201 Created:

{
  "data": {
    "id": "6f1c2b9e-3a4d-4c1e-9b7a-2d5e8f0a1b2c",
    "name": "acme-production",
    "auth_id": "TJ59ce44df",
    "key": "<auth-token>",
    "permissions": [],
    "created_at": "2026-11-12T10:30:00Z"
  }
}

auth_id and key are the customer's Auth ID and Auth Token. The token is returned only in this response, so store it encrypted straight away. If you lose it, create a new key.

You can create a key before the customer's KYC is approved. Until it is, the key can read but can't buy numbers or create applications.

Use the key

Use the key exactly like a main-account key, with its own auth_id in the URL:

curl "https://api.tryvox.io/v1/account/$CUSTOMER_AUTH_ID/numbers" \
  -u "$CUSTOMER_AUTH_ID:$CUSTOMER_AUTH_TOKEN"
The key canThe key can't
Search, buy, configure and release the customer's numbersSee your wallet balance, billing or transactions
Create applications and make calls from the customer's numbersSee or create API keys
Read the customer's call records and recordingsSee or manage sub-accounts
Reach your numbers or another customer's data

A request outside the customer's own account returns 403 FORBIDDEN or 403 ACCOUNT_MANAGER_REQUIRED.

Turn a key off

A suspended or closed sub-account's keys stop working at once, with 401 INVALID_CREDENTIALS. Reactivating the sub-account makes them work again.

Errors

StatusCodeHandling
400VALIDATION_FAILEDSend a name of 1–255 characters
401INVALID_CREDENTIALSCheck your main-account Auth ID and Auth Token
403FORBIDDENThe sub-account is suspended, or isn't yours
403ACCOUNT_MANAGER_REQUIREDUse your main-account key, not a customer key
404NOT_FOUNDCheck the sub-account id

On this page