POST
/
api
/
v1
/
accounts
/
withdraw
Withdraw from the user's Safe account
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"}}'
};

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": null,
    "readyAt": null,
    "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

Response

200
application/json

Successfully submitted the withdraw request.

The response is of type object.