> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archiveorder.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook endpoints

> Create, list, and delete webhook endpoints.

## `GET /webhook-endpoints`

Lists webhook endpoints configured for the API client.

Required scope: `webhooks:read`

```bash theme={null}
curl "$ARCHIVE_ORDER_BASE_URL/webhook-endpoints" \
  -H "Authorization: Bearer $ARCHIVE_ORDER_API_KEY"
```

Response:

```json theme={null}
[
  {
    "id": "whend_123",
    "url": "https://example.com/archive-order/webhook",
    "status": "active",
    "createdAt": "2026-06-18T12:00:00Z",
    "updatedAt": "2026-06-18T12:00:00Z"
  }
]
```

## `POST /webhook-endpoints`

Creates a webhook endpoint.

Required scope: `webhooks:write`

Request body:

```json theme={null}
{
  "url": "https://example.com/archive-order/webhook",
  "signingSecret": "optional-caller-supplied-secret"
}
```

If `signingSecret` is omitted, the API generates one.

Response:

```json theme={null}
{
  "id": "whend_123",
  "signingSecret": "2a18bb7d996643728aa0cc77162f9efb"
}
```

## `DELETE /webhook-endpoints/{endpointId}`

Marks a webhook endpoint as deleted.

Required scope: `webhooks:write`

```bash theme={null}
curl -X DELETE "$ARCHIVE_ORDER_BASE_URL/webhook-endpoints/whend_123" \
  -H "Authorization: Bearer $ARCHIVE_ORDER_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response:

```json theme={null}
{
  "success": true
}
```
