---
title: "Relay a withdrawal proof — we pay the gas"
method: POST
path: "/api/pool/withdraw"
tags: ["privacy-pool"]
---

# Relay a withdrawal proof — we pay the gas

`POST /api/pool/withdraw`

## Request

- Base URL: `https://api.anygas.xyz/svc`
- URL: `https://api.anygas.xyz/svc/api/pool/withdraw`
- Auth: none declared

Build the PLONK proof client-side; your secret never leaves your machine. The recipient is bound inside the proof, so nobody (including us) can redirect the payout. Simulated before broadcast, so an invalid proof costs you a 400 rather than a failed transaction. Rate limited to 10/min. BETA: the withdrawal circuit is not independently audited. A hard on-chain deposit cap bounds the value at risk. Deposit only what you can afford to lose entirely.

## Request body

- object
  - `proof` string[], required: 24 field elements in snarkjs plonk.exportSolidityCallData order
  - `root` string, required
  - `nullifierHash` string, required
  - `recipient` string, required

## Response `200`

Broadcast; returns txHash and the amount paid

## Other responses

- `400`: Malformed, or simulated and would revert (not broadcast)
- `409`: Note already spent, or a root the contract has never seen
- `413`: Body too large
- `429`: Rate limited

---

[API](https://skmtc.dev/anygas/apis/robyn-anygas-api.md) · [All operations](https://skmtc.dev/anygas/apis/robyn-anygas-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anygas/apis/robyn-anygas-api/revisions/9b7498be8304?raw)
