Skip to content

Create a Subaccount

POSThttps://api.vobiz.ai/api/v1/accounts/{auth_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 Required:

  • X-Auth-ID: Your account ID (e.g., {Auth_ID})
  • X-Auth-Token: Your account Auth Token
  • Content-Type: application/json

Parameters

Request Parameters

ParameterTypeDescription
namerequired
stringA human-readable name for the subaccount.
emailrequired
stringEmail address associated with the subaccount.
phoneoptional
stringPhone number associated with the subaccount.
descriptionoptional
stringDescription of the sub-account purpose or usage.
rate_limitrequired
integerAPI rate limit for this sub-account (requests per time period).
permissionsrequired
objectPermissions object defining what the sub-account can access. Contains boolean fields like "calls" and "cdr".
passwordrequired
stringPassword for the sub-account authentication.
enabledoptional
booleanWhether the subaccount is active and enabled for use.

Request

cURL
curl -X POST 'https://api.vobiz.ai/api/v1/accounts/{auth_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",
  "email": "support@example.com",
  "phone": "+1234567890",
  "description": "Support-facing voice workload",
  "rate_limit": 500,
  "permissions": {
    "calls": true,
    "cdr": true
  },
  "password": "S0pport123!",
  "enabled": true
}'

Request Body

JSON
{
  "name": "Support Team",
  "email": "support@example.com",
  "phone": "+1234567890",
  "description": "Support-facing voice workload",
  "rate_limit": 500,
  "permissions": {
    "calls": true,
    "cdr": true
  },
  "password": "S0pport123!",
  "enabled": true
}

Response Example

Success Response (201 Created)
{
  "message": "Sub-account created successfully",
  "sub_account": {
    "name": "Support Team",
    "email": "support@example.com",
    "phone": "+1234567890",
    "description": "Support-facing voice workload",
    "permissions": {
      "calls": true,
      "cdr": true
    },
    "rate_limit": 500,
    "id": "{sub_auth_id}",
    "parent_auth_id": "{auth_id}",
    "parent_auth_id": "{parent_auth_id}",
    "auth_id": "{auth_id}",
    "auth_token": "{auth_token}",
    "api_id": "{api_id}",
    "email_verified": true,
    "enabled": true,
    "is_active": true,
    "created": "2025-10-22T03:57:35.997500Z",
    "modified": "2025-10-22T03:57:35.997500Z",
    "created_at": "2025-10-22T03:57:35.997500Z",
    "updated_at": "2025-10-22T03:57:35.997500Z",
    "account": "/api/v1/accounts/{auth_id}/",
    "resource_uri": "/api/v1/accounts/{auth_id}/sub-accounts/{sub_auth_id}/",
    "last_used": null
  },
  "auth_credentials": {
    "auth_id": "{auth_id}",
    "auth_token": "{auth_token}"
  },
  "tokens": {
    "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
    "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_id and auth_token for 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.