Register a webhook

Register a webhook endpoint and receive its signing secret. The secret is returned only on creation — store it immediately, as it cannot be retrieved again.

Authentication

x-api-keystring

Your Living Brain API key. Create one from the dashboard; keys are scoped to an organization and carry the role of the member they were issued to.

Headers

x-subject-idstringRequired
Identifies the end user the request is made on behalf of. Brains are owned by a subject, so this determines which brains the caller can see.

Request

This endpoint expects an object.
urlstringRequired
HTTPS endpoint to deliver events to
eventslist of enumsOptional

Event types to subscribe to; empty = all

secretstringOptional>=16 characters

Signing secret to use for this subscription. When omitted a random secret is generated and returned once. Hosts that verify deliveries against a pre-configured secret (e.g. an env var) should pass it here so signatures match. Write-only: never returned on reads.

Response

idstring
Subscription id
tenantIdstring
Owning tenant id
urlstring
Delivery endpoint
eventslist of enums

Subscribed event types; empty = all

activeboolean
Whether the subscription is currently receiving deliveries.
createdAtdatetime
ISO 8601 timestamp of when this record was created.
updatedAtdatetime
ISO 8601 timestamp of when this record was last modified.
secretstring

Raw signing secret for verifying x-brain-signature on deliveries. Returned exactly once; store it now.

Errors

400
Bad Request Error
401
Unauthorized Error