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

# Update Domain Ceiling

> Set or clear the voluntary per-domain daily sending ceiling.

Set a static daily cap on one custom domain. The ceiling never auto-adjusts — only this endpoint (or the console) changes it.

### Body

<ParamField body="dailyCap" type="integer | null" required>
  Emails this domain may send per UTC day, 1–1,000,000. `null` removes the ceiling (plan and workspace caps still apply).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.gork.email/v1/domains/dom_728af980b4e \
    -H "Authorization: Bearer gork_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"dailyCap": 500}'
  ```

  ```typescript TypeScript theme={null}
  import { Gork } from "@gork/sdk"

  // No SDK helper — call the endpoint directly.
  await fetch("https://api.gork.email/v1/domains/dom_728af980b4e", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.GORK_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ dailyCap: 500 }),
  })
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "dom_728af980b4e",
      "domainName": "mail.example.com",
      "dailyCap": 500,
      "todayUsed": 34,
      "resetsAt": "2026-09-24T00:00:00.000Z",
      "note": null
    }
  }
  ```
</ResponseExample>

`todayUsed` and `resetsAt` are always returned so you can warn before the ceiling bites. When the new ceiling is already exhausted today, `note` explains that sends pause until the reset:

```json theme={null}
{
  "data": {
    "dailyCap": 20,
    "todayUsed": 34,
    "resetsAt": "2026-09-24T00:00:00.000Z",
    "note": "Ceiling is already exhausted today (34 of 20 sent) — sends from this domain pause until the UTC midnight reset."
  }
}
```

Sends past the ceiling fail with `429 domain_daily_cap_reached` (with `Retry-After`, `X-Domain-Limit`, and `X-Domain-Used` headers) — see [Errors](/errors) and [Deliverability](/guides/deliverability).

| Code                | HTTP | Meaning                                               |
| ------------------- | ---- | ----------------------------------------------------- |
| `validation_failed` | 400  | `dailyCap` is not a whole number 1–1,000,000 or null. |
| `domain_not_found`  | 404  | No domain with this ID exists in your organization.   |
