---
title: "Void an invoice"
method: POST
path: "/gateway/invoices/{invoiceId}/void"
tags: ["Invoices"]
---

# Void an invoice

`POST /gateway/invoices/{invoiceId}/void`

## Request

- Base URL: `https://api.agentaos.ai/api/v1`
- URL: `https://api.agentaos.ai/api/v1/gateway/invoices/{invoiceId}/void`
- Auth: API key in header `x-api-key`

Marks the accounting record void. It never touches the payment itself: if the buyer already paid, nothing is refunded. Use it to correct a bookkeeping mistake, not to reverse a charge. Irreversible: there is no "un-void"; an already-voided invoice returns `400` on a repeat call.

## Path parameters

- `invoiceId` string, uuid, required

## Response `200`

The invoice was voided.

- SuccessResponse
  - `success` true, required

## Other responses

- `400`: A required field is missing, out of range, or the wrong type. `ValidationPipe` also rejects any field not in the documented schema.
- `401`: Missing or invalid `x-api-key`.
- `403`: The key is valid but the resource belongs to a different organization.
- `404`: Resource not found (or not visible to your key; the two are not distinguished).

---

[API](https://skmtc.dev/agentaos/apis/agentaos-gateway-api.md) · [All operations](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentaos/apis/agentaos-gateway-api/revisions/3a8ad3c6b965?raw)
