---
title: "Create Gift Code Batch"
method: POST
path: "/api/admin/gift-codes"
tags: ["admin"]
---

# Create Gift Code Batch

`POST /api/admin/gift-codes`

## Request

- Base URL: `https://api.stellara.natlex.it` (the document declares no server; this is the origin it was published from)
- URL: `https://api.stellara.natlex.it/api/admin/gift-codes`
- Auth: HTTP bearer

Create raw gift codes for manual sales, printing, or partner batches.

## Request body

- GiftCodeCreateRequest
  - `count` integer
  - `duration_days` integer
  - `campaign_name` string, nullable
  - `order_id` string, nullable

## Response `201`

Successful Response

- AdminGiftCodeCreateResponse
  - `codes` string[], required
  - `count` integer, required
  - `duration_days` integer, required
  - `campaign_name` string, nullable

## Other responses

- `422`: Validation Error

---

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