---
title: "Webhook URL refused — Anis Developers"
description: "The endpoint URL breaks the public URL rules."
url: https://developers.anis.ly/errors/webhook-endpoint-invalid/
language: en
---

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

[Error codes](https://developers.anis.ly/errors.md) · The request itself

# Webhook URL refused

- **Code:** `webhook_endpoint_invalid`
- **Status:** 422
- **If this was an order:** Never returned when buying
- **Send it again unchanged?** No — change something first
- **.NET SDK:** `AnisApiException with Code PartnerErrorCode.WebhookEndpointInvalid`

## What it means

The endpoint URL breaks the public URL rules.

## What to do

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

## Where you can meet it

- PUT [Set your webhook endpoint](https://developers.anis.ly/reference/set-webhook-endpoint.md) `/v1/webhook-endpoint`

## Example

The body of the refusal. Its `type` is the address of this page.

```
{
  "type": "https://developers.anis.ly/errors/webhook-endpoint-invalid",
  "title": "Webhook URL refused",
  "status": 422,
  "code": "webhook_endpoint_invalid",
  "requestId": "01J9R2K8T4V6XQ0M3B7C5D9E1F"
}
```
