---
title: "Create Loyalty Program"
method: POST
path: "/v2/programs"
tags: ["Loyalty"]
---

# Create Loyalty Program

`POST /v2/programs`

Create a new loyalty program.

### Args:
- `data`: Payload to create the program.
- `user`: The user creating the program, derived from the current session.

### Returns:
- JSON response with the created program details or an error message.

## Headers

- `authorization` string, nullable

## Request body

- CreateProgramPayload
  - `passTypeIdentifier` string, required
  - `schema` 'stampCard' | 'tieredMembership' | 'specialOffers' | 'custom'
  - `programType` 'loyalty' | 'giftcard'
  - `name` string, required
  - `description` string, nullable
  - `language` string, nullable
  - `country` string, nullable
  - `company` string, nullable
  - `address` string, nullable
  - `website` string, uri, nullable
  - `email` union
    - string, email
    - string
  - `phone` string, nullable
  - `terms` string, nullable
  - `pointsAddEmail` integer, nullable
  - `pointsAddPhone` integer, nullable
  - `pointsInstallPass` integer, nullable
  - `pointsScanPass` integer, nullable
  - `dynamicScanPoints` boolean, nullable
  - `pointsReferral` integer, nullable
  - `referralRequiredPoints` integer, nullable
  - `scannerType` 'Browser' | 'PassVerifier' | 'CodeReadr' | 'None'
  - `customPointsChangeMessage` string, nullable
  - `disableCustomPointsChangeMessage` boolean, nullable
  - `customPointName` string, nullable
  - `customPointsName` string, nullable
  - `customFields` TemplatePlaceholder[]
    - `name` string, required
    - `type` 'text' | 'email' | 'number' | 'date' | 'selection' | 'json'
    - `displayName` string, nullable
    - `defaultValue` string, nullable
    - `points` integer, nullable
    - `options` string, nullable
    - `required` boolean, nullable
  - `requiredFields` string[]
  - `retention_period_days` integer — Days to retain deleted data (0-365)

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/loyalty/apis/loyaltydog.md) · [All operations](https://skmtc.net/loyalty/apis/loyaltydog/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyalty/loyaltydog/versions/42b7b22af2b6/schema)
