Skip to main content
POST
Create Account Group
Creates a new group (sub-organization) within your organization. Account groups can be used to organize different merchants or business units under a single parent entity. Pass account_codes to attach existing accounts to the group in the same request. A new group is always created as a root; to nest it under another group, set parent_code with Update Account Group.

Authorizations

PUBLIC-API-KEY
string
header
default:<Your PUBLIC-API-KEY>
required
PRIVATE-SECRET-KEY
string
header
default:<Your PRIVATE-SECRET-KEY>
required

Body

application/json
name
string
required

Account group name (min=1, max=255).

merchant_id
string
required

Unique identifier used by the merchant in their systems (min=1, max=255).

account_codes
string<uuid>[]

Optional. ids of existing accounts to attach to the new group in the same transaction. An account belongs to one group at a time, so an account that is already in another group is moved to the new one. If any code does not match an active account of the organization the whole request fails and no group is created. Defaults to an empty list.

Response

201 - application/json

Created

id
string<uuid>

The unique identifier of the account group.

name
string
merchant_id
string
parent_code
string<uuid> | null

The id of the group this group is nested under. Always null on creation: a new group is created as a root and nested afterwards with Update Account Group.

created_at
string<date-time>
updated_at
string<date-time>