# Register a webhook endpoint

> For the complete documentation index, see [llms.txt](https://www.shortsintel.com/llms.txt). Every docs page is also available as markdown: add .md to its URL. To connect, read [agents.md](https://www.shortsintel.com/agents.md).

POST `/v1/webhooks`

Registers an endpoint and immediately proves it with a signed `webhook.test` event.

- Status: `active` when the test got a 2xx, else `failed`. A failed endpoint receives no events until deleted and re-registered.
- Secret: the `secret` appears in this response and nowhere else, ever.
- Access: Owner or admin only: a MEMBER's key or connection gets 403 `forbidden`.

## Price

Free.

## Request body

`application/json`

object

- `url` string required format `uri` HTTPS only; private ranges are refused.
- `description` string A label of your own for the endpoint, returned on reads; trimmed and cut to 200 characters. Events do not carry it.

## Responses

### 201 Created

`{ webhook, secret, test_delivery }`.

object

- `webhook` object required
  - `id` string required
  - `url` string required
  - `status` string required one of `pending`, `active`, `failed`, `disabled`
  - `description` string required nullable
  - `secret_prefix` string required The first characters of the signing secret, to tell two apart.
  - `previous_secret_expires_at` string required nullable
  - `created_at` string required
  - `activated_at` string required nullable
  - `last_delivery_at` string required nullable
- `secret` string required Shown once, here and nowhere else. Store it now.
- `test_delivery` object required The signed `webhook.test` event that decided activation.
  - `id` string required
  - `event_id` string required Stable across replays, so a receiver can de-duplicate.
  - `event_type` string required one of `run.completed`, `tracker.changed`, `webhook.test`
  - `status` string required one of `pending`, `delivered`, `failed`
  - `attempts` integer required
  - `response_status` integer required nullable
  - `error` string required nullable
  - `run_id` string required nullable
  - `tracker_id` string required nullable
  - `change_report_id` string required nullable
  - `replay_of` string required nullable
  - `created_at` string required
  - `last_attempt_at` string required nullable
  - `delivered_at` string required nullable
  - `failed_at` string required nullable

### 400 Bad Request

`invalid_request` for http, private ranges or an unresolvable host.

Code: `invalid_request`. The problem body and every code are on [Errors](https://www.shortsintel.com/docs/reference/errors).

### 401 Unauthorized

Codes: `missing_authorization`, `invalid_key`, `key_revoked`, `key_expired`, `invalid_token`. The problem body and every code are on [Errors](https://www.shortsintel.com/docs/reference/errors).

### 403 Forbidden

`forbidden` — the key's or connection's user is a MEMBER; only an owner or admin manages webhooks.

Code: `forbidden`. The problem body and every code are on [Errors](https://www.shortsintel.com/docs/reference/errors).

### 409 Conflict

`webhook_limit_exceeded` at 5 endpoints.

Code: `webhook_limit_exceeded`. The problem body and every code are on [Errors](https://www.shortsintel.com/docs/reference/errors).

## Related guides

- [Webhooks](https://www.shortsintel.com/docs/concepts/webhooks): The events we send, how to verify a signature, what happens when your endpoint is down, and how to rotate a secret.

## Request samples

curl:

```bash
curl -X POST "https://www.shortsintel.com/v1/webhooks" \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/hooks/shortsintel","description":"Production listener"}'
```

TypeScript:

```typescript
const response = await fetch(
  "https://www.shortsintel.com/v1/webhooks",
  {
    method: "POST",
    headers: {
      "Authorization": "Bearer sk_live_YOUR_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "url": "https://example.com/hooks/shortsintel",
      "description": "Production listener"
    }),
  },
);

if (!response.ok) {
  throw new Error(`ShortsIntel ${response.status}`);
}

const data = await response.json();
```

Python:

```python
import requests

response = requests.post(
    "https://www.shortsintel.com/v1/webhooks",
    headers={
        "Authorization": "Bearer sk_live_YOUR_KEY",
        "Content-Type": "application/json",
    },
    json={
        "url": "https://example.com/hooks/shortsintel",
        "description": "Production listener",
    },
)
response.raise_for_status()

data = response.json()
```

201 · `{ webhook, secret, test_delivery }`.

```json
{
  "webhook": {
    "id": "whe_6d2f10ab44",
    "url": "https://hooks.example.com/shortsintel",
    "status": "active",
    "description": "production receiver",
    "secret_prefix": "whsec_a1b2c3",
    "previous_secret_expires_at": null,
    "created_at": "2026-09-08T09:14:02.418Z",
    "activated_at": "2026-09-08T09:14:03.006Z",
    "last_delivery_at": "2026-09-08T09:14:03.006Z"
  },
  "secret": "whsec_9Qk3Tn7f2xLd0aZmVbYpRc8sHu6WjEg4",
  "test_delivery": {
    "id": "whd_51c8b0f7e3",
    "event_id": "evt_kZ8Qw3n1TfLd0aZmVbYpRc",
    "event_type": "webhook.test",
    "status": "delivered",
    "attempts": 1,
    "response_status": 200,
    "error": null,
    "run_id": null,
    "tracker_id": null,
    "change_report_id": null,
    "replay_of": null,
    "created_at": "2026-09-08T09:14:02.911Z",
    "last_attempt_at": "2026-09-08T09:14:03.006Z",
    "delivered_at": "2026-09-08T09:14:03.006Z",
    "failed_at": null
  }
}
```

[Next List webhook endpoints](https://www.shortsintel.com/docs/reference/webhooks/list-webhooks)
