Browse all documentation

Webhooks API reference

Signed at-least-once event delivery with history and replay

Destinations

Ten authenticated routes create, list, inspect, update, rotate, test and delete destinations, plus read configuration and delivery history and replay one delivery. Destination filters remain inside the account's active country and family rights. Webhooks are available on every account. Each delivery costs one call at the price of the data it carries. An account can keep 25 destinations in total, enabled or not. Creating the 26th with POST /v1/webhooks/destinations returns 409 limit_reached until you delete one.

GET /v1/webhooks/destinationsPOST /v1/webhooks/destinationsGET /v1/webhooks/destinations/{destination_id}PATCH /v1/webhooks/destinations/{destination_id}DELETE /v1/webhooks/destinations/{destination_id}POST /v1/webhooks/destinations/{destination_id}/testPOST /v1/webhooks/destinations/{destination_id}/rotate-secretGET /v1/webhooks/destinations/{destination_id}/historyGET /v1/webhooks/destinations/{destination_id}/deliveriesPOST /v1/webhooks/destinations/{destination_id}/deliveries/{delivery_id}/replay

Request fields

FieldTypeRule
urlstringRequired. An HTTPS URL of up to 2,048 characters.
countriesarray of ISO 3166 alpha-3 codesRequired. 1–60 uppercase ISO alpha-3 codes, or WLD.
familiesarray of family slugsRequired. 1–8 of the families listed under Event types. A family not listed there is refused with an error that names the accepted ones.
companiesarray of company idsRequired with the filings family and refused without it. 1–1,000 company ids such as usa:0000320193; an unknown id is refused with an error that names it.
enabledbooleanOptional. Defaults to true.

PATCH replaces the entire configuration: send url, countries, families, enabled and, with the filings family, companies every time. Leaving out enabled turns a disabled destination back on. POST and PATCH return 409 limit_reached if enabling a destination would exceed the limit. Disable or delete another destination first.

Destination fields

FieldTypeMeaning
destination_iduuidIdentifies the destination.
urlstringThe HTTPS receiver URL.
countriesarray of ISO 3166 alpha-3 codesFilters countries within the account's active rights.
familiesarray of family slugsFilters by release family.
enabledbooleanIndicates whether the destination is enabled.
companiesarray of company idsThe watched companies. Sent only when the destination has the filings family.
config_versionintegerIncrements on each configuration change; deliveries record the version they were sent under.
secret_versionintegerIncrements on each secret rotation.
created_atUTC timestampThe time the destination was created.
updated_atUTC timestampThe time the destination was last updated.
secretstringReturned only by create and rotate-secret; store it because it is not shown again.
disabled_reasonstringWhy the destination is disabled: customer or plan_limit. plan_limit means the destination limit disabled it. Left out when the destination is enabled.

DELETE and replay return 204 No Content. Test returns delivery_id (left out when nothing was queued), status (queued, rate_limited or disabled) and retry_after_seconds when rate limited. The configuration history route returns history, with one entry per version containing config_version, url, countries, families, enabled and recorded_at. The list route returns destinations and destination_limit, the number of destinations an account can keep (25). A field with no value, such as disabled_reason on an enabled destination, is left out. An unknown or deleted destination returns 404 webhook_request_failed on every destination route. Replaying an unavailable delivery returns the same error. An invalid deliveries cursor returns 400. 503 webhook_unavailable means webhooks cannot be served right now. Test deliveries have an account-wide 10-second cooldown. During it, the test route returns status: "rate_limited" and retry_after_seconds.

Deliveries

The deliveries route pages with limit (1–100, default 50) and cursor, and returns next_cursor (null on the last page).

FieldTypeMeaning
delivery_idstringIdentifies the delivery.
event_cursorintegerIdentifies the event; left out for test deliveries.
is_testbooleanSent as true only for a test delivery.
config_versionintegerThe destination configuration version used for the delivery.
stateenumThe delivery state: pending, leased, succeeded, failed or cancelled.
attemptsintegerThe number of delivery attempts.
replaysintegerThe number of replays; sent only when greater than 0.
next_attempt_attimestampThe time of the next attempt; sent only while the state is pending or leased.
retry_untiltimestampThe time until which the delivery can be retried; sent only while the state is pending or leased.
last_statusintegerThe receiver's last HTTP status; left out before the first attempt.
last_errorstringThe last error; left out when there is none.
created_attimestampThe time the delivery was created.
updated_attimestampThe time the delivery was last updated.

Event types

A destination receives the event types below when its subscribed families match, within the account's active country and family rights.

