Skip to main content
PATCH
/
v1
/
sub-accounts
/
{id}
Update sub-account
curl --request PATCH \
  --url https://api.zavu.dev/v1/sub-accounts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "externalId": "<string>",
  "creditLimit": 1,
  "metadata": {},
  "status": "active"
}
'
{
  "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.

Path Parameters

id
string
required

Sub-account ID.

Body

application/json
name
string
externalId
string
creditLimit
integer | null
Required range: x >= 0
metadata
object
status
enum<string>
Available options:
active,
inactive

Response

Sub-account updated.

subAccount
object
required