---
title: "Update Promocode Endpoint"
method: PATCH
path: "/promo-codes/{promocode_id}"
tags: ["promo-codes"]
---

# Update Promocode Endpoint

`PATCH /promo-codes/{promocode_id}`

## Request

- The document declares no server URL.
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/docs/promo-codes/:promocode_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Обновление промокода.

## Path parameters

- `promocode_id` integer, required

## Request body

- AppWebapiSchemasPromocodesPromoCodeUpdateRequest
  - `code` string, nullable
  - `type` 'balance' | 'subscription_days' | 'trial_subscription' | 'promo_group' | 'discount'
  - `balance_bonus_kopeks` integer, nullable
  - `subscription_days` integer, nullable
  - `max_uses` integer, nullable
  - `valid_from` string, date-time, nullable
  - `valid_until` string, date-time, nullable
  - `is_active` boolean, nullable

## Response `200`

Successful Response

- AppWebapiSchemasPromocodesPromoCodeResponse
  - `id` integer, required
  - `code` string, required
  - `type` 'balance' | 'subscription_days' | 'trial_subscription' | 'promo_group' | 'discount', required
  - `balance_bonus_kopeks` integer, required
  - `balance_bonus_rubles` number, required
  - `subscription_days` integer, required
  - `max_uses` integer, required
  - `current_uses` integer, required
  - `uses_left` integer, required
  - `is_active` boolean, required
  - `is_valid` boolean, required
  - `valid_from` string, date-time, required
  - `valid_until` string, date-time, nullable
  - `created_by` integer, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-03** `2360876ff9c5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/changes/promo-codes/:promocode_id/patch.md)

---

[API](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api.md) - [All operations](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/revisions/2360876ff9c5?raw)
