> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrip.dev/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Before planning an integration, read https://docs.scrip.dev/which-endpoints-you-need.md. It lists the calls an app makes as users earn and redeem, such as sending and reversing events, reading balances, and redeeming rewards. Every other endpoint creates or changes the program itself, and the dashboard at https://app.scrip.dev is the usual place for that work.
> Gift cards are rewards in the program's rewards catalog, next to custom rewards. Redeem one with `POST /v1/participants/{id}/redemptions/items` and a `fulfillment` object. When the order succeeds, show the participant the claim link from `fulfillment.claim_url` in the redemption response or from `POST /v1/redemptions/{id}/claim-link`. An order can finish after the request returns, so handle the `redemption.fulfillment_succeeded` and `redemption.fulfillment_failed` webhooks. See https://docs.scrip.dev/guides/gift-cards.md.
> Give every event, redemption, and transfer an `idempotency_key` built from your own data, such as an order ID, so retries are safe. Keep API keys on your server.
> Request and response schemas are in https://docs.scrip.dev/openapi.json. Add `.md` to any docs URL to get the page as Markdown.

# Which endpoints you need

> The endpoints your app calls to run a rewards program, and what the rest of the API is for

Running a rewards program on Scrip takes a short list of endpoints. This page names them, and explains what the rest of the API is for.

## Running your program

Your app calls these as users earn and redeem.

| Your app wants to                        | Call                                                             | Guide                                                           |
| ---------------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------- |
| Record something a user did              | `POST /v1/events`                                                | [Event processing](/guides/event-processing)                    |
| Take back what a refunded event earned   | `POST /v1/events/{id}/reverse`                                   | [Event processing](/guides/event-processing#reversing-an-event) |
| Find a participant by your own ID        | `GET /v1/participants?external_id=user_123`                      | [Participants](/guides/participants)                            |
| Show a user their balance                | `GET /v1/participants/{id}/balances`                             | [Participants](/guides/participants)                            |
| Show a user their history                | `GET /v1/participants/{id}/activity/history`                     | [Participants](/guides/participants)                            |
| Show a user their tier                   | `GET /v1/participants/{id}/state/tiers`                          | [Tiers](/guides/tiers)                                          |
| Show a user what they can redeem         | `GET /v1/programs/{programId}/rewards`                           | [Rewards catalog](/guides/rewards-catalog)                      |
| Let a user redeem                        | `POST /v1/participants/{id}/redemptions` or `/redemptions/items` | [Redemptions](/guides/redemptions)                              |
| Finish a redemption you fulfill yourself | `POST /v1/redemptions/{id}/complete`, `/fail`, or `/cancel`      | [Redemption lifecycle](/guides/redemption-lifecycle)            |
| Hand a user their gift card              | `POST /v1/redemptions/{id}/claim-link`                           | [Gift cards](/guides/gift-cards)                                |
| Move value between users                 | `POST /v1/transfers`                                             | [Transfers](/guides/transfers)                                  |
| React when something changes             | Receive a webhook                                                | [Webhooks](/guides/webhooks)                                    |

A program can run on the first row plus a webhook listener. With the program's `on_unknown_participant` left at `CREATE` (the default), the first event for a new `external_id` enrolls the participant, so there is nothing to create ahead of time. Card programs that hold value at authorization and settle later also do that through events: your backend forwards the authorization and settlement, and rules do the hold and release. See [Balance operations](/guides/balance-operations).

The rest of the table comes in as your product shows balances, offers a catalog, or lets users send value to each other.

## Everything else

Every other endpoint creates or changes the program itself: programs, assets, rules, tiers, rewards, automations, webhook endpoints, reports. The [dashboard](https://app.scrip.dev) is the usual place to do that work, and it is built on the same API. Account setup is the exception and happens only in the dashboard: API keys, organizations, and the fulfillment account that pays for gift cards.

That is what the rest of the reference is for. When you want a new program to start with the same rules, tiers, and rewards as your last one, or want your support tool to adjust a balance, or want liability numbers in your finance system, the same operations are there for your code. You don't need them to launch. You have them when your program grows into your other systems.

| Resource               | What it's for                                                                                                                                                    | Reference                                                                                    |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| Programs               | Create programs, link assets, fund and read the program wallet                                                                                                   | [Programs](/api-reference/programs/overview)                                                 |
| Assets                 | Define the unit of value, with inventory mode, issuance policy, and scale                                                                                        | [Assets](/api-reference/assets/overview)                                                     |
| Rule sets and rules    | Define earn rules, validate and simulate them, and preview, apply, or roll back configuration revisions                                                          | [Rule sets](/api-reference/rule-sets/overview), [Rules](/api-reference/rules/overview)       |
| Tiers                  | Ranked progression tracks with qualification, retention, and downgrade policies                                                                                  | [Tiers](/api-reference/tiers/overview)                                                       |
| Participants           | Create participants ahead of time, change status, set tags, counters, and attributes, and adjust, hold, or forfeit balances for customer service and corrections | [Participants](/api-reference/participants/overview)                                         |
| Groups                 | Shared balances and state for families, teams, and organizational pools                                                                                          | [Groups](/api-reference/groups/overview)                                                     |
| Rewards and gift cards | Catalog items, and the fulfillment accounts and reward sources behind gift cards                                                                                 | [Rewards](/api-reference/rewards/overview), [Gift cards](/api-reference/gift-cards/overview) |
| Automations            | Stored event submissions that Scrip fires on a trigger                                                                                                           | [Automations](/api-reference/automations/overview)                                           |
| Webhook endpoints      | Register endpoints, rotate secrets, inspect and resend deliveries                                                                                                | [Webhooks](/api-reference/webhooks/overview)                                                 |
| Reporting              | Liability, redemption attribution, ledger summaries, and the journal                                                                                             | [Reporting](/api-reference/reporting/overview)                                               |

## Next steps

<CardGroup cols={3}>
  <Card icon="bolt" href="/guides/event-processing" title="Event processing">
    What to put in an event and what happens after you send it.
  </Card>

  <Card icon="webhook" href="/guides/webhooks" title="Webhooks">
    Register an endpoint and verify a signature.
  </Card>

  <Card icon="book" href="/api-reference/introduction" title="API conventions">
    Pagination, idempotency, and error codes across every endpoint.
  </Card>
</CardGroup>
