---
title: "Turn a promo code off or back on"
method: PATCH
path: "/api/v1/admin/promo-codes/{promoId}"
tags: ["Promo codes"]
---

# Turn a promo code off or back on

`PATCH /api/v1/admin/promo-codes/{promoId}`

## Request

- Base URL: `https://otprun.com`
- URL: `https://otprun.com/api/v1/admin/promo-codes/{promoId}`
- Auth: HTTP bearer

## Path parameters

- `promoId` integer, required

## Request body

- PromoUpdateInputBody
  - `active` boolean, required

## Response `200`

OK

- PromoCodeBody
  - `active` boolean, required
  - `amount_off` integer, required: Discount in US cents, 0 for a percent discount; tenge payments get the same share off
  - `code` string, required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time, nullable, required
  - `id` integer, required
  - `kind` 'percent' | 'amount', required
  - `max_redemptions` integer, nullable, required: null means no limit
  - `percent` integer, required: Discount in percent, 0 for an amount discount
  - `plans` string[], nullable, required: Plans the code works for, empty for every paid plan
  - `redemptions` integer, required: Paid orders that used the code

## Other responses

- `403`: Forbidden
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

---

[API](https://skmtc.dev/otprun/apis/otp-run-api.md) · [All operations](https://skmtc.dev/otprun/apis/otp-run-api/llms.txt) · [OpenAPI document](https://skmtc.dev/otprun/apis/otp-run-api/revisions/43d40d5f4050?raw)
