---
title: "Create a reward source"
method: POST
path: "/v1/programs/{program_id}/reward-sources"
tags: ["Reward Sources"]
---

# Create a reward source

`POST /v1/programs/{program_id}/reward-sources`

## Request

- Base URL: `https://api.scrip.dev`
- URL: `https://api.scrip.dev/v1/programs/{program_id}/reward-sources`
- Auth: HTTP bearer

Add a fulfillment account's gift cards to a program's rewards catalog, priced in one of the program's assets.

## Path parameters

- `program_id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- CreateRewardSourceRequest: Connects a program to a fulfillment account so its gift-card catalog can back rewards.
  - `asset_id` string, uuid, required: Asset participants pay with (must be linked to the program)
  - `category_filter` string[]: Under ALL, include only these categories (GIFT_CARD, PREPAID_CARD, CHARITY)
  - `country_filter` string[]: Under ALL, include only products available in these countries
  - `default_rate` string, required: Asset units per currency minor unit of face value (decimal string)
  - `fulfillment_account_id` string, uuid, required: Fulfillment account whose products populate the program catalog
  - `policy` string: Product selection: MANUAL (default) or ALL

## Response `201`

Created reward source

- RewardSourceResponse: A reward source: a program's link to a fulfillment account, with the rules for which products it offers.
  - `asset_id` string, uuid: Asset participants spend on these rewards
  - `category_filter` string[]: ALL-policy category filter (null = no filter)
  - `country_filter` string[]: ALL-policy country filter (null = no filter)
  - `created_at` string, date-time: When the reward source was created (RFC 3339)
  - `default_rate` string: Asset units per currency minor unit of face value (decimal string)
  - `fulfillment_account_id` string, uuid: Fulfillment account supplying these products
  - `id` string, uuid: The id of the reward source. Use it in `reward_source_id` fields and paths.
  - `policy` string: Product selection: MANUAL (nothing until products are enabled) or ALL
  - `program_id` string, uuid: Program this source belongs to
  - `status` 'ACTIVE' | 'ARCHIVED': The reward source's lifecycle state: ACTIVE or ARCHIVED.
  - `updated_at` string, date-time: When the reward source was last modified (RFC 3339)

## Other responses

- `400`: Validation failed (code: validation_error | invalid_rate | invalid_policy)
- `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.
- `404`: Program, fulfillment account, or asset not found (code: program_not_found | fulfillment_account_not_found | asset_not_found)
- `409`: A live reward source already exists for this program, account, and asset (code: reward_source_exists)
- `422`: Malformed country filter value (code: invalid_country | asset_not_linked)
- `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)
