Skip to content

Webhook Format

Selu supports webhooks for integrating with external services. Inbound webhooks let outside systems send events into Selu (e.g. a CI pipeline notifying an agent). Outbound webhooks let Selu push events to your services (e.g. notifying Slack when a conversation finishes).

External systems send HTTP POST requests to Selu’s inbound webhook endpoint.

POST /api/v1/webhooks/inbound/{webhook_id}

Each inbound webhook has a unique webhook_id generated when you create it via the dashboard or CLI (selu webhook create --direction inbound).

{
"event": "custom.build_complete",
"timestamp": "2026-03-03T14:22:00Z",
"source": "ci-pipeline",
"data": {
"repo": "selu-platform/web-search",
"branch": "main",
"commit": "a1b2c3d",
"status": "success",
"duration_seconds": 142
}
}
FieldTypeRequiredDescription
eventstringYesEvent type identifier. Use a dotted namespace (e.g. custom.deploy_complete).
timestampstringYesISO 8601 timestamp of when the event occurred.
sourcestringNoIdentifier for the originating system.
dataobjectYesArbitrary payload. Passed to the agent as-is.

Include the webhook secret in the X-Selu-Signature header. The value is an HMAC-SHA256 hex digest of the raw request body, computed with the secret shown when the webhook was created.

X-Selu-Signature: sha256=9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08

Selu sends HTTP POST requests to a URL you configure whenever a subscribed event occurs.

EventDescription
conversation.startedA new conversation was created.
conversation.completedA conversation was marked as finished.
agent.installedA new agent was installed.
agent.errorAn agent encountered a runtime error.
capability.invokedA capability was invoked by an agent.
{
"webhook_id": "wh_outbound_abc123",
"event": "conversation.completed",
"timestamp": "2026-03-03T15:00:00Z",
"data": {
"conversation_id": "conv_abc123",
"agent_name": "research-assistant",
"channel": "telegram",
"message_count": 8,
"capabilities_used": ["web-search"],
"duration_seconds": 45
}
}

Selu retries failed deliveries (non-2xx responses) with exponential backoff: 10s, 30s, 90s, 270s. After 4 failed attempts, the delivery is marked as failed. You can view delivery history and manually retry from the dashboard under Settings → Webhooks.

Terminal window
# Inbound
selu webhook create --direction inbound --name "CI Notifications"
# Outbound
selu webhook create --direction outbound \
--name "Slack Notifier" \
--url https://example.com/hooks/selu \
--events conversation.completed,agent.error