Skip to main content
POST
/
sub-accounts
/
create
cURL
curl --request POST \
  --url https://api.bolna.ai/sub-accounts/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "alpha-007",
  "allow_concurrent_calls": 10,
  "multi_tenant": false,
  "db_host": "prod-alpha-007-db-east-1.my-database.com",
  "db_name": "alpha-007_db",
  "db_port": 5432,
  "db_user": "alpha-007_user",
  "db_password": "alpha-007_password"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "alpha-007",
  "user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "api_key": "sa-b33f4fbf011d4661a273a46b11d185f8",
  "multi_tenant": false,
  "db_host": null,
  "db_name": null,
  "db_port": null,
  "db_user": null,
  "db_password": null,
  "allow_concurrent_calls": 10,
  "created_at": "2025-01-23T01:14:37Z",
  "updated_at": "2025-01-23T01:14:37Z"
}

Documentation Index

Fetch the complete documentation index at: https://www.bolna.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

This is an enterprise feature.You can read more about our enterprise offering here Bolna enterprise.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Payload for creating a new sub-account

name
string
required

Name of the sub-account

Example:

"alpha-007"

allow_concurrent_calls
integer
required

The number of concurrent calls that can be made with the sub-account

Example:

10

multi_tenant
boolean
default:false

The sub-account is stored in a separate database

db_host
string

Database host for multi_tenant sub-account

Example:

"prod-alpha-007-db-east-1.my-database.com"

db_name
string

Database name for multi_tenant sub-account

Example:

"alpha-007_db"

db_port
string

Database port for multi_tenant sub-account

Example:

5432

db_user
string

Database root user for multi_tenant sub-account

Example:

"alpha-007_user"

db_password
string

Database root password for multi_tenant sub-account

Example:

"alpha-007_password"

Response

Sub-account create response

id
string<uuid>

Unque identifier for the created sub-account

name
string

Name of the sub-account

Example:

"alpha-007"

user_id
string<uuid>

ID of the user who created the sub-account

organization_id
string<uuid>

Organization ID the sub-account belongs to

api_key
string

Sub-account API Key used to interact with sub-account resources like agents, executions, batches, etc.

Pattern: ^sa-[a-f0-9]{32}$
Example:

"sa-b33f4fbf011d4661a273a46b11d185f8"

multi_tenant
boolean

Whether the sub-account is being stored in a separate database

Example:

false

db_host
string

Database host if the sub-account is multi_tenant:true

Example:

null

db_name
string

Database name if the sub-account is multi_tenant:true

Example:

null

db_port
string

Database port if the sub-account is multi_tenant:true

Example:

null

db_user
string

Database root user if the sub-account is multi_tenant:true

Example:

null

db_password
string

Database root password if the sub-account is multi_tenant:true

Example:

null

allow_concurrent_calls
integer

The number of concurrent calls that can be made with the sub-account

Example:

10

created_at
string<date-time>

Timestamp of sub-account creation

Example:

"2025-01-23T01:14:37Z"

updated_at
string<date-time>

Timestamp of sub-account updation

Example:

"2025-01-23T01:14:37Z"