# PATCH /darkcrawl/v1/channels/{channel_id}

> Change a channel. Only the fields you send change.

PATCH `/darkcrawl/v1/channels/{channel_id}`

**Authentication:** your key as a [bearer token](https://darkcrawl.dev/docs/api-reference/authentication/).

## Path parameters

| Field        | Type     | Required | Default |
| ------------ | -------- | -------- | ------- |
| `channel_id` | `string` | Required |         |

## Body

| Field           | Type               | Required | Default |
| --------------- | ------------------ | -------- | ------- |
| `digestMinutes` | `integer \| null`  | Optional |         |
| `enabled`       | `boolean \| null`  | Optional |         |
| `includeText`   | `boolean \| null`  | Optional |         |
| `name`          | `string \| null`   | Optional |         |
| `recipients`    | `string[] \| null` | Optional |         |
| `url`           | `string \| null`   | Optional |         |

## Request

**curl**

```bash
curl -X PATCH https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID \
  -H "Authorization: Bearer $DARKCRAWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"enabled":false,"digestMinutes":15}'
```

**Python**

```python
import os
import requests

resp = requests.patch(
    "https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID",
    headers={"Authorization": "Bearer " + os.environ["DARKCRAWL_API_KEY"]},
    json={
        "enabled": False,
        "digestMinutes": 15,
    },
    timeout=330,
)
print(resp.json())
```

**Node**

```javascript
const resp = await fetch("https://api.darkcrawl.dev/darkcrawl/v1/channels/CHANNEL_ID", {
  method: "PATCH",
  headers: {
    Authorization: "Bearer " + process.env.DARKCRAWL_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "enabled": false,
    "digestMinutes": 15
  }),
  signal: AbortSignal.timeout(330000),
});
console.log(await resp.json());
```

## Response

Status `200`.

```json
{
  "id": "01K0EXAMPLECHANNEL0000000A",
  "name": "Ops webhook",
  "kind": "webhook",
  "urlHint": "https://hooks.example.com/…rawl",
  "secretHint": "whsec_…LE0=",
  "recipients": [],
  "digestMinutes": 15,
  "includeText": false,
  "enabled": false,
  "createdAt": "2026-11-26T10:00:00.000000+00:00",
  "updatedAt": "2026-11-26T10:00:00.000000+00:00",
  "lastDeliveryAt": null,
  "lastError": null
}
```

## Errors

| Code                    | Status |
| ----------------------- | ------ |
| `BAD_REQUEST`           | 400    |
| `NOT_FOUND`             | 404    |
| `BLOCKLIST_UNAVAILABLE` | 503    |
| `SECRETS_UNAVAILABLE`   | 503    |

What each code means, and what to do about it: [Errors](https://darkcrawl.dev/docs/api-reference/errors/).

## Notes

- An email channel has no `url`, and only an email channel has `recipients`: sending the wrong one is `400 BAD_REQUEST`.
- A disabled channel's deliveries wait and age. Turn it on again, or send a new `url`, and the waiting ones go.
- An unknown id, and another company's channel, answer `404 NOT_FOUND`.
