---
title: "Create a promotion code"
method: POST
path: "/coupons/{id}/promotion-codes"
tags: ["Coupons"]
---

# Create a promotion code

`POST /coupons/{id}/promotion-codes`

## Request

- Base URL: `https://api.cavuno.com/v1`
- URL: `https://api.cavuno.com/v1/coupons/{id}/promotion-codes`
- Auth: HTTP bearer

## Path parameters

- `id` string, required: The coupon id.

## Request body

- CreatePromotionCodeBody
  - `code` string, required
  - `maxRedemptions` integer
  - `expiresAt` string, date-time: ISO-8601 expiry for the promotion code.
  - `firstTimeTransaction` boolean
  - `minimumAmount` number
  - `minimumAmountCurrency` string

## Response `201`

Created promotion code.

- PromotionCode
  - `id` string, required
  - `object` 'promotion_code', required
  - `code` string, required
  - `couponId` string, required
  - `active` boolean, required
  - `created` string, required

## Other responses

- `default`: An error. Every non-2xx response uses the same envelope; see the Errors section of the introduction.

## Changes

- **2026-10-19** `c34152c38176`: 1 info
  - added the optional property `error/upgrade` to the response with the `default` status

[Operation history](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/changes/coupons/:id/promotion-codes/post.md)

---

[API](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api.md) · [All operations](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cavuno/apis/cavuno-v1-rest-api/revisions/d5974dabff14?raw)
