Delegates
Returns a list with all the delegates
Number of results to return per page.
The initial index from which to return the results.
123http://api.example.org/accounts/?offset=400&limit=100http://api.example.org/accounts/?offset=200&limit=100Invalid data
GET /api/v2/delegates/ HTTP/1.1
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"safe": "text",
"delegate": "text",
"delegator": "text",
"label": "text",
"expiryDate": "2026-01-01T00:00:00.000Z"
}
]
}Adds a new Safe delegate with a custom label. Calls with same delegate but different label or signer will update the label or delegator if a different one is provided. To generate the signature, the following EIP712 data hash needs to be signed:
{
"types": {
"EIP712Domain": [
{"name": "name", "type": "string"},
{"name": "version", "type": "string"},
{"name": "chainId", "type": "uint256"},
],
"Delegate": [
{"name": "delegateAddress", "type": "address"},
{"name": "totp", "type": "uint256"},
],
},
"primaryType": "Delegate",
"domain": {
"name": "Safe Transaction Service",
"version": "1.0",
"chainId": chain_id,
},
"message": {
"delegateAddress": delegate_address,
"totp": totp,
},
}For the signature we use TOTP with T0=0 and Tx=3600. TOTP is calculated by taking the Unix UTC epoch time (no milliseconds) and dividing by 3600 (natural division, no decimals).
Mixin to validate delegate operations data
Accepted
No content
Malformed data
POST /api/v2/delegates/ HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"safe": null,
"delegate": "text",
"delegator": "text",
"signature": "text",
"label": "text",
"expiryDate": null
}No content
Removes every delegate/delegator pair found associated with a given delegate address. The signature is built the same way as for adding a delegate, but in this case the signer can be either the delegator (owner) or the delegate itself. Check POST /delegates/ to learn more.
Deleted
No content
Malformed data
Delegate not found
Invalid Ethereum address/Error processing data
DELETE /api/v2/delegates/{delegate_address}/ HTTP/1.1
Accept: */*
No content
Last updated