PUT
/
api
/
v1
/
accounts
/
daily-limit
Set new daily spending limit
const url = 'https://api.gnosispay.com/api/v1/accounts/daily-limit';
const options = {
  method: 'PUT',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"newLimit":2500,"signature":"0x1234567890abcdef...","message":{"salt":"0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef","data":"0xa8ec43eefe687fc128d1915040376d20ccb1bf40d838ddd82bf9b0ba3da683cc2a2516230000000000000000000000000000000000000000000000069d17119dc5a800000000000000000000000000000000000000000000000000069d17119dc5a800000000000000000000000000000000000000000000000000069d17119dc5a800000000000000000000000000000000000000000000000000000000000000015180000000000000000000000000000000000000000000000000000000006866fd60"},"smartWalletAddress":"0x1234567890abcdef1234567890abcdef12345678"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "data": {}
}

Authorizations

Authorization
string
header
required

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

Body

application/json
newLimit
integer
required

The new daily spending limit to set (must be an integer).

Required range: 1 <= x <= 8000
Example:

2500

signature
string
required

The EIP-712 signature authorizing this limit change.

Example:

"0x1234567890abcdef..."

message
object
required

The message object containing transaction data and salt from the EIP-712 typed data.

smartWalletAddress
string

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

Example:

"0x1234567890abcdef1234567890abcdef12345678"

Response

Successfully submitted the daily limit update request.

data
object
required

The created delayed transaction details.