Create a Subaccount
POST
https://api.vobiz.ai/api/v1/accounts/{account_id}/sub-accounts/Creates a new Subaccount object. Provision isolated subaccounts under your main account for multi-tenant SaaS applications, reseller models, or departmental resource segregation.
Authentication: Requires Bearer Token (JWT). Pass your access token in the Authorization header.
Parameters
Request Parameters
| Name | Type | Description |
|---|---|---|
nameRequired | string | A human-readable name for the subaccount. |
description | string | Description of the sub-account purpose or usage. |
rate_limitRequired | integer | API rate limit for this sub-account (requests per time period). |
permissionsRequired | object | Permissions object defining what the sub-account can access. Contains boolean fields like "calls" and "cdr". |
passwordRequired | string | Password for the sub-account authentication. |
Request
cURL
curl -X POST 'https://api.vobiz.ai/api/v1/accounts/{account_id}/sub-accounts/' \
--header 'X-Auth-ID: {auth_id}' \
--header 'X-Auth-Token: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Support Team",
"description": "Support-facing voice workload",
"rate_limit": 500,
"permissions": {
"calls": true,
"cdr": true
},
"password": "S0pport123!"
}'Request Body
JSON
{
"name": "Support Team",
"description": "Support-facing voice workload",
"rate_limit": 500,
"permissions": {
"calls": true,
"cdr": true
},
"password": "S0pport123!"
}Response Example
Success Response (201 Created)
{
"message": "Sub-account created successfully",
"sub_account": {
"name": "Support Team",
"description": "Support-facing voice workload",
"permissions": {
"calls": true,
"cdr": true
},
"rate_limit": 500,
"id": "SA_67401KW8",
"parent_account_id": "{Auth_ID}",
"auth_id": "inG9oUky5uFjdUECaQNzeyVYD6ommaJd",
"is_active": true,
"created_at": "2025-10-22T03:57:35.997500Z",
"updated_at": "2025-10-22T03:57:35.997500Z",
"last_used": null
},
"auth_credentials": {
"auth_id": "inG9oUky5uFjdUECaQNzeyVYD6ommaJd",
"auth_token": "jGZarOpqnCyCWFKA1FWsCnqfcMBMwYxxDKMGh7GzeGM609F0PASeqvg5Nip8Qrf8"
},
"tokens": {
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJTQV82NzRPMUtXOCIsImFjY291bnRfdHlwZSI6InN1Yl9hY2NvdW50IiwiYXV0aF9pZCI6ImluRzlvVWt5NXVGamRVRUNhUU56ZXlWWUQ2b21tYUpkIiwicmVmcmVzaF90b2tlbl92ZXJzaW9uIjowLCJyb2xlIjoidXNlciIsInBhcmVudF9hY2NvdW50X2lkIjoiTUFfU1lRUkxOMUsiLCJyYXRlX2xpbWl0Ijo1MDAsImV4cCI6MTc2MTEwNzI1NywidHlwZSI6ImFjY2VzcyJ9.ds-ERmtPmbqHARHu3o7olkGCAQfK7QgYXvot2s6nNKo",
"refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJTQV82NzRPMUtXOCIsImFjY291bnRfdHlwZSI6InN1Yl9hY2NvdW50IiwiYXV0aF9pZCI6ImluRzlvVWt5NXVGamRVRUNhUU56ZXlWWUQ2b21tYUpkIiwicmVmcmVzaF90b2tlbl92ZXJzaW9uIjowLCJyb2xlIjoidXNlciIsInBhcmVudF9hY2NvdW50X2lkIjoiTUFfU1lRUkxOMUsiLCJyYXRlX2xpbWl0Ijo1MDAsImV4cCI6MTc2MTcxMDI1NywidHlwZSI6InJlZnJlc2gifQ.y25HxQE_jyG6oa_9CbZQtF2EWCUSXtSzz2scRN_lv4Q",
"token_type": "bearer",
"expires_in": 1800
}
}Success! The response contains three important sections:
- sub_account: The created sub-account object with all details
- auth_credentials: The
auth_idandauth_tokenfor API authentication - save these securely! - tokens: JWT access and refresh tokens for immediate API access
Security Note: The auth_token is only returned once during creation. Store it securely - you won't be able to retrieve it again. If lost, you'll need to regenerate credentials.