---
title: "Set your webhook endpoint — Anis Developers"
description: "Register your application's HTTPS endpoint and complete its verification challenge before receiving outcomes."
url: https://developers.anis.ly/reference/set-webhook-endpoint/
language: en
---

> Every page of this documentation: https://developers.anis.ly/llms.txt

[API reference](https://developers.anis.ly/reference.md) · Webhooks

# Set your webhook endpoint

`PUT /v1/webhook-endpoint`

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

- **Permission:** None
- **Authentication:** Signed change
- **Anis’s answer:** Signed
- **Staff-set limits it counts toward:** All 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](#type-setwebhookendpointrequest), as JSON.

| Field | Type | Notes |
| --- | --- | --- |
| `url` (required) | 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](#type-webhookendpoint) |
| 400 | Refused: the signed request is badly built. | [Problem](#refusals) |
| 401 | Refused: not authenticated. | [Problem](#refusals) |
| 403 | Refused: not allowed. | [Problem](#refusals) |
| 404 | Refused: not found, or not yours. | [Problem](#refusals) |
| 409 | Refused: conflicts with the current state. | [Problem](#refusals) |
| 422 | Refused: the request breaks a rule. | [Problem](#refusals) |
| 429 | Refused: a limit was reached. | [Problem](#refusals) |
| 503 | No decision: a dependency was unavailable. | [Problem](#refusals) |

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](https://developers.anis.ly/docs/verifying-answers.md)).

## 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](https://developers.anis.ly/errors/invalid-credentials.md) | `invalid_credentials` | 401 |
| [Malformed signed request](https://developers.anis.ly/errors/malformed-signed-request.md) | `malformed_signed_request` | 400 |
| [Insufficient scope](https://developers.anis.ly/errors/insufficient-scope.md) | `insufficient_scope` | 403 |
| [Source address not allowed](https://developers.anis.ly/errors/source-ip-not-allowed.md) | `source_ip_not_allowed` | 403 |
| [Rate limited](https://developers.anis.ly/errors/rate-limited.md) | `rate_limited` | 429 |
| [Validation failed](https://developers.anis.ly/errors/validation-failed.md) | `validation_failed` | 422 |
| [Service unavailable](https://developers.anis.ly/errors/dependency-unavailable.md) | `dependency_unavailable` | 503 |
| [Request timeout](https://developers.anis.ly/errors/request-timeout.md) | `request_timeout` | 504 |
| [Internal error](https://developers.anis.ly/errors/internal-error.md) | `internal_error` | 500 |
| [Replay detected](https://developers.anis.ly/errors/replay-detected.md) | `replay_detected` | 409 |
| [Not found](https://developers.anis.ly/errors/resource-not-found.md) | `resource_not_found` | 404 |
| [Webhook URL refused](https://developers.anis.ly/errors/webhook-endpoint-invalid.md) | `webhook_endpoint_invalid` | 422 |

## Types

### SetWebhookEndpointRequest

| Field | Type | Notes |
| --- | --- | --- |
| `url` (required) | 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 |
| --- | --- | --- |
| `url` (required) | string | Your application's registered HTTPS endpoint; null when not configured. |
| `status` (required) | [WebhookEndpointStatus](#type-webhookendpointstatus) | notConfigured, pendingVerification, verified or disabled. A disabled endpoint receives no deliveries. |
| `generation` (required) | integer | The registration generation echoed in the verification challenge; null when not configured. |

### WebhookEndpointStatus
