Skip to main content
POST
/
v1
/
sub-accounts
curl --request POST \
  --url https://api.zavu.dev/v1/sub-accounts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Client ABC"
}
'
{
  "subAccount": {
    "id": "<string>",
    "name": "Client ABC",
    "status": "active",
    "totalSpent": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "externalId": "<string>",
    "creditLimit": 123,
    "metadata": {},
    "apiKey": "<string>"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

Name of the sub-account.

Maximum string length: 200
Example:

"Client ABC"

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.

Required range: x >= 0
metadata
object

Response

Sub-account created.

subAccount
object
required