---
title: "Create a subaccount"
method: POST
path: "/subaccounts"
---

# Create a subaccount

`POST /subaccounts`

## Headers

- `Authorization` string, required

## Request body

- object
  - `subaccount_name` string, required — The name for the new subaccount. This should be a unique identifier that distinguishes it from other subaccounts within the main account.
  - `user_email` string — This is the email address of the user you wish to invite to the subaccount. When this optional parameter is filled in, a "sign in" link will be generated and sent back in the response. The user can use this link to sign in and set up their account.
  - `twilio_account_sid` string — This is the Twilio SID of the subaccount.
  - `twilio_auth_token` string — This is the Twilio Token of the subaccount.
  - `concurrency` integer — The maximum number of calls the subaccount can handle at the same time.
  - `max_agents` integer, nullable — The maximum number of agents the subaccount is allowed to create. Null if no limit is set.
  - `max_minutes` integer, nullable — The maximum number of minutes allocated to this subaccount. Null if no limit is set.
  - `max_workflow_runs` integer, nullable — The maximum number of workflow runs allocated to this subaccount. Null if no limit is set.
  - `grant_permissions` SubaccountsPostRequestBodyContentApplicationJsonSchemaGrantPermissionsItems[] — Permissions to grant to the subaccount. Duplicate values are not allowed, and any value also present in `revoke_permissions` is rejected by the API.
  - `revoke_permissions` SubaccountsPostRequestBodyContentApplicationJsonSchemaRevokePermissionsItems[] — Permissions to revoke from the subaccount. Duplicate values are not allowed, and any value also present in `grant_permissions` is rejected by the API.

## Response `200`

200

- CreateSubaccountResponse200
  - `status` string — Whether the request was successful.
  - `response` SubaccountsPostResponsesContentApplicationJsonSchemaResponse
    - `subaccount_id` string — Subaccount ID.
    - `api_key` string — Subaccount API key.
    - `user_email` string — Subaccount email.
    - `sign_in_link` string — The invite link that can be used to log in to the account.
    - `twilio_connected_successfully` boolean — Whether a successful Twilio connection was established.

## Other responses

- `400` — 400

---

[API](https://skmtc.dev/synthflow/apis/platform-api.md) · [All operations](https://skmtc.dev/synthflow/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/synthflow/platform-api/revisions/6976456ad422/schema)
