Skip to content

Create a sub-account

POST
/v1/Accounts/{auth_id}/Tenants
curl --request POST \
--url https://api.siprtc.io/v1/Accounts/example/Tenants \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "address": "1 Example Street, Springfield", "company_id": "3f2b6a1e-0c4d-4e8a-9b7f-2d1c0e5a6b7c", "email": "ada@example.com", "first": "Ada", "is_clidisabled": false, "is_disabled": false, "last": "Lovelace", "password": "choose-a-strong-password", "phone1": "+15555550100", "role": [ { "id": "0b9c2c1e-7d3f-4c55-9a8e-5f2d4b6a7c81", "name": "member" } ], "time_zone": "Europe/London", "type": "member", "username": "ada.lovelace" }'

Creates an account directly under the authenticated account and returns it with its new Auth ID and API secret. This reply is the only time the sub-account’s secret is returned, so store it.

Who may create what. Platform-level types (tenant, vendor, superuser, ent, enterprise, reseller, dev, val) can only be created by vendor, superuser, ent and reseller accounts (403 otherwise). User types such as member, agent, supervisor and contact can be created by any account. agent and supervisor are refused with 403 once the caller has used all of the agent seats in its plan.

What happens. The account record exists when this call returns, with status active (or inactive when is_disabled is true). Its portal sign-in (username, password, role) is created asynchronously; for a tenant a contact-centre workspace, default shift template and dispositions are set up too, and for an agent or supervisor a contact-centre worker and SIP endpoint. When that finishes status becomes created, or partial created with the missing steps in meta_data. Default account settings are created. No email is sent and no balance is added.

The sub-account is always created under the authenticated account: when a parent calls this path with a sub-account’s Auth ID as {auth_id}, the new account is still the parent’s. Errors: 400 for a body that is not JSON, a missing required field (the message names the field, e.g. Account.Username) or an email already used by another account; 422 for an unknown time_zone, a phone number that is not 7 to 15 digits, an invalid email address, or a failed save.

auth_id
required
string

Your Auth ID (the authenticated account).

The sub-account to create.

Media type application/json
object
address

Postal address (free text).

string

Example

1 Example Street, Springfield
company_id

Company the sub-account belongs to. For member, agent, supervisor and contact the caller’s company is used instead; when empty a new id is generated.

string

Example

3f2b6a1e-0c4d-4e8a-9b7f-2d1c0e5a6b7c
email
required

Email address. Must not be used by any other account on the platform.

string

Example

ada@example.com
first
required

First name of the sub-account’s owner or user.

string

Example

Ada
is_clidisabled

True disables caller ID (CLI) for the sub-account. Default false.

boolean

Example

false
is_disabled

True creates the sub-account disabled (status “inactive”). Default false.

boolean

Example

false
last
required

Last name.

string

Example

Lovelace
password
required

Password for the sub-account’s portal login. It is passed to the identity provider and not stored by this service.

string

Example

choose-a-strong-password
phone1
required

Phone number: 7 to 15 digits, optionally with a leading +.

string

Example

+15555550100
role
required

Realm roles to grant the sub-account’s sign-in. Each needs the role’s id and name. Send an empty array for none.

Array<object>
object
id

The realm role’s id (UUID).

string

Example

0b9c2c1e-7d3f-4c55-9a8e-5f2d4b6a7c81
name

The realm role’s name.

string

Example

member
time_zone
required

IANA time zone of the sub-account.

string

Example

Europe/London
type
required

Account type. Platform-level types (tenant, vendor, superuser, ent, enterprise, reseller, dev, val) may only be created by vendor, superuser, ent or reseller accounts. User types such as member, agent, supervisor and contact may be created by any account. agent and supervisor count against the caller’s agent seats.

string

Example

member
username
required

Sign-in user name for the sub-account’s portal login.

string

Example

ada.lovelace

The sub-account, with its Auth ID and API secret.

Media type application/json
object
message

Always “Tenant created successfully”.

string
status

Always “success”.

string
tenant

The new sub-account, including its API secret.

object
address

Postal address.

string
auth_id

The sub-account’s Auth ID: its Basic-auth user name and the {auth_id} of its own API paths. 20 characters.

