---
title: "Mint Promo Codes"
method: POST
path: "/api/v1/admin/promo/codes"
tags: ["Admin - Promo Codes", "Admin - Promo Codes"]
---

# Mint Promo Codes

`POST /api/v1/admin/promo/codes`

## Request

- Base URL: `https://api.gemstoneaiapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.gemstoneaiapp.com/api/v1/admin/promo/codes`
- Auth: none declared

Mint one or more promo codes.

## Headers

- `x-admin-key` string, nullable

## Request body

- PromoMintRequest
  - `count` integer: How many codes to mint
  - `premium_days` integer, nullable: Days of premium granted. null = lifetime.
  - `bonus_scans` integer
  - `campaign` string, nullable: e.g. "outreach-jul"
  - `note` string, nullable: Who it went to / why
  - `max_redemptions` integer: 0 = unlimited redemptions
  - `restricted_email` string, nullable: Lock the code to one address; it auto-applies when they sign up
  - `expires_at` string, date-time, nullable: Code unusable after this
  - `code` string, nullable: Mint one specific vanity code
  - `prefix` string: Prefix for generated codes

## Response `200`

Successful Response

- PromoMintResponse
  - `created` integer, required
  - `codes` PromoCodeResponse[], required
    - `id` integer, required
    - `code` string, required
    - `campaign` string, nullable
    - `note` string, nullable
    - `premium_days` integer, nullable
    - `bonus_scans` integer, required
    - `max_redemptions` integer, required
    - `redemption_count` integer, required
    - `restricted_email` string, nullable
    - `expires_at` string, date-time, nullable
    - `is_active` boolean, required
    - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api.md) · [All operations](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gemstoneaiapp/apis/gemstoneai-api/revisions/fcb441f55161?raw)
