---
title: "Create a micro-challenge on a campaign"
method: POST
path: "/campaigns/{campaign_id}/micro-challenges"
tags: ["Campaign Content & Challenges"]
---

# Create a micro-challenge on a campaign

`POST /campaigns/{campaign_id}/micro-challenges`

## Request

- Base URL: `https://api.reacherapp.com/public/v1`
- URL: `https://api.reacherapp.com/public/v1/campaigns/{campaign_id}/micro-challenges`
- Auth: API key in header `x-api-key` and API key in header `x-shop-id`

Creates a micro-challenge ('weekend blitz') under a parent Leaderboard (contest) campaign — a short scoring window with its own pricing and its own board.

Two shapes, discriminated by `schedule.mode`:
* `one_off` — an explicit `start_at`/`end_at` window (shop-local); materializes an instance immediately.
* `recurring` — a weekly window (`start_dow`/`start_time` → `end_dow`/`end_time`, day 0 = Monday, shop-local); creates a TEMPLATE that the daily materializer turns into instances. Use `POST /micro-challenges/preview-window` to see the next window a draft recurring schedule would produce.

Rejected when the parent isn't a running contest campaign, when it is itself a micro-challenge (no nesting), or when the parent already has the maximum number of ACTIVE templates (409).

Requires `read_write` scope and an `Idempotency-Key`; `X-Dry-Run: true` validates the shop/campaign and echoes the payload without creating anything.

## Path parameters

- `campaign_id` integer, required

## Headers

- `Idempotency-Key` string, nullable
- `X-Dry-Run` string, nullable

## Request body

- MicroChallengeCreate: POST body for a new micro-challenge (one-off or recurring).
  - `name` string, required
  - `schedule` union, required
    - MicroScheduleOneOff: A single explicit window (shop-local datetimes).
      - `mode` 'one_off'
      - `start_at` string, date-time, required
      - `end_at` string, date-time, required
    - MicroScheduleRecurring: A weekly recurring window. Day-of-week is 0=Mon..6=Sun; times are shop-local (the shop's timezone is resolved and stored at save time).
      - `mode` 'recurring'
      - `start_dow` integer, required
      - `start_time` string, time, required
      - `end_dow` integer, required
      - `end_time` string, time, required
  - `pricing` LeaderboardPricing, required: Pricing configuration for leaderboard campaigns. Extra keys are IGNORED (the codebase default, matching every sibling pricing class): the brand FE sends UI-only toggles like ``minimum_gmv_required_enabled`` that are not modelled here. The smuggling protection the materializer needs comes from re-parsing the stored template pricing through this model, which drops unknown keys so they never reach a materialized instance — not from ``extra="forbid"``, which would break the live create/edit path.
    - `campaign_type` 'leaderboard'
    - `leaderboard_ranks` LeaderboardRank[], required: At least one rank required
      - `rank` integer, required: Rank position (1-indexed)
      - `reward` union, required: Reward for this rank
        - number
        - string
    - `reward_type` 'cash' | 'custom', required: Cash or custom reward
    - `metric_type` 'gmv' | 'views' | 'videos_posted' | 'gmv_videos' | 'live_gmv' | 'gmv_and_live_gmv' | 'videos_gmv_and_live_gmv': Performance metric to evaluate
    - `scoring_mode` 'single' | 'weighted': Rank by a single metric or by a weighted composite score
    - `weighted_metrics` WeightedMetricItem[], nullable: Metric weights (must sum to 100) when scoring_mode is weighted
      - `metric_type` 'gmv' | 'avg_views_per_post' | 'views' | 'videos_posted' | 'units_sold' | 'live_gmv' | 'combined_gmv' | 'sessions', required: Metrics that can carry a weight in a weighted leaderboard. ``live_gmv`` is campaign-product-scoped LIVE GMV and ``combined_gmv`` is video GMV + that LIVE GMV as one dollar figure; a campaign weighting either must define ``product_ids`` (validated in LeaderboardPricing).
      - `weight` integer, required
    - `minimum_gmv_required` number, nullable: Minimum GMV threshold (when metric includes gmv)
    - `minimum_views_required` integer, nullable: Minimum views threshold (when metric is views)
    - `minimum_videos_required` integer, nullable: Minimum videos floor (gmv_videos gate; ranking stays by GMV)
    - `minimum_live_gmv_required` number, nullable: Minimum LIVE GMV floor (when metric is live_gmv)
    - `minimum_sessions_required` integer, nullable: Minimum LIVE sessions floor (weighted gate on a sessions weight)
  - `excluded_creator_ids` integer[]

## 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 (paid, or a format that can't be recalculated), 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.dev/reacherapp/apis/reacher-data-api/revisions/3ae6befa75df?raw)
