Elydora Docs

Webhooks

Register HTTPS endpoints that receive signed POST deliveries when Elydora events occur.

List Webhooks

GET
/v1/webhooks
Return the webhooks registered for the current organization.
Auth: org_owner, security_admin

Example Request

bash
curl https://api.elydora.com/v1/webhooks \
  -H "Authorization: Bearer <token>"

Response

json
{
  "webhooks": [
    {
      "webhook_id": "0195a1b2-c3d4-7e5f-a6b7-c8d9e0f1a2b3",
      "org_id": "0195a0b1-c2d3-7e4f-a5b6-c7d8e9f0a1b2",
      "endpoint_url": "https://hooks.acme.com/elydora",
      "events": ["operation.accepted", "epoch.created"],
      "status": "active",
      "created_at": 1740700800000,
      "updated_at": 1740700800000
    }
  ]
}

Register Webhook

POST
/v1/webhooks
Register an endpoint for one or more event types. Returns HTTP 201.
Auth: org_owner, security_admin

Request Body

FieldTypeRequiredDescription
endpoint_urlstringYesURL that receives the deliveries. Maximum 2048 characters; the endpoint must pass the egress policy.
eventsstring[]YesNon-empty array of event types from the list below.
secretstringYesHMAC-SHA256 signing secret, 16 to 256 characters. Stored encrypted.

Event Types

FieldTypeRequiredDescription
operation.acceptedstringNoAn operation record was accepted.
epoch.createdstringNoAn epoch closed and its Merkle root was committed.
agent.status_changedstringNoAn agent status changed, for example active to frozen.

Example Request

bash
curl -X POST https://api.elydora.com/v1/webhooks \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint_url": "https://hooks.acme.com/elydora",
    "events": ["operation.accepted", "epoch.created"],
    "secret": "<signing secret of at least 16 characters>"
  }'

Response

json
{
  "webhook": {
    "webhook_id": "0195a1b2-c3d4-7e5f-a6b7-c8d9e0f1a2b3",
    "org_id": "0195a0b1-c2d3-7e4f-a5b6-c7d8e9f0a1b2",
    "endpoint_url": "https://hooks.acme.com/elydora",
    "events": ["operation.accepted", "epoch.created"],
    "status": "active",
    "created_at": 1740700800000,
    "updated_at": 1740700800000
  }
}

Deliveries

Each delivery is a JSON POST. The X-Elydora-Signature header carries sha256=<hex> where hex is HMAC-SHA256(secret, "<X-Elydora-Webhook-Timestamp>.<raw body>").

json
{
  "event": "operation.accepted",
  "delivery_id": "0195a7b8-c9d0-7e1f-a2b3-c4d5e6f7a8b9",
  "org_id": "0195a0b1-c2d3-7e4f-a5b6-c7d8e9f0a1b2",
  "timestamp": 1772287201000,
  "data": { "operation_id": "0195f2c6-8f4e-7a1b-9c3d-2e4f6a8b0c1d", "agent_id": "agent_underwriter" }
}

Delivery Headers

FieldTypeRequiredDescription
X-Elydora-Webhook-EventstringYesEvent type
X-Elydora-Webhook-Delivery-IdstringYesUnique delivery identifier
X-Elydora-Webhook-IdstringYesWebhook identifier
X-Elydora-Webhook-TimestampstringYesUnix timestamp in seconds used in the signature
X-Elydora-SignaturestringYessha256=<hex HMAC-SHA256>

Delete Webhook

DELETE
/v1/webhooks/:webhook_id
Remove a webhook registration.
Auth: org_owner, security_admin

Path Parameters

FieldTypeRequiredDescription
webhook_idstringYesIdentifier of the webhook to delete

Example Request

bash
curl -X DELETE https://api.elydora.com/v1/webhooks/0195a1b2-c3d4-7e5f-a6b7-c8d9e0f1a2b3 \
  -H "Authorization: Bearer <token>"

Response

json
{
  "success": true
}