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

# Set Frequency Cap

> Limit how many marketing emails one contact receives

Set or replace your company frequency cap. It applies from the next email step
onward in sequences with `frequencyCapEnabled`; turn that on with
[Create Sequence](/api-reference/sequences/create) or
[Update Sequence](/api-reference/sequences/update). Sequences that don't opt in
are never capped.

Emails already sent or queued in the window count, so a new cap can skip the
next step for contacts who were recently emailed.

Requires the `companies:manage` scope and owner or admin access.

## Request

```bash theme={null}
curl -X PUT "https://api.sequenzy.com/api/v1/frequency-cap" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "maxEmails": 1, "windowHours": 16 }'
```

## Body

<ParamField body="maxEmails" type="integer" required>
  Most marketing emails one contact may receive in the window, from 1 to 50.
</ParamField>

<ParamField body="windowHours" type="integer" required>
  Rolling window in hours, from 1 to 168.
</ParamField>

## Response fields

<ResponseField name="frequencyCap" type="object">
  The saved cap, with `maxEmails` and `windowHours`.
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "frequencyCap": {
      "maxEmails": 1,
      "windowHours": 16
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "maxEmails must be an integer from 1 to 50"
  }
  ```

  ```json 403 theme={null}
  {
    "error": "You have view-only access to this company. Contact the owner to request edit permissions."
  }
  ```
</ResponseExample>

A `400` is returned when either field is missing, not a whole number or out of
range. Nothing is saved, so fix the value and retry.
