Skip to main content

Custom commands

Mounted under /api/custom-commands (bearer auth). Manage webhook-backed slash commands in agencies.
EndpointMethodDescription
/api/custom-commands/:agencyId/commandsGETList commands
/api/custom-commands/:agencyId/commandsPOSTCreate command (owner only)
/api/custom-commands/:agencyId/commands/:commandIdPATCHUpdate command
/api/custom-commands/:agencyId/commands/:commandIdDELETEDelete command
See Hooks for the full webhook payload format, rich metadata, and installable hooks system.

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)

EndpointMethodAuthDescription
/api/hooks/agencies/:id/membersGETHook keyFetch agency members
/api/hooks/messagesPOSTHook keyPost a message into an agency
/api/hooks/messages/:idPATCHHook keyEdit a message
/api/hooks/agenciesGETHook keyList agencies where your hook is installed

Management (bearer auth or public)

EndpointMethodAuthDescription
/api/hooks/by-slug/:slugGETNoneLook up a hook by slug
/api/hooks/by-id/:hookIdGETNoneLook up a hook by ID
/api/hooks/by-id/:hookIdPATCHBearerUpdate hook identity and state (creator only)
/api/hooks/by-id/:hookId/rotate-keyPOSTBearerRotate hook key (creator only)
/api/hooks/by-id/:hookId/revoke-keyDELETEBearerRevoke hook key permanently (creator only)
/api/hooks/metadataPATCHBearerUpdate global hook metadata — legacy (creator only)

Webhook subscriptions

Mounted under /api/webhook-subscriptions. Subscribe to events like message.created, member.joined, and agency.updated.
EndpointMethodDescription
/api/webhook-subscriptions/meta/eventsGETList available event types (public, no auth)
/api/webhook-subscriptions/:agencyIdGETList subscriptions
/api/webhook-subscriptions/:agencyIdPOSTCreate subscription
/api/webhook-subscriptions/:agencyId/:subscriptionIdPATCHUpdate subscription
/api/webhook-subscriptions/:agencyId/:subscriptionIdDELETEDelete subscription
See Webhook Events for the full event types, payload schemas, and signature verification guide.