Skip to main content
POST
/
api
/
v1
/
accounts
Create Account
curl --request POST \
  --url https://api.example.com/api/v1/accounts \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>"
}
'
{
  "id": "<string>",
  "account_code": "<string>",
  "slug": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "user_count": 123,
  "collections_used": [
    "<string>"
  ]
}

Headers

authorization
string | null

Body

application/json

Request body for creating a new account.

name
string
required

Account name

Required string length: 1 - 255
slug
string | null

URL-friendly identifier (auto-generated if not provided)

Required string length: 3 - 32

Response

Successful Response

Detailed account information.

id
string
required

Account ID (UUID)

account_code
string
required

Human-readable account code in XX#### format (e.g., AB1234)

slug
string
required

URL-friendly account identifier

name
string
required

Display name for the account

created_at
string<date-time>
required

When the account was created

updated_at
string<date-time>
required

When the account was last updated

user_count
integer
required

Number of users in this account

collections_used
string[]

Collections used by this account