---
title: "Schedule Gaps"
method: GET
path: "/admin/campaigns/schedule-gaps"
tags: ["admin", "campaigns"]
---

# Schedule Gaps

`GET /admin/campaigns/schedule-gaps`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/campaigns/schedule-gaps`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Day × Org × Campaign gaps: campaigns expected to send but with no send that day.

A gap is a past org-local day a campaign was live + CRON-scheduled + its cron fired,
yet produced no ``campaign_send`` row. Historical active/cron state is reconstructed
from ``agent.edit_log``. Cross-org by default; pass ``organization_id`` to scope. Same
default-7-day window + 31-day cap as ``sends-by-day``. Only past complete days are
evaluated — the current day is never flagged.

## Query parameters

- `organization_id` string, nullable
- `start_date` string, date, nullable
- `end_date` string, date, nullable

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Response `200`

Successful Response

- CampaignScheduleGapRow[]
  - `day` string, date, required
  - `organization_id` string, required
  - `organization_name` string, nullable
  - `campaign_id` string, required
  - `campaign_slug` string, required
  - `cron_schedule` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/cce8b07a5787?raw)
