> For a complete page index of the Captain API documentation, fetch https://docs.filesearch.dev/llms.txt?excludeSpec=true

# Subscribe Webhook

POST https://api.filesearch.dev/v2/datasets/odyssey/webhooks/subscribe
Content-Type: application/json

Register a watchlist webhook (legacy path; see also POST /subscriptions).

Reference: https://docs.filesearch.dev/reference/datasets/odyssey/feed/subscribe-webhook

## Request

### Body (application/json)

This endpoint expects a SubscribeRequest.

- `callback_url` (string, required) — HTTPS URL to POST watchlist.match events to
- `watchlist_domains` (list of string, required) — domains to watch, e.g. ['stripe.com']
- `feeds` (list of string, optional, nullable) — subset of ['events','publications']; default both
- `secret` (string, optional, nullable) — HMAC-SHA256 signing secret (write-only; never echoed back)

## Response

### 200

Successful Response

- `id` (string, required)
- `callback_url` (string, required)
- `watchlist_count` (integer, required)
- `feeds` (list of string, required)
- `status` (string, required)
- `created_at` (string, required)

## Examples

**Request**

```json
{
  "callback_url": "https://example.com/captain/webhook",
  "watchlist_domains": [
    "stripe.com",
    "ramp.com"
  ],
  "feeds": [
    "events"
  ],
  "secret": "whsec_9f8e7d6c5b4a"
}
```

**Response**

```json
{
  "id": "whk_359f81118ef84127a1c6",
  "callback_url": "https://example.com/captain/webhook",
  "watchlist_count": 2,
  "feeds": [
    "events"
  ],
  "status": "active",
  "created_at": "2026-06-03T15:21:03Z"
}
```

**SDK Code**

```python Python REST
import requests

BASE_URL = "https://api.filesearch.dev"
API_KEY = "your_api_key"

headers = {"Authorization": f"Bearer {API_KEY}"}

response = requests.post(
    f"{BASE_URL}/v2/datasets/odyssey/webhooks/subscribe",
    headers=headers,
    json={"callback_url": "https://example.com/captain/webhook", "watchlist_domains": ["stripe.com", "ramp.com"], "feeds": ["events"], "secret": "whsec_9f8e7d6c5b4a"},
    timeout=60.0
)
print(response.json())
```

```typescript TypeScript REST
const BASE_URL = "https://api.filesearch.dev";
const API_KEY = "your_api_key";

const response = await fetch(`${BASE_URL}/v2/datasets/odyssey/webhooks/subscribe`, {
    method: "POST",
    headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({"callback_url": "https://example.com/captain/webhook", "watchlist_domains": ["stripe.com", "ramp.com"], "feeds": ["events"], "secret": "whsec_9f8e7d6c5b4a"})
});
console.log(await response.json());
```