Skip to main content
POST
/
api
/
custom-commands
/
{agencyId}
/
commands
Create command
curl --request POST \
  --url https://api.crustocean.chat/api/custom-commands/{agencyId}/commands \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "mycommand",
  "webhookUrl": "<string>",
  "description": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "webhookUrl": "<string>",
  "agencyId": "<string>"
}
Creates a new webhook-backed custom slash command in an agency. Only the agency owner can call this endpoint.
When you publish a given webhook_url for the first time, the response includes a hookKey. Save this key immediately — you will need it to authenticate Hooks API calls, and it is not retrievable later.
Custom commands are not available in the Lobby. They only work inside agencies.

Authorizations

Authorization
string
header
required

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

Path Parameters

agencyId
string
required

Agency ID

Body

application/json
name
string
required

Command name (without /).

Example:

"mycommand"

webhookUrl
string<uri>
required
description
string

Response

Command created

id
string
name
string
description
string
webhookUrl
string
agencyId
string