v50

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-06-16122182589.7 KB
Sub-accounts

Create a sub-account

Creates a sub-account under the authenticated master account. Returns the sub-account with its generated api_key.

post/v1/sub-organizations

Request body

namestring required

Sub-account name.

Example request

{
  "name": "Company name",
  "default_destinations": {
    "sms_endpoint": "https://examples.com/sms",
    "dlr_endpoint": "https://examples.com/dlr"
  }
}

Response

Returns the created sub-account.

idinteger required

Sub-account ID.

created_atstring date-time required

Date and time the sub-account was created in ISO 8601 format.

namestring required

Sub-account name.

api_keystring required

Sub-account API key.

master_organizationinteger required

Master account ID.

status'enabled' | 'disabled' required

Status of the subaccount. One of enabled (the subaccount is active and can be used) or disabled (the subaccount is suspended).

Example response

{
  "id": 123,
  "created_at": "2023-06-15T10:30:00Z",
  "name": "My sub-account",
  "api_key": "abc123def456",
  "master_organization": 456,
  "status": "enabled",
  "default_destinations": {
    "sms_endpoint": "https://examples.com/sms",
    "dlr_endpoint": "https://examples.com/dlr"
  }
}