---
title: "Grants a voucher to a customer."
method: POST
path: "/vouchers"
tags: ["BillingAccount"]
---

# Grants a voucher to a customer.

`POST /vouchers`

Provide exactly one of validity (a duration from now) or expiresAt (an
 explicit instant) — not both, not neither. The grant immediately raises the customer's
 serve allowance.

## Request body

- GrantVoucherEndpointInput
  - `organizationId` string, required — The id of the organization to grant the voucher to.
  - `amount` number, double, required — The face value of the voucher in dollars.
  - `validity` string, nullable — How long the voucher stays valid, counted from now. Serialized as a duration string in the format [days.]hh:mm:ss (the days part is optional): "30.00:00:00" = 30 days, "7.00:00:00" = 7 days, "12:00:00" = 12 hours. Must be positive. Provide this or expiresAt, not both.
  - `expiresAt` string, date-time, nullable — An explicit expiry instant as an ISO-8601 timestamp (e.g. "2026-12-31T23:59:59Z"). Use this instead of validity when you know the exact date the voucher should expire. Provide this or validity, not both.

## Response `200`

OK

- GrantVoucherEndpointOutput
  - `voucherId` string, required — The id of the granted voucher.

## Other responses

- `400` — Bad Request
- `401` — Unauthenticated
- `403` — Forbidden

---

[API](https://skmtc.net/rapidata/apis/rapidata-api.md) · [All operations](https://skmtc.net/rapidata/apis/rapidata-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rapidata/rapidata-api/revisions/fdb89a6eb2fb/schema)
