---
title: "Create sub-account"
method: POST
path: "/v1/sub-accounts"
tags: ["Sub-Accounts"]
---

# Create sub-account

`POST /v1/sub-accounts`

Create a new sub-account (project) with its own API key. All charges are billed to the parent team's balance. Use creditLimit to set a spending cap. The sub-account's API key is returned only in the creation response. Requires a parent project API key; sub-account API keys receive HTTP 403.

## Request body

- SubAccountCreateRequest
  - `name` string, required — Name of the sub-account.
  - `externalId` string — External reference ID for your own tracking.
  - `creditLimit` integer — Spending cap in cents. When reached, messages from this sub-account will be blocked. Omit or set to 0 for no limit.
  - `metadata` object

## Response `201`

Sub-account created.

- SubAccountResponse
  - `subAccount` SubAccount, required
    - `id` string, required
    - `name` string, required
    - `externalId` string, nullable — External reference ID set by the parent account.
    - `status` 'active' | 'inactive', required
    - `totalSpent` integer, required — Total amount spent by this sub-account in cents.
    - `creditLimit` integer, nullable — Spending cap in cents. When reached, messages from this sub-account will be blocked.
    - `metadata` object, nullable
    - `apiKey` string — API key for the sub-account. Only returned on creation.
    - `createdAt` string, date-time, required

## Other responses

- `400` — Invalid request.
- `401` — Unauthorized.
- `403` — Forbidden. Sub-account API keys cannot manage sub-accounts.

---

[API](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api.md) · [All operations](https://skmtc.net/zavudev/apis/zavu-unified-messaging-layer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/zavudev/zavu-unified-messaging-layer-api/versions/07b87b6ae707/schema)
