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

# Frequency Caps API

> Define rolling-window send limits per contact — "no more than 3 SMS per day per contact". Enforced inside the message send pipeline.

# Frequency Caps API

Define rolling-window limits on how often a single contact can be messaged. Enforcement happens inside `messages.service.sendMessage` against Redis sorted sets — sends that would exceed the cap return a `FREQUENCY_CAP_EXCEEDED` error and don't dispatch.

**Base path:** `/api/v1/frequency-caps`

**Authentication:** API key (`X-API-Key`) or session JWT.

| Method   | Path                          | Purpose       |
| -------- | ----------------------------- | ------------- |
| `GET`    | `/api/v1/frequency-caps/`     | List rules    |
| `POST`   | `/api/v1/frequency-caps/`     | Create a rule |
| `GET`    | `/api/v1/frequency-caps/{id}` | Get a rule    |
| `PATCH`  | `/api/v1/frequency-caps/{id}` | Update a rule |
| `DELETE` | `/api/v1/frequency-caps/{id}` | Delete a rule |

## Example — cap marketing SMS at 3 per day per contact

```bash theme={null}
curl -X POST https://api.orbit.devotel.io/api/v1/frequency-caps/ \
  -H "X-API-Key: dv_live_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "sms",
    "applies_to_categories": ["marketing"],
    "max_count": 3,
    "window_seconds": 86400
  }'
```

Transactional messages (OTPs, receipts) typically bypass caps via the `category: "transactional"` tag on the send request.

## See also

* [Messaging API → categories](/api-reference/endpoints/messaging)
* [Compliance → opt-out](/api-reference/endpoints/contacts) — opt-out is enforced regardless of caps
