POST
/
api
/
v1
/
account
Create or deploy a Safe account for the authenticated user
const url = 'https://api.gnosispay.com/api/v1/account';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"chainId":"100"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
"id": "safe-account-id-123",
"address": "0x1234567890123456789012345678901234567890",
"userId": "user123",
"chainId": "100",
"salt": "some-salt-value",
"createdAt": "2024-01-01T00:00:00Z",
"deployed": true
}

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 created or checked Safe account

The response is of type object.