---
title: "Generate Vouchers"
method: POST
path: "/v1/sites/{siteId}/hotspot/vouchers"
tags: ["Hotspot"]
---

# Generate Vouchers

`POST /v1/sites/{siteId}/hotspot/vouchers`

## Request

- Base URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/network/integration`
- URL: `https://api.ui.com/v1/connector/consoles/942A6FF664C0000000000964970E0000000009E710560000000068A9873F:9999999999/proxy/network/integration/v1/sites/{siteId}/hotspot/vouchers`
- Auth: none declared
- TypeScript: <https://skmtc.dev/ubiquiti/apis/unifi-network-api/docs/v1/sites/:siteId/hotspot/vouchers/post.ts> (a function with typed inputs; its response is checked against the schema)

Create one or more Hotspot vouchers.

## Path parameters

- `siteId` string, uuid, required

## Request body

- HotspotVoucherCreationRequest
  - `count` integer: Number of vouchers to generate
  - `name` string, required: Voucher note, duplicated across all generated vouchers
  - `authorizedGuestLimit` integer: (Optional) limit for how many different guests can use the same voucher to authorize network access
  - `timeLimitMinutes` integer, required: How long (in minutes) the voucher will provide access to the network since authorization of the first guest. Subsequently connected guests, if allowed, will share the same expiration time.
  - `dataUsageLimitMBytes` integer: (Optional) data usage limit in megabytes
  - `rxRateLimitKbps` integer: (Optional) download rate limit in kilobits per second
  - `txRateLimitKbps` integer: (Optional) upload rate limit in kilobits per second

## Response `201`

Created

- IntegrationVoucherCreationResultDto
  - `vouchers` HotspotVoucherDetails[]
    - `id` string, uuid, required
    - `createdAt` string, date-time, required
    - `name` string, required: Voucher note, may contain duplicate values across multiple vouchers
    - `code` string, required: Secret code to active the voucher using the Hotspot portal
    - `authorizedGuestLimit` integer: (Optional) limit for how many different guests can use the same voucher to authorize network access
    - `authorizedGuestCount` integer, required: For how many guests the voucher has been used to authorize network access
    - `activatedAt` string, date-time: (Optional) timestamp when the voucher has been activated (authorization time of the first guest)
    - `expiresAt` string, date-time: (Optional) timestamp when the voucher will become expired. All guests using the voucher will be unauthorized from network access
    - `expired` boolean, required: Whether the voucher has been expired and can no longer be used to authorize network access
    - `timeLimitMinutes` integer, required: How long (in minutes) the voucher will provide access to the network since authorization of the first guest. Subsequently connected guests, if allowed, will share the same expiration time.
    - `dataUsageLimitMBytes` integer: (Optional) data usage limit in megabytes
    - `rxRateLimitKbps` integer: (Optional) download rate limit in kilobits per second
    - `txRateLimitKbps` integer: (Optional) upload rate limit in kilobits per second

---

[API](https://skmtc.dev/ubiquiti/apis/unifi-network-api.md) - [All operations](https://skmtc.dev/ubiquiti/apis/unifi-network-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ubiquiti/apis/unifi-network-api/revisions/822d5af98ce5?raw)
