Dashboard API
List agent policies
Returns all policies for the agent, ordered by creation date (newest first). The active policy has is_active: true.
GET
/
api
/
agents
/
{agentId}
/
policies
List agent policies
curl --request GET \
--url https://app.mandate.md/api/agents/{agentId}/policies \
--cookie laravel_session=const options = {method: 'GET', headers: {cookie: 'laravel_session='}};
fetch('https://app.mandate.md/api/agents/{agentId}/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.mandate.md/api/agents/{agentId}/policies"
headers = {"cookie": "laravel_session="}
response = requests.get(url, headers=headers)
print(response.text){
"policies": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spend_limit_per_tx_usd": 123,
"spend_limit_per_day_usd": 123,
"spend_limit_per_month_usd": 123,
"allowed_addresses": [
"<string>"
],
"allowed_contracts": [
"<string>"
],
"blocked_selectors": [
"<string>"
],
"blocked_actions": [
"<string>"
],
"require_approval_selectors": [
"<string>"
],
"require_approval_actions": [
"<string>"
],
"require_approval_above_usd": 123,
"max_slippage_bps": 123,
"max_gas_limit": "<string>",
"max_value_wei": "<string>",
"schedule": {},
"guard_rules": "<string>",
"is_active": true,
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}Was this page helpful?
⌘I
List agent policies
curl --request GET \
--url https://app.mandate.md/api/agents/{agentId}/policies \
--cookie laravel_session=const options = {method: 'GET', headers: {cookie: 'laravel_session='}};
fetch('https://app.mandate.md/api/agents/{agentId}/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.mandate.md/api/agents/{agentId}/policies"
headers = {"cookie": "laravel_session="}
response = requests.get(url, headers=headers)
print(response.text){
"policies": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spend_limit_per_tx_usd": 123,
"spend_limit_per_day_usd": 123,
"spend_limit_per_month_usd": 123,
"allowed_addresses": [
"<string>"
],
"allowed_contracts": [
"<string>"
],
"blocked_selectors": [
"<string>"
],
"blocked_actions": [
"<string>"
],
"require_approval_selectors": [
"<string>"
],
"require_approval_actions": [
"<string>"
],
"require_approval_above_usd": 123,
"max_slippage_bps": 123,
"max_gas_limit": "<string>",
"max_value_wei": "<string>",
"schedule": {},
"guard_rules": "<string>",
"is_active": true,
"version": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>"
}