Skip to main content
POST
/
withdraw
curl --request POST \
  --url https://token-vesting.snek.fun/withdraw \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:0",
    "address": "addr1..."
  }'
{
  "cbor": "84a500..."
}
Builds a transaction that unlocks and withdraws tokens from a vesting lock. Auth: Public

Request body

id
string
required
Vesting UTxO ID in txHash:index format.
address
string
required
Caller’s Cardano address (must match the lock owner).

Response

cbor
string
Hex-encoded signed transaction CBOR.
curl --request POST \
  --url https://token-vesting.snek.fun/withdraw \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef:0",
    "address": "addr1..."
  }'
{
  "cbor": "84a500..."
}

Error response

cause
string
Machine-readable error code.
message
string
Human-readable error message.
Possible errors:
  • 400 INVALID_PARAMS — one or more required fields are missing or have the wrong type.
  • 400 UTxO_SPENT — the vesting UTxO has already been spent.
  • 400 INVALID_DATUM — the referenced UTxO has no inline datum.
  • 400 LOCK_NOT_EXPIRED — the vesting lock is still active and cannot be withdrawn yet.
  • 403 NOT_OWNERaddress does not match the lock owner.
  • 404 UTxO_NOT_FOUND — the referenced vesting UTxO does not exist.
  • 500 SERVER_ERROR — unexpected server-side failure.
{
  "cause": "LOCK_NOT_EXPIRED",
  "message": "Lock is still active. Unlocks at 2026-12-31T00:00:00.000Z"
}