Skip to main content
GET
/
webhooks
List webhooks
curl --request GET \
  --url https://api.horizon.new/v1/webhooks
{
  "webhooks": [
    {
      "webhookId": "whk_01hx9ua",
      "url": "<string>",
      "events": [
        "<string>"
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "secret": "<string>"
    }
  ]
}
Register account-level webhooks to receive notifications when Horizon jobs complete. Use these endpoints to list, create, update, or delete webhooks for your workspace.

List webhooks

curl https://api.horizon.new/v1/webhooks \
Returns 200 OK with an array of webhook objects.

Create webhook

curl https://api.horizon.new/v1/webhooks \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://hooks.example.com/horizon",
    "events": ["job.completed"],
    "secret": "whsec_*******
  }'
Returns 202 Accepted with a job descriptor. Horizon validates payment via x402 before finalizing the webhook; poll GET /jobs/{jobId} or listen for the completion webhook to confirm provisioning. Provide a strong secret if you want Horizon to sign payloads.

Retrieve webhook

curl https://api.horizon.new/v1/webhooks/whk_01hx9ua \
Returns 200 OK with a single webhook.

Update webhook

curl https://api.horizon.new/v1/webhooks/whk_01hx9ua \
  -X PATCH \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["job.completed"],
    "url": "https://hooks.example.com/horizon/jobs"
  }'
Returns 200 OK with the updated webhook.

Delete webhook

curl https://api.horizon.new/v1/webhooks/whk_01hx9ua \
  -X DELETE \
Returns 204 No Content when the webhook is removed.

Notes

  • You can register multiple webhooks; each job includes its subscriptions in the events field returned by GET /jobs/{jobId}.
  • Webhooks fire once per job completion. Retries follow exponential backoff when the destination responds with non-2xx codes.
  • Verify payload signatures with HMAC SHA-256 using the secret you supply. The signature appears in the signature field of the webhook payload and in the X-Horizon-Signature header.

Response

200 - application/json

Array of webhooks

webhooks
object[]
required