---
title: "Create a program"
method: POST
path: "/v1/programs"
tags: ["Programs"]
---

# Create a program

`POST /v1/programs`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/programs`
- Auth: HTTP bearer

Create a new program.

## Headers

- `Idempotency-Key` string

## Request body

- CreateProgramRequest: Creates a rewards program.
  - `description` string: Optional program description
  - `fulfillment_max_face_value_minor` integer: Maximum face value of one gift-card redemption, in fiat minor units. The cap is compared as a bare minor-unit number against a redemption in whatever currency the reward uses, because the program has no currency. Omit for no limit.
  - `fulfillment_mode` 'INSTANT' | 'ASYNC': Default redemption behavior when capture is omitted. Defaults to INSTANT.
  - `fulfillment_participant_max_amount_minor` integer: Maximum total face value per participant in the rolling period, in fiat minor units. The cap is compared as a bare minor-unit number against a redemption in whatever currency the reward uses, because the program has no currency. Counts the same order statuses as `fulfillment_participant_max_count`. Omit for no limit.
  - `fulfillment_participant_max_count` integer: Maximum gift-card redemptions per participant in the rolling period. Counts `PENDING`, `PROCESSING`, `AWAITING_FUNDS`, and `SUCCEEDED` orders. Omit for no limit.
  - `fulfillment_participant_window_seconds` integer: Rolling period, in seconds, used for each participant's gift-card limits. Required when either limit is set.
  - `name` string, required: The name of the rewards program. It must be unique in your organization.
  - `on_unknown_participant` 'CREATE' | 'REJECT': How to handle events for unregistered participants. Defaults to CREATE when absent or null; an explicit "" or any non-enum value is rejected.
  - `pending_redemption_ttl` string, nullable: Optional program-specific bound between 60 seconds and one year, such as `90d` or `720h`. Without a request or program bound, pending redemptions default to 90 days.

## Response `201`

Program created

- ProgramResponse: A rewards program: the container for assets, rules and participants.
  - `created_at` string, date-time: When the program was created
  - `deleted_at` string, date-time: Set when the program is archived
  - `description` string: Optional program description
  - `fulfillment_max_face_value_minor` integer: Maximum face value of one gift-card redemption, in fiat minor units. The cap is compared as a bare minor-unit number against a redemption in whatever currency the reward uses, because the program has no currency. Absent means unlimited.
  - `fulfillment_mode` 'INSTANT' | 'ASYNC': Default redemption behavior when capture is omitted
  - `fulfillment_participant_max_amount_minor` integer: Maximum total face value per participant in the rolling period, in fiat minor units. The cap is compared as a bare minor-unit number against a redemption in whatever currency the reward uses, because the program has no currency. Counts the same order statuses as `fulfillment_participant_max_count`. Absent means unlimited.
  - `fulfillment_participant_max_count` integer: Maximum gift-card redemptions per participant in the rolling period. Counts `PENDING`, `PROCESSING`, `AWAITING_FUNDS`, and `SUCCEEDED` orders. Absent means unlimited.
  - `fulfillment_participant_window_seconds` integer: Rolling period, in seconds, used for each participant's gift-card limits. Present only when at least one limit is set.
  - `id` string, uuid: The id of the program. Use it in `program_id` fields and paths.
  - `name` string: The name of the rewards program.
  - `on_unknown_participant` string: How events for unregistered participants are handled
  - `pending_redemption_ttl` string: Optional program-specific bound between 60 seconds and one year. Without a request or program bound, pending redemptions default to 90 days.
  - `redemption_target_entity_id` string, uuid: Ledger entity id of the group or program wallet that receives redeemed value. Present only when redemption_target_type is LEDGER_ENTITY.
  - `redemption_target_type` 'SYSTEM_REDEMPTION' | 'SYSTEM_BREAKAGE' | 'LEDGER_ENTITY': Where redeemed value is posted.
  - `status` 'ACTIVE' | 'SUSPENDED' | 'ARCHIVED': The rewards program's lifecycle state.
  - `updated_at` string, date-time: When the program was last modified

## Other responses

- `400`: Validation failed (code: validation_error | invalid_json)
- `401`: The API key is missing or not valid. See [Authentication](https://docs.scrip.dev/authentication).
- `403`: The caller is not allowed to do this.
- `409`: Program name conflict (code: program_name_already_exists)
- `422`: Pending redemption TTL or fulfillment cap window is invalid (code: fulfillment_window_too_short | fulfillment_window_too_long | fulfillment_cap_window_required | fulfillment_cap_window_too_long)
- `429`: Too many requests. Wait the number of seconds in the `Retry-After` header, then retry. See [Limits and durations](https://docs.scrip.dev/limits#rate-limits).
- `500`: Something failed on Scrip's side. Retry the request, and quote `request_id` if it keeps failing. [Errors](https://docs.scrip.dev/errors) lists every code, and the [API introduction](https://docs.scrip.dev/api-reference/introduction) describes the error format.

---

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