string
auth_secret

The sub-account’s API secret (40 characters). Filled only in the reply to createTenant; empty in every other reply.

string
balance_money

Prepaid balance in USD, the same balance the Balance API reports.

number
company_id

Company id (createTenant only).

string
email

Email address.

string
first

First name.

string
is_clidisabled

True when caller ID (CLI) is disabled for the sub-account.

boolean
is_disabled

True when the sub-account is disabled and cannot sign in or call the API.

boolean
last

Last name.

string
meta_data

JSON-encoded string with company_id, workspace_sid, time_zone and set-up progress. Returned by createTenant and getTenant; lists leave it out.

string
parent_auth_id

Auth ID of the account the sub-account belongs to. Not included in lists.

string
phone1

Phone number.

string
registration_date

When the sub-account was created (RFC 3339).

string
role

Realm roles of the sub-account’s sign-in (getTenant and listTenants).

Array<object>
object
id

The realm role’s id (UUID).

string
name

The realm role’s name.

string
serial_number

Sequential number (TN-01, TN-02, …) given to accounts of type tenant under their parent.

string
sipEndpoint

SIP endpoint of an agent or supervisor. Filled only in lists filtered by type agent or supervisor, where password is the agent’s SIP registration password.

object
password

SIP registration password of the agent’s endpoint.

string
status

Lifecycle status. createTenant, updateTenant and updateTenantStatus set active or inactive (from is_disabled). The set-up that runs after createTenant then sets created when the sign-in (and, for tenant, agent and supervisor types, the contact-centre resources) exist, or partial created with the missing steps in meta_data.reason.

string
time_zone

IANA time zone. Returned by createTenant and listTenants; getTenant carries it inside meta_data.

string
type

Account type, e.g. tenant, member, agent, supervisor.

string
username

Sign-in user name. createTenant echoes the requested one; getTenant and listTenants read it from the identity provider (empty when it could not be read).

string
worker

Contact-centre worker of an agent or supervisor. Filled only in lists filtered by type agent or supervisor; otherwise it holds only zero values.

object
workspace_sid

Contact-centre workspace of the sub-account, when it has one (createTenant and listTenants).

string

Example

{
"message": "Tenant created successfully",
"status": "success",
"tenant": {
"address": "1 Example Street, Springfield",
"auth_id": "AC000000000000000002",
"auth_secret": "EXAMPLESECRET000000000000000000000000000",
"balance_money": 0,
"company_id": "3f2b6a1e-0c4d-4e8a-9b7f-2d1c0e5a6b7c",
"email": "ada@example.com",
"first": "Ada",
"is_clidisabled": false,
"is_disabled": false,
"last": "Lovelace",
"meta_data": "{\"company_id\":\"3f2b6a1e-0c4d-4e8a-9b7f-2d1c0e5a6b7c\",\"time_zone\":\"Europe/London\",\"workspace_sid\":\"\"}",
"parent_auth_id": "AC000000000000000001",
"phone1": "+15555550100",
"registration_date": "2026-11-26T09:30:00Z",
"role": [
{
"id": "0b9c2c1e-7d3f-4c55-9a8e-5f2d4b6a7c81",
"name": "member"
}
],
"serial_number": "TN-01",
"sipEndpoint": {
"password": "example-sip-password"
},
"status": "active",
"time_zone": "Europe/London",
"type": "member",
"username": "ada.lovelace",
"workspace_sid": "WS0000000000000000000000000000000"
}
}

The body is not JSON, a required field is missing, or the email is already used.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

Authentication failed: wrong or missing credentials, a disabled account, or an {auth_id} that is neither you nor your direct sub-account.

Media type application/json
string

Example generated

example

The caller may not create this account type, or has no agent seats left.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

Unknown time zone, invalid phone number or email, or the account could not be saved.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}

The caller’s account type could not be checked.

Media type application/json
object
error

The underlying error text. Only some 400 responses of the tenant list carry it.

string
message

What went wrong, in English.

string
status

Always “failed”.

string

Example

{
"error": "sql: connection is already closed",
"message": "Account Details not found",
"status": "failed"
}