ALSORNDocs

Register Endpoint

Register a new webhook endpoint to start receiving protocol events in real time.

POST/webhooks

Register a new webhook endpoint to receive protocol events.

Requires API key authentication

Request Body

ParameterTypeRequiredDescription
urlstringrequiredThe HTTPS URL to receive events. Must be a publicly accessible endpoint that returns a 2xx status code.
eventsstring[]requiredArray of event types to subscribe to. Use ["*"] to subscribe to all events.

Store your secret

The webhook secret is returned only once on creation. Store it securely — you will need it to verify signatures on incoming deliveries.

Response

A successful registration returns the webhook object including the one-time secret.

Response — 201 Created
{  "id": "wh_x1y2z3",  "org_id": "org_abc123",  "url": "https://example.com/webhooks/alsorn",  "events": ["agent.registered", "transaction.completed"],  "active": true,  "consecutive_failures": 0,  "created_at": "2025-01-15T10:30:00Z",  "secret": "whsec_a1b2c3d4e5f6..."}

Code Examples

terminal
curl -X POST https://api.alsorn.com/webhooks \  -H "Authorization: Bearer als_your_api_key" \  -H "Content-Type: application/json" \  -d '{    "url": "https://example.com/webhooks/alsorn",    "events": ["agent.registered", "transaction.completed"]  }'