---
title: "Create coupons"
method: POST
path: "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons"
tags: ["Coupons"]
---

# Create coupons

`POST /v1/applications/{applicationId}/campaigns/{campaignId}/coupons`

## Request

- Base URL: `https://yourbaseurl.talon.one`
- URL: `https://yourbaseurl.talon.one/v1/applications/{applicationId}/campaigns/{campaignId}/coupons`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/talon/apis/management-api/docs/v1/applications/:applicationId/campaigns/:campaignId/coupons/post.ts> (a function with typed inputs; its response is checked against the schema)

> [!note] Management API endpoints are **not** meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Create coupons according to some pattern. Up to 20.000 coupons can be created without a unique prefix. When a unique prefix is provided, up to 200.000 coupons can be created.

## Path parameters

- `applicationId` integer, required
- `campaignId` integer, required

## Query parameters

- `silent` string

## Request body

- NewCoupons
  - `usageLimit` integer, required: The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
  - `discountLimit` number: The total discount value that the code can give. Typically used to represent a gift card value.
  - `reservationLimit` integer: The number of reservations that can be made with this coupon code.
  - `startDate` string, date-time: Timestamp at which point the coupon becomes valid.
  - `expiryDate` string, date-time: Expiration date of the coupon. Coupon never expires if this is omitted.
  - `limits` LimitConfig[]: Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured.
    - `action` string, required: The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon`
    - `limit` number, required: The value to set for the limit.
    - `period` 'daily' | 'weekly' | 'monthly' | 'yearly': The period on which the budget limit recurs.
    - `entities` string[], required: The entity that this limit applies to.
  - `numberOfCoupons` integer, required: The number of new coupon codes to generate for the campaign. Must be at least 1.
  - `batchId` string: The batch ID that all coupons created by the request will bear. If omitted, a batch ID is generated automatically.
  - `uniquePrefix` string: **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#tag/Coupons/operation/createCouponsAsync) endpoint.
  - `attributes` object: Arbitrary properties associated with this item.
  - `recipientIntegrationId` string: The integration ID for this coupon's beneficiary's profile.
  - `validCharacters` string[]: List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression.
  - `couponPattern` string: The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set.
  - `isReservationMandatory` boolean: An indication of whether the code can be redeemed only if it has been reserved first.
  - `implicitlyReserved` boolean: An indication of whether the coupon is implicitly reserved for all customers.
  - `supportRequestId` integer: The identifier of the support request to link to the coupon creation. The request must exist and not yet be processed.
  - `supportRequestNote` string: A note recorded when the linked support request is approved or rejected. Applied when `supportRequestId` is provided.

## Response `200`

OK

- object
  - `totalResultSize` integer, required
  - `data` Coupon[], required
    - `id` integer, required: The internal ID of the coupon.
    - `created` string, date-time, required: The time the coupon was created.
    - `campaignId` integer, required: The ID of the campaign that owns this entity.
    - `value` string, required: The coupon code.
    - `usageLimit` integer, required: The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply.
    - `discountLimit` number: The total discount value that the code can give. Typically used to represent a gift card value.
    - `reservationLimit` integer: The number of reservations that can be made with this coupon code.
    - `startDate` string, date-time: Timestamp at which point the coupon becomes valid.
    - `expiryDate` string, date-time: Expiration date of the coupon. Coupon never expires if this is omitted.
    - `limits` LimitConfig[]: Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured.
      - `action` string, required: The limitable action to which this limit applies. For example: - `setDiscount` - `setDiscountEffect` - `redeemCoupon` - `createCoupon`
      - `limit` number, required: The value to set for the limit.
      - `period` 'daily' | 'weekly' | 'monthly' | 'yearly': The period on which the budget limit recurs.
      - `entities` string[], required: The entity that this limit applies to.
    - `usageCounter` integer, required: The number of times the coupon has been successfully redeemed.
    - `discountCounter` number: The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon.
    - `discountRemainder` number: The remaining discount this coupon can give.
    - `reservationCounter` number: The number of times this coupon has been reserved.
    - `attributes` object: Custom attributes associated with this coupon.
    - `referralId` integer: The integration ID of the referring customer (if any) for whom this coupon was created as an effect.
    - `recipientIntegrationId` string: The Integration ID of the customer that is allowed to redeem this coupon.
    - `importId` integer: The ID of the Import which created this coupon.
    - `reservation` boolean: Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code.
    - `batchId` string: The id of the batch the coupon belongs to.
    - `isReservationMandatory` boolean: An indication of whether the code can be redeemed only if it has been reserved first.
    - `implicitlyReserved` boolean: An indication of whether the coupon is implicitly reserved for all customers.

## Other responses

- `204`: No Content

## Changes

- **2026-11-07** `7ef1b9504c3a`: 2 warning, 3 info
  - the `allOf[subschema #3]/numberOfCoupons` request property's max was set to `20000.00`
  - the `allOf[subschema #3]/numberOfCoupons` request property's min was set to `1.00`
  - added the new optional request property `allOf[subschema #3]/batchId`
  - added the new optional request property `allOf[subschema #3]/supportRequestId`
  - …1 more

[Operation history](https://skmtc.dev/talon/apis/management-api/changes/v1/applications/:applicationId/campaigns/:campaignId/coupons/post.md)

---

[API](https://skmtc.dev/talon/apis/management-api.md) - [All operations](https://skmtc.dev/talon/apis/management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talon/apis/management-api/revisions/7ef1b9504c3a?raw)