A destination subscribes to one or more families: gdp, prices, labour, trade, policy_rate, yield_curve, predictions and filings.

Event typeMeaning
release.updatedWhen a calendar release carries a figure it did not carry before
dataset.publishedWhen an accepted official publication adds a new reference period
yield_curve.publishedWhen a new yield-curve date is accepted
rate_decision.publishedWhen a central bank announces a rate decision, once per meeting
filing.publishedWhen a company you watch publishes a filing, once per filing

A destination receives a delivery only when a new figure arrives. A date change, a cancelled release and a figure changed later are not sent. Read date changes from the calendar.

Prediction events

Destinations with the predictions family receive prediction.event.closed when event trading stops, prediction.event.settled when the event settles and prediction.event.voided when it is voided. We send each at most once per event. The body contains the event's status, never a probability or winning outcome. The market ID is prediction_event_id; event_id identifies the event.

Payload bodies

Webhook bodies carry schema_version; REST events do not. A field with no value is left out. cursor orders journal events.

Economics and release event
{
  "schema_version": "1",
  "event_id": "2cdf117d-4a23-4a1f-b68e-93a7e9dc765e",
  "cursor": "1",
  "type": "dataset.published",
  "country": "USA",
  "family": "prices",
  "resource_id": "775d11a3-a6de-52b1-b41b-a236ad595e7a",
  "resource_version": "822e107c-09f6-4736-82e9-082d725398a2",
  "operation": "economics_get_cpi",
  "data": {
    "country": "USA",
    "period": "2026-10",
    "value": "337.511",
    "index_base": "1982-84=100",
    "released_on": "2026-11-10"
  },
  "recorded_at": "2026-11-10T13:31:12Z"
}

operation names the operation whose latest value data holds, such as economics_get_cpi, and data is the country's latest figure, in the shape that operation's latest endpoint returns. Both are sent on dataset.published and yield_curve.published, and on release.updated when the linked data event exists at delivery time. data is read once, so it is the same on every retry and replay; if it could not be read it is left out, so fetch the figure from the endpoint then.

Release events carry release_id instead of resource_id. A release.updated event also carries release, the calendar revision with its indicators. Every timestamp in it is UTC.

Release update
{
  "schema_version": "1",
  "event_id": "c3a8e4d0-5b1f-4f7e-9d2a-6e0b8f3a1c57",
  "cursor": "2",
  "type": "release.updated",
  "country": "USA",
  "family": "prices",
  "release_id": "f01e2289-2e17-49b3-9d64-d29118742dee",
  "resource_version": "4d6b0c1e-8a27-4f93-b5c0-71e2a9d3f648",
  "operation": "economics_get_cpi",
  "data": {
    "country": "USA",
    "period": "2026-10",
    "value": "337.511",
    "index_base": "1982-84=100",
    "released_on": "2026-11-10"
  },
  "release": {
    "title": "Consumer Price Index",
    "reference_period": "2026-10",
    "status": "published",
    "schedule": {
      "precision": "exact",
      "at": "2026-11-10T13:30:00Z",
      "timezone": "America/New_York",
      "local_date": "2026-11-10"
    },
    "officially_published_at": "2026-11-10T13:30:00Z",
    "indicators": [
      {
        "measure": "cpi_mom",
        "concept": "cpi",
        "title": "CPI, month over month",
        "period": "2026-10",
        "unit": "percent",
        "transformation": "month_over_month",
        "annualization": "not_annualized",
        "actual": "0.4",
        "previous": "0.6",
        "previous_period": "2026-09",
        "consensus": "0.3",
        "value_status": "available"
      }
    ]
  },
  "recorded_at": "2026-11-10T13:31:12Z"
}

A rate_decision.published event carries decision, with every field present as the rate decisions endpoint returns it, and is sent once per meeting. country is the deciding country, or the id of the union that decided (EMU, WAEMU, CEMAC, ECCU, CBCS or IEOM); a destination that watches a member country of the union also receives it. A decision that changes later is not sent.

