Skip to content
Accounts

Create an Account

POST/api/accounts

This endpoint allows you to create an Account.

Request body

  • namerequired string
    The name of the Account.
  • owneroptional string
    Id of user to add as member with "account-owner" role.
  • parentAccountIdoptional string
    The id of the parent Account. The caller must be authorized to create child Accounts on the parent Account.
  • regionoptional string
    The region that the Account will operate in. Required for "org" Accounts, not allowed for "individual" Accounts. Can be "NZ", "AU", or "US".
  • subscriptionsoptional array of strings
    Subscriptions to assign to the Account. Only allowed for test "org" Accounts. Can include "integrator:sales-channel".
  • testoptional boolean
    A flag indicating if the Account is for testing. Test Accounts will not be able to create non-test Accounts. Defaults to the parent Account's value when a parent Account is set.
  • typerequired enum
    The Account type.
    • individual
      A personal account for a single user. Each user can have only one, and its members can't be changed.
    • org
      A business or organisation account that can have multiple members.

Responses

Request
curl -X POST https://service.centrapay.com/api/accounts \
-H 'content-type: application/json' \
-H 'x-api-key: <TOKEN>' \
-d '{
"name": "Centrapay Cafe",
"region": "NZ",
"type": "org"
}'