Webhooks - Endpoints

Create a webhook endpoint

Register an HTTPS destination and get its signing secret. The secret is returned in this response and in a rotation, and nowhere else, so store it now. Destinations that resolve to a private or internal address are refused, at creation and again on every delivery. A plan without webhook delivery, or one already at its endpoint cap, is refused with the reason and the way forward. Authenticate with an API key or a signed-in dashboard session. Costs no credits. Deliveries are signed with the secret in the 0xa-signature header (see the delivery callback).

post/v1/webhooks/endpoints

Request

  • Base URL: https://api.0xarchive.io
  • URL: https://api.0xarchive.io/v1/webhooks/endpoints
  • Auth: API key in header X-API-Key

Request body

urlstring uri required

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

descriptionstring

Your own label for the endpoint.

format'json' | 'discord' | 'slack'

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.

Example request

{
  "url": "https://example.com/hooks/0xarchive",
  "description": "Trading desk alerts",
  "format": "json"
}

Response

The new endpoint and its signing secret

successboolean
notestring

That the secret is shown once.

Example response

{
  "success": true,
  "data": {
    "url": "https://example.com/hooks/0xarchive",
    "description": "Trading desk alerts",
    "format": "json",
    "status": "active",
    "secret": "whsec_6f1c0b2a4d8e5f3a9c7b1e0d2f4a6c8b1d3e5f7a9c0b2d4e6f8a1c3b5d7e9f0a"
  },
  "note": "Store the secret now; it is not shown again."
}

Changes

No recorded changes to this operation across all 1 revision of this API.