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

# Update coupons

`PUT /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/put.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.

Update all coupons or a specific batch of coupons in the given campaign.

You can find the `batchId` on the **Coupons** page of your campaign in the
Campaign Manager, or you can use [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount).

> [!note] **Note**
> - Only send sequential requests to this endpoint.
> - Requests to this endpoint time out after 30 minutes. If you hit a timeout, contact our support team.
> - With this `PUT` endpoint, if you do not explicitly set a value for the `startDate` and `expiryDate` properties in your request, it is automatically set to `null`.

To update a specific coupon, use [Update coupon](#tag/Coupons/operation/updateCoupon).

## Path parameters

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

## Request body

- UpdateCouponBatch
  - `usageLimit` integer: 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.
  - `attributes` object: Optional property to set the value of custom coupon attributes. They are defined in the Campaign Manager, see [Managing attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes). Coupon attributes can also be set to _mandatory_ in your Application [settings](https://docs.talon.one/docs/product/applications/using-attributes#making-attributes-mandatory). If your Application uses mandatory attributes, you must use this property to set their value.
  - `batchID` string: The ID of the batch the coupon(s) belong to.

## Response `204`

No Content

---

[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)
