Skip to main content

Base URL

https://api.paxoslabs.com
All endpoints are versioned under /v2.

Authentication

Include your API key in the x-api-key header on every request:
curl https://api.paxoslabs.com/v2/amplify/vaults \
  -H "x-api-key: pxl_your_public_id_your_secret"
API keys use the format pxl_<public_id>_<secret>. Obtain one from the Paxos Labs dashboard.

Response Format

The three transaction-preparation endpoints (deposit, withdraw, withdraw/cancel) accept a responseFormat query parameter that controls which fields appear in the response:
Formatdata (hex calldata)abi / functionName / argsDefault
encodedYesNoYes
fullYesYes
structuredNoYes

encoded (default)

Returns only the ABI-encoded calldata hex string. Use this when your signer accepts raw data fields (e.g. eth_sendTransaction).
curl "https://api.paxoslabs.com/v2/amplify/deposit?\
vaultAddress=0xbbbb000000000000000000000000000000000001&\
depositAsset=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&\
depositAmount=1000000&\
userAddress=0x1234567890abcdef1234567890abcdef12345678&\
chainId=1" \
  -H "x-api-key: pxl_your_key"
{
  "transaction": {
    "to": "0xcccc000000000000000000000000000000000001",
    "data": "0x47e7ef24000000000000000000000000...",
    "value": "0"
  }
}

full

Returns encoded calldata plus the ABI fragment, function name, and decoded args. Useful for debugging or when you need both representations.
curl "https://api.paxoslabs.com/v2/amplify/deposit?\
vaultAddress=0xbbbb...&depositAsset=0xA0b8...&depositAmount=1000000&\
userAddress=0x1234...&chainId=1&responseFormat=full" \
  -H "x-api-key: pxl_your_key"
{
  "transaction": {
    "to": "0xcccc000000000000000000000000000000000001",
    "data": "0x47e7ef24000000000000000000000000...",
    "value": "0",
    "abi": [{ "type": "function", "name": "deposit", "inputs": [...], "outputs": [...] }],
    "functionName": "deposit",
    "args": ["0xA0b8...", "1000000", "999500", "0x1234..."]
  }
}

structured

Returns the ABI fragment, function name, and args without encoded calldata. Use this when your library handles encoding (e.g. viem encodeFunctionData, ethers interface.encodeFunctionData).
{
  "transaction": {
    "to": "0xcccc000000000000000000000000000000000001",
    "value": "0",
    "abi": [{ "type": "function", "name": "deposit", "inputs": [...], "outputs": [...] }],
    "functionName": "deposit",
    "args": ["0xA0b8...", "1000000", "999500", "0x1234..."]
  }
}

Error Handling

All error responses use a standard envelope:
{
  "error": {
    "code": 400,
    "message": "vaultAddress is not a valid hex address",
    "status": "INVALID_ARGUMENT",
    "details": [
      {
        "@type": "type.paxoslabs.dev/errors/BadRequest",
        "fieldViolations": [
          { "field": "vaultAddress", "description": "vaultAddress 0xinvalid is not a valid hex address." }
        ]
      }
    ]
  }
}
HTTP Statuserror.statusMeaning
400INVALID_ARGUMENTMalformed or missing parameters
401UNAUTHENTICATEDMissing or malformed API key
403PERMISSION_DENIEDInvalid, inactive, or expired API key
404NOT_FOUNDVault not found for the given address + chain
429RESOURCE_EXHAUSTEDRate limit exceeded
503INTERNALRPC or upstream service unavailable