Accounts

get

Get a list of accounts

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Query parameters
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Required

The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

Responses
200Success
application/json
get
/accounts
post

Create a new account

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Body
domainstringOptional

Deprecated. Please use Domains and PrimaryDomain instead.

domainsstring[]Optional

The domains of the account, without any leading scheme, for example stripe.com. Must specify one domain as primary.

logo_urlstringOptional

The logo URL of the account. Must be a square .png, .jpg or .jpeg.

namestringRequired

The name of the account.

owner_idstringOptional

The ID of the owner of the account.

primary_domainstringOptional

Must be in the list of domains. If there are any domains, there must be exactly one primary domain.

subaccount_idsstring[]Optional

An array of account IDs to be added as subaccounts to this account.

tagsstring[]Optional

An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

Responses
200Success
application/json
post
/accounts
patch

Update multiple accounts

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Body
account_idsstring[]Required

The account IDs to update. The number of accounts to update must be between 1 and 100.

owner_idstringOptional

The ID of the new owner. If empty string is passed in, the owner will be removed.

tagsstring[]Optional

An array of tags to be updated on the accounts.

tags_apply_modestringOptional

The mode for applying tags. Valid values: "append_only", "remove_only", "replace". Defaults to "replace".

Responses
200Success
application/json
patch
/accounts
get

Get an account by its ID or external ID

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to fetch.

Responses
200Success
application/json
get
/accounts/{id}
patch

Update an existing account

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to update.

Body
domainsstring[]Optional

Domains of the account. Must specify one domain as primary.

logo_urlstringOptional

Logo URL of the account.

namestringOptional

The name of the account.

owner_idstringOptional

The ID of the owner of the account. If empty string is passed in, the owner will be removed.

primary_domainstringOptional

Must be in the list of domains. If there are any domains, there must be exactly one primary domain.

subaccount_idsstring[]Optional

An array of account IDs to be added as subaccounts to this account.

tagsstring[]Optional

An array of strings to use as tags on this account. If provided, the accounts tags will be updated to the given tags.

Responses
200Success
application/json
patch
/accounts/{id}
delete

Delete an existing account

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Path parameters
idstringRequired

The ID or external ID of the account to delete.

Responses
200Success
application/json
delete
/accounts/{id}
200Success

Search for accounts by a given filter

post

Currently, the following fields are filterable for accounts:

  • domains. Allowed operators: contains, does_not_contain, in, not_in

  • tags. Allowed operators: contains, does_not_contain, in, not_in

  • name. Allowed operators: equals, in, not_in, string_contains

  • external_ids. Allowed operators: equals, in, not_in, is_set, is_unset

  • custom fields (pass in the slug of the custom field)

Authorizations
AuthorizationstringRequired

Authorization: Bearer

Body
cursorstringOptional

The cursor to use for pagination.

limitinteger · int64Optional

The number of accounts to fetch. Defaults to 100. Must be greater than 0 and less than 1000.

Responses
200Success
application/json
post
/accounts/search

Last updated

Was this helpful?