Create Approval Rule
POST https://api.sfox.com/v1/approval-rules
Add a new crypto address to your account's whitelisted withdrawal addresses.
Body Parameters
Parameter
Type
Description
rule_type required
string
The type of approval rule to create. Possible values:
WITHDRAW: Approval rule for withdrawals.ADD_ALTER_COLL: Adding/editing users in your account.ALTER_SAFE: Adding/editing approval rules in your account.
required_approvals required
int
Number of approvals needed for the action to be approved.
threshold
number
The withdrawal amount (USD) required for the action to require approvals. Required if rule_type = WITHDRAW
Responses
Example Requests
curl -X POST \
-H 'Content-type: application/json' \
-H 'Authorization: Bearer <API_TOKEN>' \
--data '{ "rule_type": "WITHDRAW",
"required_approvals": 2,
"threshold": 100 }' \
'https://api.sfox.com/v1/approval-rules'const axios = require('axios');
axios({
method: 'post',
url: 'https://api.sfox.com/v1/approval-rules',
headers: {
'Authorization': 'Bearer <API_KEY>'
},
data: {
rule_type: "WITHDRAW",
required_approvals: 2,
threshold: 100
}
}).then(response => {
console.log(response)
}).catch(err => {
console.error(err)
});import requests
data = requests.post(
"https://api.sfox.com/v1/approval-rules",
headers={
"Authorization": "Bearer <API_KEY>",
},
data={
"rule_type": "WITHDRAW",
"required_approvals": 2,
"threshold": 100
}
)
print(data)Last updated