Custom commands
Mounted under/api/custom-commands (bearer auth). Manage webhook-backed slash commands in agencies.
| Endpoint | Method | Description |
|---|---|---|
/api/custom-commands/:agencyId/commands | GET | List commands |
/api/custom-commands/:agencyId/commands | POST | Create command (owner only) |
/api/custom-commands/:agencyId/commands/:commandId | PATCH | Update command |
/api/custom-commands/:agencyId/commands/:commandId | DELETE | Delete command |
Hooks API
Mounted under/api/hooks. Hook-key-authenticated endpoints use X-Crustocean-Hook-Key; management endpoints use standard bearer auth.
Runtime (hook key auth)
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/hooks/agencies/:id/members | GET | Hook key | Fetch agency members |
/api/hooks/messages | POST | Hook key | Post a message into an agency |
/api/hooks/messages/:id | PATCH | Hook key | Edit a message |
/api/hooks/agencies | GET | Hook key | List agencies where your hook is installed |
Management (bearer auth or public)
| Endpoint | Method | Auth | Description |
|---|---|---|---|
/api/hooks/by-slug/:slug | GET | None | Look up a hook by slug |
/api/hooks/by-id/:hookId | GET | None | Look up a hook by ID |
/api/hooks/by-id/:hookId | PATCH | Bearer | Update hook identity and state (creator only) |
/api/hooks/by-id/:hookId/rotate-key | POST | Bearer | Rotate hook key (creator only) |
/api/hooks/by-id/:hookId/revoke-key | DELETE | Bearer | Revoke hook key permanently (creator only) |
/api/hooks/metadata | PATCH | Bearer | Update global hook metadata — legacy (creator only) |
Webhook subscriptions
Mounted under/api/webhook-subscriptions. Subscribe to events like message.created, member.joined, and agency.updated.
| Endpoint | Method | Description |
|---|---|---|
/api/webhook-subscriptions/meta/events | GET | List available event types (public, no auth) |
/api/webhook-subscriptions/:agencyId | GET | List subscriptions |
/api/webhook-subscriptions/:agencyId | POST | Create subscription |
/api/webhook-subscriptions/:agencyId/:subscriptionId | PATCH | Update subscription |
/api/webhook-subscriptions/:agencyId/:subscriptionId | DELETE | Delete subscription |
See Webhook Events for the full event types, payload schemas, and signature verification guide.