---
title: "Preview the next window of a draft recurring schedule"
method: POST
path: "/micro-challenges/preview-window"
tags: ["Campaign Content & Challenges"]
---

# Preview the next window of a draft recurring schedule

`POST /micro-challenges/preview-window`

Resolves a draft weekly schedule (`start_dow`/`start_time` → `end_dow`/`end_time`, day 0 = Monday) against the shop's timezone and returns the next concrete window it would produce — so a caller can confirm the window before creating a template.

Shop-scoped, NOT campaign-nested: the create flow has no campaign yet when the schedule is being drafted. The shop comes from `x-shop-id`; a `shop_id` in the body is ignored.

Writes nothing, but gated on `read_write` scope as the first step of the micro-challenge create flow. No `Idempotency-Key` needed.

## Request body

- PreviewWindowRequest — POST /micro-challenges/preview-window -- draft schedule preview. The FE posts its whole request object (which also carries ``shop_id``, read from the query param) as the body — ``shop_id`` is declared so the body validates; it is not used here.
  - `shop_id` integer, nullable
  - `start_dow` integer, required
  - `start_time` string, time, required
  - `end_dow` integer, required
  - `end_time` string, time, required

## Response `200`

Successful Response

- unknown

## Other responses

- `400` — Validation error, multi-shop key, or missing `Idempotency-Key`.
- `403` — API key lacks `read_write` scope (`WRITE_NOT_PERMITTED`).
- `404` — Campaign / template / job not in this shop.
- `409` — Campaign results are final, campaign is LIVE-scored, template cap reached, or `Idempotency-Key` conflict.
- `422` — Validation Error
- `429` — Write-tier rate limit (10/min, 50/hr, 100/day) exceeded.

---

[API](https://skmtc.dev/reacherapp/apis/reacher-data-api.md) · [All operations](https://skmtc.dev/reacherapp/apis/reacher-data-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/reacherapp/reacher-data-api/revisions/5eefff009b5b/schema)
