POST
/api/v2/admin/vouchersPOST /api/v2/admin/vouchers
Authentication
Send your API key in the x-api-key header on every request.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| companyId (query) | unknown | No | |
| Idempotency-Key (header) | string | No |
Request body
application/json
| Field | Type | Required | Description |
|---|---|---|---|
| Name | string | Yes | |
| Description | string | No | |
| GroupPublicId | string (uuid) | No | |
| TargetUserId | unknown | No | |
| CustomCode | string | No | |
| Prefix | string | No | |
| Type | string | No | |
| Value | unknown | No | |
| Currency | string | No | |
| PerUserLimit | unknown | No | |
| MaximumTotalUses | unknown | No | |
| MaximumAggregateValue | unknown | No | |
| RequiresWhitelabelApproval | boolean | No | |
| RequiresEmail2Fa | boolean | No | |
| ValidFrom | string (date-time) | No | |
| ValidUntil | string (date-time) | No | |
| InitialStatus | string | No | |
| ExternalReference | string | No | |
| AcceptUnboundedLiability | boolean | No |
Responses
200 — OK
| Field | Type | Required | Description |
|---|---|---|---|
| Id | string (uuid) | Yes | |
| GroupId | string (uuid) | Yes | |
| Name | string | Yes | |
| Description | string | Yes | |
| MaskedCode | string | Yes | |
| Type | string | Yes | |
| Value | unknown | Yes | |
| Currency | string | Yes | |
| Status | string | Yes | |
| SuccessfulUses | unknown | Yes | |
| ReservedUses | unknown | Yes | |
| PerUserLimit | unknown | Yes | |
| MaximumTotalUses | unknown | Yes | |
| RedeemedValue | unknown | Yes | |
| ReservedValue | unknown | Yes | |
| MaximumAggregateValue | unknown | Yes | |
| RequiresWhitelabelApproval | boolean | Yes | |
| RequiresEmail2Fa | boolean | Yes | |
| ValidFrom | string (date-time) | Yes | |
| ValidUntil | string (date-time) | Yes | |
| CreatedAt | string (date-time) | Yes | |
| PlaintextCode | string | No |
Example request
curl -X POST "https://{base_url}/api/v2/admin/vouchers" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"Name":"…"}'This page is generated from the live OpenAPI specification and always matches the current API.