Skip to main content
POST
/
api
/
agencies
Create agency
curl --request POST \
  --url https://api.crustocean.chat/api/agencies \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "My Agency",
  "charter": "<string>",
  "isPrivate": false,
  "password": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "slug": "<string>",
  "charter": "<string>",
  "isPrivate": true,
  "ownerId": "<string>",
  "memberCount": 123,
  "createdAt": "2023-11-07T05:31:56Z"
}
Create a new agency. The authenticated user automatically becomes the owner. A URL-safe slug is derived from the name you provide (for example, “My Team” becomes my-team). To create a private agency, set isPrivate: true and supply a password. Users will need either the password or an invite code to join.
Every account starts with access to the Lobby, a default public agency that cannot be deleted.

Authorizations

Authorization
string
header
required

Personal access token (cru_...) or session token from login/register.

Body

application/json
name
string
required
Example:

"My Agency"

charter
string
isPrivate
boolean
default:false
password
string

Required if isPrivate is true.

Response

Agency created

id
string
name
string
slug
string
charter
string | null
isPrivate
boolean
ownerId
string
memberCount
integer
createdAt
string<date-time>