---
search:
  tags:
    - Agent
    - POST
seo:
  description: >-
    Creates a microcredit hold for the offer and returns a signed ES256 voucher
    JWT… Reference for the POST /v1/vouchers endpoint in the agentsub Gateway
    API.
sidebar:
  label: Mint an ACS voucher (hold)
  badge: POST
title: Mint an ACS voucher (hold)
type: openapi-operation
---
Creates a microcredit hold for the offer and returns a signed ES256 voucher JWT bound to the offer and hold id (`jti`). `maxUc` limits the hold amount.

`POST /v1/vouchers`

**Request body** (`application/json`, required)

- `offerId` (string, required)
- `maxUc` (Microcredits) — Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.
- `maxAmount` (Microcredits) — Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.

Request body example:

```json
{
  "offerId": "string",
  "maxUc": "string",
  "maxAmount": "string"
}
```

**Responses**

- `200` — Voucher minted
- `400` — \`invalid\_input\` problem
- `401` — \`unauthorized\` problem; live 401s advertise \`WWW-Authenticate: Bearer resource\_metadata=...\`
- `402` — INSUFFICIENT\_CREDITS or CAP\_EXCEEDED problem
- `403` — Identity, ownership, scope or policy denied (\`human\_required\`, \`owner\_claim\_required\`, \`scope\_required\`, \`FROZEN\`, \`CAP\_EXCEEDED\`, \`SCOPE\_FORBIDDEN\`)
- `503` — Runtime or provider configuration unavailable (\`runtime\_configuration\_required\`, \`signing\_configuration\_required\`, \`runtime\_unavailable\`, \`workspace\_unavailable\`, \`provider\_configuration\_required\`)

Response example, 200:

```json
{
  "voucher": "string",
  "redemption": {
    "id": "string",
    "agentId": "string",
    "acceptorId": "string",
    "offerId": "string",
    "category": "string",
    "amountUc": "string",
    "state": "held",
    "expiresAt": 0,
    "createdAt": 0,
    "capturedUc": "string",
    "allocations": [
      {
        "lotId": "string",
        "amountUc": "string"
      }
    ]
  }
}
```
