Observe

Webhooks

Push every event on a channel to your own HTTPS endpoint as a signed JSON POST, and inspect what was delivered.

A webhook endpoint subscribes a URL to one channel. Every telemetry event stored on that channel, from any source (SDK publish, OTLP, Sentry), is posted to the URL as JSON, optionally filtered by event type. Use it to feed a raw stream into Slack, a queue or your own service.

If you want to be told when something crosses a threshold (error rate, latency, a failed cron monitor) rather than about every event, use an alert rule instead.

Create an endpoint

You need the channel ID. List an app’s channels with GET /apps/{appId}/channels, or use the channel the SDK publishes to by default. Endpoints are per channel, so check where your source writes: OTLP and Sentry traffic usually lands on the app’s otlp-traces and otlp-logs channels, not the SDK’s default channel.

from axonpush import AxonPush

with AxonPush() as client:
  endpoint = client.webhooks.create_endpoint(
      url="https://ops.example.com/hooks/axonpush",
      channel_id="ch_...",
      event_types=["agent.error"],
      description="Agent errors to Slack",
  )
  # Shown once. Store it in your receiver's secret store.
  signing_secret = endpoint.raw_secret

The response (201) is the endpoint plus rawSecret, a whsec_ value generated by axonpush. It is returned only by this call. Later reads only report hasSecret: true. You cannot supply your own secret or fetch this one again; if you lose it, delete the endpoint and create a new one.

FieldRequiredNotes
channelIdyesThe channel whose events are delivered. A missing, deleted or other-organisation channel is 404.
urlyesWhere to POST. See Network rules.
eventTypesnoExact event types to deliver, for example ["agent.error", "app.log"]. Omitted or empty means every event on the channel.
descriptionnoFree text.

Event types match exactly, with no wildcards. The built-in types are agent.start, agent.end, agent.message, agent.tool_call.start, agent.tool_call.end, agent.error, agent.handoff, agent.llm.token, agent.log, app.log, app.span, user.feedback and custom. See the events model.

A new endpoint starts receiving events within about 30 seconds, because the ingest path caches each channel’s endpoint list for that long.

In the dashboard

Open Settings, then Integrations, and find the Webhooks card. Enter a Delivery URL and click Add webhook. The card creates the endpoint on the selected app’s default channel with no event-type filter, and shows the Signing secret (shown once) right after. Event-type filters, descriptions and delivery history are only available through the API, the SDKs and MCP.

What you receive

Each delivery is an HTTP POST with these headers:

HeaderValue
Content-Typeapplication/json
User-Agentaxonpush-webhooks
X-AxonPush-EventThe event type, for example agent.error
X-AxonPush-DeliveryThe delivery ID (whd_...)
X-AxonPush-TimestampUnix time in seconds when the delivery was signed
X-AxonPush-Signature-V2Hex HMAC-SHA256 of timestamp + "." + body, keyed with your signing secret
X-AxonPush-SignatureDeprecated. Hex HMAC-SHA256 of the raw body only. Still sent for one more release, then removed

The body is one event:

{
  "id": "evt_...",
  "type": "agent.error",
  "occurredAt": "2026-11-18T09:12:44.210Z",
  "orgId": "org_...",
  "channelId": "ch_...",
  "source": "sdk",
  "identifier": "support-agent.run",
  "traceId": "4bf92f3577b34da6a3ce929d0e0e4736",
  "attributes": { "model": "gpt-4.1", "error.type": "RateLimitError" }
}

identifier, traceId and attributes are omitted when empty. attributes are the event’s stored attributes, after your organisation’s redaction policy has run. The event payload is not included. When the body would exceed 200 KB, attributes is dropped and the rest is still sent. To read the full event, fetch it by traceId through the traces API.

Verify the signature

  1. Read X-AxonPush-Timestamp and reject the request if it is too far from your clock. axonpush does not set the tolerance; five minutes is a sensible choice.
  2. Compute HMAC-SHA256 over the timestamp, a ., then the raw request body, using the whole secret string (including the whsec_ prefix) as the key.
  3. Hex-encode it and compare it to X-AxonPush-Signature-V2 in constant time.

Verify the bytes you received, before parsing the JSON. Every attempt is signed afresh, so a retry carries a new timestamp.

import hashlib
import hmac
import os
import time

SECRET = os.environ["AXONPUSH_WEBHOOK_SECRET"].encode()
TOLERANCE_SECONDS = 300

def verify(raw_body: bytes, timestamp: str | None, signature: str | None) -> bool:
  if not timestamp or not signature:
      return False
  try:
      ts = int(timestamp)
  except ValueError:
      return False
  if abs(time.time() - ts) > TOLERANCE_SECONDS:
      return False
  signed = timestamp.encode() + b"." + raw_body
  expected = hmac.new(SECRET, signed, hashlib.sha256).hexdigest()
  return hmac.compare_digest(expected, signature)

# verify(request_body,
#        headers.get("X-AxonPush-Timestamp"),
#        headers.get("X-AxonPush-Signature-V2"))

The timestamp check stops a captured request from being replayed later. Inside the tolerance window the same event can still arrive more than once (retries reuse the delivery ID), so record X-AxonPush-Delivery and ignore IDs you have already processed.

Receivers that verify the old body-only X-AxonPush-Signature keep working for one more release. Move them to X-AxonPush-Signature-V2 before that header is removed.

Retries

Respond with any 2xx status within 10 seconds. Anything else counts as a failure:

  • A response of 300 or above (redirects are not followed) or a network error or timeout is retried. Retries reuse the same delivery ID. A delivery whose fifth attempt fails ends as failed with no further retries.
  • A URL that cannot form a valid request is marked failed and not retried.
  • If the endpoint was deleted before the delivery ran, the delivery is marked skipped.

Deliveries are queued after the event is stored, so a slow or failing receiver never slows ingest or drops the event. Ordering is not guaranteed, and the same event can arrive more than once.

Inspect deliveries

Each endpoint keeps a delivery log. GET /webhooks/deliveries/{endpointId} returns the 50 most recent deliveries, newest first.

with AxonPush() as client:
  for d in client.webhooks.deliveries("whe_...") or []:
      print(d.status, d.status_code, d.attempts, d.error)
FieldMeaning
statuspending (queued), success, failed or skipped. A delivery that is still being retried shows failed with a nextRetryAt.
attemptsAttempts made so far.
statusCodeThe last HTTP status your endpoint returned, if any.
errorThe last error, such as status 500 or a connection error.
nextRetryAtWhen the next attempt is scheduled, after a failed attempt that will be retried. Empty on success and after the final attempt.

Delivery records are kept for 30 days.

List and delete endpoints

There is no update call. To change the URL, filter or secret, delete the endpoint and create a new one. A deactivated endpoint cannot be re-enabled.

Network rules

Deliveries go out through a guarded HTTP client:

  • http and https only, on ports 80, 443 and 4318.
  • Addresses in private, loopback and link-local ranges are refused, so a webhook cannot reach localhost or an internal network. Use a public URL or a tunnel during development.
  • Redirects are not followed.

On a self-hosted deployment the operator can add ports with AXONPUSH_OUTBOUND_PORTS and allow specific private origins with AXONPUSH_OUTBOUND_PRIVATE_ORIGINS.

Access

All four webhook operations need the webhooks:manage scope on an API key that is not bound to an app or environment, or an organisation admin or owner in the dashboard. See API keys.

Alert rules with a webhook destination are a separate mechanism. They post an alert payload with User-Agent: axonpush-alerts, signed with the same headers but with a secret per alert rule. See Alerts.