Webhooks

Register an endpoint

Sends one signed challenge to the URL. The endpoint switches on only if it answers 200 with the nonce we sent — which is why registering somebody else's URL cannot make us send them anything. The challenge names the registering account in account, inside what the signature covers, so a receiver echoes the nonce only for its own account. 201 even when the challenge fails: the endpoint exists, it is simply not switched on. Registering a URL you already have resets that endpoint rather than adding one — it is pending until it answers the new challenge — and the plan's limit on endpoints (limits.api.webhooks_max in GET /plans) is counted over your other endpoints, so re-registering the one endpoint a plan holds is never refused 409 too_many_webhooks.

POST
/v1/webhooks
POST
/v1/webhooks
Register an endpoint
Sends one signed challenge to the URL.
Authorizationstringrequired
Your API key. It is sent only when you press Send, to this request alone, and never stored.
Register an endpoint
curl --request POST \
  --url 'https://api.auray.ai/v1/webhooks' \
  --header 'Authorization: Bearer <api-key>'
  --header 'Content-Type: application/json' \
  --data '{
  
}'
{
  "id": "<string>",
  "object": "<string>",
  "url": "<string>",
  "products": "<string[]>",
  "status": "<string>",
  "verified": true,
  "verify_keys": "<string>",
  "signature_algorithm": "<string>",
  "created_at": "<string>",
  "verification": {
    "failed": "<string>",
    "status": 123,
    "how": "<string>"
  },
  "request_id": "<string>"
}
Register an endpoint
curl -X POST https://api.auray.ai/v1/webhooks \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "url": "https://example.com/hooks/auray"
}'
{
  "id": "<string>",
  "object": "<string>",
  "url": "<string>",
  "products": "<string[]>",
  "status": "<string>",
  "verified": true,
  "verify_keys": "<string>",
  "signature_algorithm": "<string>",
  "created_at": "<string>",
  "verification": {
    "failed": "<string>",
    "status": 123,
    "how": "<string>"
  },
  "request_id": "<string>"
}

Authorizations

Authorizationstringheaderrequired

Bearer auray_sk_… — webhooks:write.

Body

application/json
urlstringrequired
https only, on the standard port (443), public host, no credentials. A URL.
productsstring[]
Empty or omitted means every product.

Response

application/json

Registered.

idstring
objectstring
One of "webhook".
urlstring
A URL.
productsstring[]
statusstring
active if the challenge succeeded just now, pending if it did not. One of "pending", "active".
verifiedboolean
verify_keysstring
Where the public keys that sign your deliveries are published. Fetch it, cache it, and look up the kid each Auray-Signature names. A URL rather than a key, because a copy handed back here would go stale the moment one is rotated — and free rotation is the point of the scheme. A URL.
signature_algorithmstring
How Auray-Signature is signed: Ed25519 over <t>.<raw body>, the header reading t=…,v2=…,kid=…. THERE IS NO SHARED SECRET — this response used to return secret (whsec_…) for an HMAC scheme, and the same bytes that verified a delivery could forge one. The private half of this key never leaves the deployment. One key signs for every account, so the body names who it is for, inside what the signature covers: account (your account id, the id GET /v1/me returns) and webhook_id (the endpoint, or null for a per-request ?webhook). Compare account with yours and refuse anything else. One of "EdDSA".
created_atstring
verificationobject
Present ONLY when the challenge failed — and the response is still a success, because the endpoint was registered; it is your server that did not answer.
Show child attributes
failedstring
Which check failed, in our words: outbound_paused (deliveries are paused on our side; nothing was sent), host_paused (deliveries to this host are paused for now; nothing was sent), challenge_not_stored (nothing was sent; try again), private_address (the name resolves to an address we never send to), unreachable (no answer: DNS, connection, TLS or timeout), refused (it answered, not 2xx — status says what), nonce_not_echoed (it answered 2xx without the nonce), activation_failed (it echoed, and the endpoint could not be switched on; try again). What your server said is never quoted back. One of "outbound_paused", "host_paused", "challenge_not_stored", "private_address", "unreachable", "refused", "nonce_not_echoed", "activation_failed".
statusinteger
The HTTP status your endpoint answered with, if it answered. May be null.
howstring
What to do about it, including the id to retry against.
request_idstring
Mirrored in the X-Request-Id header.

Headers:

HeaderDescription
RateLimit-LimitBurst capacity.
RateLimit-Remaining
RateLimit-ResetSeconds until refill.
X-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-ResetUnix seconds. The X- spelling is what client libraries read.
X-Request-Id

Was this page helpful?

Register an endpoint
curl -X POST https://api.auray.ai/v1/webhooks \
  -H "Authorization: Bearer $AURAY_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "url": "https://example.com/hooks/auray"
}'
{
  "id": "<string>",
  "object": "<string>",
  "url": "<string>",
  "products": "<string[]>",
  "status": "<string>",
  "verified": true,
  "verify_keys": "<string>",
  "signature_algorithm": "<string>",
  "created_at": "<string>",
  "verification": {
    "failed": "<string>",
    "status": 123,
    "how": "<string>"
  },
  "request_id": "<string>"
}

Use the up and down arrow keys to select a result, Enter to open it, and Escape to close search.