POST
/
api
/
v1
/
accounts
/
withdraw
Withdraw from Safe with Signature
const url = 'https://api.gnosispay.com/api/v1/accounts/withdraw';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"amount":"1000000000000000000","to":"0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382","tokenAddress":"0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382","signature":"0x1234567890abcdef...","message":{"salt":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","data":"0xa9059cbb0000000000000000000000003270bf32ab647e90ef94a026c70aa1daaaada23820000000000000000000000000000000000000000000000000de0b6b3a7640000"},"smartWalletAddress":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "data": {
    "id": "clp3j1f9a0000a1cdh6ezx2qv",
    "safeAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "transactionData": "{\"to\":\"0x123\",\"value\":\"0\",\"data\":\"0xabcdef\"}",
    "enqueueTaskId": "task_abc123",
    "dispatchTaskId": "<string>",
    "readyAt": "2023-11-07T05:31:56Z",
    "operationType": "CALL",
    "userId": "user_123",
    "status": "QUEUING",
    "createdAt": "2025-02-07T12:34:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
amount
string
required

The amount to withdraw in the token's base units.

Example:

"1000000000000000000"

to
string
required

The address to withdraw to.

Example:

"0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382"

tokenAddress
string
required

The address of the token to withdraw. Use "0x0000000000000000000000000000000000000000" for native token (xDAI) withdrawals.

Example:

"0x3270bf32AB647e90eF94A026c70Aa1daaaDA2382"

signature
string
required

The wallet signature authorizing this withdraw.

Example:

"0x1234567890abcdef..."

message
object
required

The message object containing transaction data and salt.

smartWalletAddress
string

Optional. If using a smart account, the address of the smart wallet to use for the withdraw.

Example:

"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"

Response

Successfully submitted the withdraw request.

data
object
required