# Endpoints

A customer's webhook URL, with the event types it subscribes to and its own signing secret.

An endpoint is a URL one of your customers receives webhooks on. It belongs to a customer, subscribes to a list of event types, and has its own signing secret, status and delivery history. Each endpoint has its own queue, so a slow or broken one never delays another.

## Create an endpoint

```bash
curl -X POST https://api.getensue.com/v1/dispatch/customers/acme/endpoints \
  -H "authorization: Bearer ens_<key>" -H "content-type: application/json" \
  -d '{
    "url": "https://acme.example.com/hooks",
    "description": "Production",
    "event_types": ["order.shipped", "order.refunded"]
  }'
```

| Field | Notes |
|---|---|
| `url` | An HTTPS URL. Ensue refuses URLs that would loop back into itself. |
| `event_types` | The types to deliver. Leave out for all (`["*"]`: every active and deprecated type). Archived types are not delivered. |
| `description` | Up to 200 characters. |
| `status` | `active` or `paused`. |

The response includes the **signing secret**, `whsec_…`, once. A customer can have up to 20 endpoints.

## Signing secrets

Every endpoint has its own secret. Retrieve it again with `GET /v1/dispatch/endpoints/:id/secret` and give it to your customer; they use it to [verify signatures](/dispatch/verify-signatures/).

### Rotate a secret

`POST /v1/dispatch/endpoints/:id/rotate-secret` creates a new secret. For the next **24 hours** the previous secret keeps signing too, and each delivery carries both signatures, so a customer can switch over at their own pace without rejecting a single webhook. Any Standard Webhooks library accepts a request when **any** of the signatures matches.

## Change and pause

- `PATCH /v1/dispatch/endpoints/:id` changes the URL, event types, description or status.
- Set `status` to `paused` to hold deliveries to an endpoint while the customer fixes something. Nothing is lost and nothing is retried while paused.
- A new URL closes an open [circuit breaker](/gateway/circuit-breaker/).

## Disabled endpoints

An endpoint that keeps failing is stopped by its circuit breaker rather than retried forever. When the customer has fixed their server, re-enable it and resend what it missed with [recover](/dispatch/retries-and-recovery/#recover-an-endpoint).

## Endpoints in the dashboard

**Customers** lists each customer with their endpoints and health. Open a customer to see their endpoints, subscriptions and recent deliveries, send a test event, rotate a secret or pause an endpoint.

> [!TIP]
> One endpoint per environment (production, staging) is easier to reason about than one endpoint with many event types: you can pause one without touching the other.