Rate decision
{
  "schema_version": "1",
  "event_id": "8b7f2d19-0c4e-4a63-a1d5-3f9e6c2b7a04",
  "cursor": "3",
  "type": "rate_decision.published",
  "country": "USA",
  "family": "policy_rate",
  "resource_id": "3e0f6a52-9d14-5b87-8c21-d4a7b9e1f063",
  "resource_version": "b1c94e7a-2f56-4d08-93ae-5c7d0e8a1b32",
  "recorded_at": "2026-10-28T18:05:41Z",
  "decision": {
    "decision_id": "e5149a43bf24f96d202a6a8a6700d12b",
    "authority_id": "federal_reserve",
    "authority": "Federal Reserve System",
    "country": "USA",
    "decided_on": "2026-10-28",
    "date_basis": "decision",
    "decision_basis": "committee",
    "evidence_kind": "statement",
    "source_tier": "own",
    "source_publisher": null,
    "source_published_on": null,
    "unchanged_since": null,
    "action": "hold",
    "any_rate_moved": false,
    "currency": null,
    "announced_on": null,
    "effective_on": null,
    "rates": [
      {
        "role": "main",
        "instrument_label": "target range for the federal funds rate",
        "rate": null,
        "lower_bound": "3.75",
        "upper_bound": "4.00",
        "rate_source": "stated"
      }
    ],
    "quotes": [
      {
        "text": "The Committee decided to maintain the target range for the federal funds rate at 3-3/4 to 4 percent",
        "url": "https://www.federalreserve.gov/newsevents/pressreleases/monetary20261028a.htm"
      }
    ],
    "votes_status": "unknown",
    "served_state": "confirmed",
    "from_union": null
  }
}

A filing.published event carries filing instead of data: filing_id is the filing's accession, and fy, fp, period_end, title, url and company_name are left out when the filing has none. It is sent once per filing, when the filing's country is in countries and its company is in companies. A 13D or 13G filing is also sent when you watch the company the stake is in, which subject_id names.

Filing event
{
  "schema_version": "1",
  "event_id": "6a1d9c37-4e80-4b25-8f3a-0d7c5e2b9a16",
  "cursor": "4",
  "type": "filing.published",
  "country": "USA",
  "recorded_at": "2026-11-03T13:06:02Z",
  "filing": {
    "filing_id": "0000320193-26-000026",
    "company_id": "usa:0000320193",
    "company_name": "Apple Inc.",
    "form": "10-K",
    "type": "annual",
    "fy": 2026,
    "fp": "FY",
    "period_end": "2026-09-26",
    "url": "https://www.sec.gov/Archives/edgar/data/320193/000032019326000026/0000320193-26-000026-index.htm",
    "filed_at": "2026-11-03T13:05:15Z"
  }
}
Prediction event
{
  "schema_version": "1",
  "event_id": "5d0b6f0e-7a1c-4c53-9b5e-2f9c4b1d8a63",
  "cursor": "470",
  "type": "prediction.event.settled",
  "country": "USA",
  "recorded_at": "2026-10-28T20:15:02Z",
  "prediction": {
    "prediction_event_id": "usa-fed-2026-10",
    "topic_id": "usa-fed",
    "shape": "scalar",
    "status": "settled",
    "closes_at": "2026-10-28T17:59:00Z",
    "resolves_at": "2026-10-28T18:00:00Z",
    "settlements": [
      {
        "venue": "kalshi",
        "status": "settled"
      },
      {
        "venue": "polymarket",
        "status": "settled"
      }
    ],
    "release_id": "ae2a77cc-3b5b-4541-a060-3bc2ea1145d9"
  }
}
Test delivery
{
  "schema_version": "1",
  "event_id": "9f1c2a54-3b7d-4e0a-8c46-1d5e7b9a0f32",
  "type": "webhook.test",
  "recorded_at": "2026-10-22T09:00:00Z"
}

A test delivery has no cursor, no release and no data.

Signatures and retries

  1. Read x-narwhal-timestamp (Unix seconds) and the raw request body before parsing any JSON.
  2. Compute the lowercase hex HMAC-SHA256 of timestamp + "." + raw_body, keyed with the destination secret as UTF-8 bytes.
  3. Compare the result in constant time with each sha256=<hex> value in x-narwhal-signature. Accept the delivery if any value matches. For 24 hours after a secret rotation, the header carries a second value, signed with the previous secret.
  4. Reject timestamps too far from your clock, such as those older than five minutes, to prevent replays.

Delivery is at least once. Return a 2xx response only after durable processing; the response body is ignored. event_id identifies the event and is the deduplication key across retries and replays. delivery_id identifies a delivery attempt; retries keep it, and test deliveries reuse it as event_id.

A 429 or 5xx response, a timeout or a connection error is retried with exponential backoff, up to one hour between attempts, and longer when a 429 or 503 sends Retry-After. A redirect or any other status fails the delivery. The retry window is 24 hours from delivery creation or the latest replay.

History and replay

Delivery history records attempt state and response status. Replay creates a new delivery for the same immutable event. Secret rotation has a 24-hour overlap window so receivers can validate either signature.

Was this page helpful?