Skip to main content
POST
Typescript (SDK)

Body Parameters

Response

Authorizations

Authorization
string
header
required

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

Headers

x-api-version
string
default:2.6.0
required

Body

application/json
account_id
string

The account's ID, if one was set. Pass this or customer_id.

Required string length: 1 - 256
Pattern: ^[a-zA-Z0-9_\-.]+$
customer_id
string

Look the account up through one of its customers. Pass this or account_id.

name
string | null

A display name for the account. Pass null to clear it.

Maximum string length: 256
new_account_id
string | null

Set the account's ID, unique in this environment. Pass null to clear it. Accounts have no ID until you set one.

Required string length: 1 - 256
Pattern: ^[a-zA-Z0-9_\-.]+$
add_customer_ids
string[]

Customers to link. When looking up by customer_id and that customer has no account yet, linking creates one.

Maximum array length: 100

Your unique identifier for the customer

remove_customer_ids
string[]

Customers to unlink. The customers themselves are unchanged. Removing the last customer deletes the account.

Maximum array length: 100

Your unique identifier for the customer

move
boolean

Move customers in add_customer_ids out of any other account they belong to. Without it, linking a customer that's in another account fails.

Response

200 - application/json
UpdateAccountResponse · object | null

OK

The updated account, or null when its last customer was removed and the account was deleted.

id
string | null
required

The account's ID, if you've set one. Autumn never generates it.

name
string | null
required

The account's name, if set.

customers
object[]
required

Customers linked to the account, oldest link first.

created_at
number
required

When the account was created, ms since epoch.