API reference · Webhooks
Set your webhook endpoint
PUT
/v1/webhook-endpointRegister 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 SDK
anis.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.
| Field | Type | Notes |
|---|---|---|
urlrequired | string | Use HTTPS on port 443 with a public host name that contains a dot, no user-info or fragment, and at most 2048 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | Success. | WebhookEndpoint |
| 400 | Refused: the signed request is badly built. | Problem |
| 401 | Refused: not authenticated. | Problem |
| 403 | Refused: not allowed. | Problem |
| 404 | Refused: not found, or not yours. | Problem |
| 409 | Refused: conflicts with the current state. | Problem |
| 422 | Refused: the request breaks a rule. | Problem |
| 429 | Refused: a limit was reached. | Problem |
| 503 | No 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.
| Error | Code | Status |
|---|---|---|
| Invalid credentials | invalid_credentials | 401 |
| Malformed signed request | malformed_signed_request | 400 |
| Insufficient scope | insufficient_scope | 403 |
| Source address not allowed | source_ip_not_allowed | 403 |
| Rate limited | rate_limited | 429 |
| Validation failed | validation_failed | 422 |
| Service unavailable | dependency_unavailable | 503 |
| Request timeout | request_timeout | 504 |
| Internal error | internal_error | 500 |
| Replay detected | replay_detected | 409 |
| Not found | resource_not_found | 404 |
| Webhook URL refused | webhook_endpoint_invalid | 422 |
Types
SetWebhookEndpointRequest
| Field | Type | Notes |
|---|---|---|
urlrequired | string | Use HTTPS on port 443 with a public host name that contains a dot, no user-info or fragment, and at most 2048 characters. |
WebhookEndpoint
| Field | Type | Notes |
|---|---|---|
urlalways present | string | Your application's registered HTTPS endpoint; null when not configured. |
statusalways present | WebhookEndpointStatus | notConfigured, pendingVerification, verified or disabled. A disabled endpoint receives no deliveries. |
generationalways present | integer | The registration generation echoed in the verification challenge; null when not configured. |