Skip to main content
POST
Create a webhook endpoint
API key required. Send X-API-Key with this request. See REST authentication.
Operation schema
Open the generated operation schema for machine-readable request and response details.

Authorizations

X-API-Key
string
header
required

API key for authentication. Get yours at https://0xarchive.io/dashboard

Headers

0xArchive-Version
enum<string>

Selects the 2026-10 response contract. Send 2026-10-01; any dated version on or after it selects the same shapes. Without the header every response keeps its existing shape. With it:

  • The data quality routes, /v1/status/coverage and /v1/symbols answer the standard {success, data, meta} envelope.
  • Record times that are integer milliseconds by default become RFC 3339 UTC strings with millisecond precision, and the integer moves to a *_ms field: L4 resting-order timestamp (timestamp_ms), CVD buckets, HIP-3 oracle reads, Lighter and Lighter on Robinhood Chain liquidations and liquidation volume. Levels and trigger-levels snapshot_ts become RFC 3339 with snapshot_ts_ms.
  • Error bodies carry the contract error_code names: invalid_parameter instead of invalid_query_params and invalid_path_params, historical_depth_exceeded instead of history_window_exceeded, and historical_range_exceeded instead of request_range_exceeded; a malformed cursor that fails to parse answers 400 invalid_cursor instead of invalid_query_params. With 0xArchive-Version: 2026-10-01, malformed cursors on trades, liquidations, L2 and L4 diffs, order history, TP/SL and order-flow routes answer 400 invalid_cursor. Without the header, the first six route families treat a malformed cursor as no cursor and return the first page; order flow answers 400 invalid_query_params. Malformed trade time inputs answer 400 invalid_time_range with the header and 400 invalid_query_params without it.

The response echoes the selected version in its own 0xArchive-Version header.

Available options:
2026-10-01
Example:

"2026-10-01"

Body

application/json

A new delivery destination.

url
string<uri>
required

HTTPS destination that will receive deliveries. Destinations that resolve to a private or internal address are refused.

Example:

"https://example.com/hooks/0xarchive"

description
string
default:""

Your own label for the endpoint.

Example:

"Trading desk alerts"

format
enum<string>

Delivery format. Omit it to detect from the URL: a Discord webhook URL becomes discord, a Slack incoming-webhook URL becomes slack, anything else json. Case-insensitive. Telegram endpoints are created by connecting a chat, not here.

Available options:
json,
discord,
slack
Example:

"json"

Callbacks

POST
{$request.body#/url}delivery

Body

application/json

Body of a webhook delivery to a json endpoint. The same id is sent on every retry and redelivery of the event; use it (or the 0xa-event-id header) to deduplicate. Delivery is at least once.

id
string<uuid>
required

Event identifier, stable across retries and redeliveries. Equals the 0xa-event-id header.

type
string
required

Event type from the catalog. Equals the 0xa-event-type header.

Example:

"market.liquidation"

schema_version
integer
required

Version of the data shape for this event type.

Example:

1

observed_at
string<date-time>
required

When the event was detected.

data
object
required

Event payload. Its fields are the metrics the catalog declares for the event type.

late_ms
integer<int64> | null

How long after the underlying occurrence the event was detected, in milliseconds. Null when the occurrence carries no timestamp; absent on test, export and some operational events.

late
boolean

True when late_ms exceeds ten minutes. Absent where late_ms is absent.

Response

Delivered. The response body is ignored.

Response

The new endpoint and its signing secret

API response containing a newly created endpoint and its signing secret.

success
boolean
Example:

true

data
object

A newly created endpoint, including the signing secret. This is one of the two responses that carry the secret; the other is a rotation. Store it now, because it is not shown again.

note
string

That the secret is shown once.

Example:

"Store the secret now; it is not shown again."

Last modified on October 7, 2026