---
title: "Create a promocode"
method: POST
path: "/coupons/{coupon_id}/promocodes.json"
tags: ["Promocode Endpoints"]
---

# Create a promocode

`POST /coupons/{coupon_id}/promocodes.json`

Create a promocode for a coupon

You can provide the API with a **code**, but if you don't we'll generate one for you.

You can just `POST` an empty body to create a promocode for a coupon with a generated code.

With promocodes you can specify minimum booking values, redemptions limits, limit only to one customer, and limit one use per customer.

Once created, a Promocode can be used to apply the Coupon to a booking via the customer booking form

## Path parameters

- `coupon_id` integer, required

## Headers

- `Authorization` string, required

## Response `201`

Promocode created

- Promocode[]
  - `id` integer
  - `code` string — The code the customer can use to redeem the promocode, they enter this code when booking. The code is case-insensitive and must be unique
  - `minimum_booking_value` integer — The minimum booking value the Promocode can be used for. If attempted for a booking below this value, the Coupon will not be applied
  - `first_time_use_only` boolean — If set to true, the Promocode will only be usable once per customer - applies to logged in customers only

## Other responses

- `401` — Unauthorized - Invalid API key
- `422` — Unprocessable - the promocode parameters you provided are invalid

## Changes

- **2025-01-13** (v2) `9331d0ba9538` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2022-05-08** (v2) `2a343eba9b87` — 1 info
  - endpoint added
- **2022-05-05** (v2) `95c52cb13f9a` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/jammed-org/apis/jammed-bookings-api/changes/coupons/:coupon_id/promocodes.json/post.md)

---

[API](https://skmtc.dev/jammed-org/apis/jammed-bookings-api.md) · [All operations](https://skmtc.dev/jammed-org/apis/jammed-bookings-api/llms.txt) · [OpenAPI document](https://skmtc.dev/jammed-org/apis/jammed-bookings-api/revisions/8edf08285947?raw)
