API reference · Webhooks

Set your webhook endpoint

PUT/v1/webhook-endpoint

Register your application's HTTPS endpoint and complete its verification challenge before receiving outcomes.

PermissionNone
AuthenticationSigned change
Anis’s answerSigned
Staff-set limits it counts towardAll requests
.NET SDKanis.WebhookEndpoint.SetAsync(request)
  • Sign the body digest with a fresh nonce, without an Idempotency-Key. This change creates no purchase.

Request

Signed with your key, with a one-time nonce and a digest of the body.

Headers: Signature-Input, Signature, Content-Digest, Nonce, X-Anis-Date, Accept-Language (optional). The SDKs set all of them for you.

Body: SetWebhookEndpointRequest, as JSON.

FieldTypeNotes
urlrequiredstringUse HTTPS on port 443 with a public host name that contains a dot, no user-info or fragment, and at most 2048 characters.

Responses

StatusMeaningBody
200Success.WebhookEndpoint
400Refused: the signed request is badly built.Problem
401Refused: not authenticated.Problem
403Refused: not allowed.Problem
404Refused: not found, or not yours.Problem
409Refused: conflicts with the current state.Problem
422Refused: the request breaks a rule.Problem
429Refused: a limit was reached.Problem
503No decision: a dependency was unavailable.Problem

Every answer of this call is signed by Anis — success and every refusal. Require the signature and verify it before you act on the answer; an answer without one is a failure, never an answer (how).

Refusals

Every refusal of this call is a signed problem. Branch on its code; each links to what it means and what to do.

ErrorCodeStatus
Invalid credentialsinvalid_credentials401
Malformed signed requestmalformed_signed_request400
Insufficient scopeinsufficient_scope403
Source address not allowedsource_ip_not_allowed403
Rate limitedrate_limited429
Validation failedvalidation_failed422
Service unavailabledependency_unavailable503
Request timeoutrequest_timeout504
Internal errorinternal_error500
Replay detectedreplay_detected409
Not foundresource_not_found404
Webhook URL refusedwebhook_endpoint_invalid422

Types

SetWebhookEndpointRequest

FieldTypeNotes
urlrequiredstringUse HTTPS on port 443 with a public host name that contains a dot, no user-info or fragment, and at most 2048 characters.

WebhookEndpoint

FieldTypeNotes
urlalways presentstringYour application's registered HTTPS endpoint; null when not configured.
statusalways presentWebhookEndpointStatusnotConfigured, pendingVerification, verified or disabled. A disabled endpoint receives no deliveries.
generationalways presentintegerThe registration generation echoed in the verification challenge; null when not configured.

WebhookEndpointStatus