curl -X PUT https://api.saturn-pay.com/v1/agents/agt_abc123/policy \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"]
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents/agt_abc123/policy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
maxPerCallUsdCents: 100,
maxPerDayUsdCents: 1000,
allowedCapabilities: [] // Allow all
})
});
{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"],
"dailySpentUsdCents": 0
}
Policies
Replace Policy
Replace an agent’s entire policy configuration
PUT
/
v1
/
agents
/
{id}
/
policy
curl -X PUT https://api.saturn-pay.com/v1/agents/agt_abc123/policy \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"]
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents/agt_abc123/policy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
maxPerCallUsdCents: 100,
maxPerDayUsdCents: 1000,
allowedCapabilities: [] // Allow all
})
});
{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"],
"dailySpentUsdCents": 0
}
Replaces the entire policy for an agent. Unlike PATCH, this requires all fields and will reset any fields not provided.
Path Parameters
string
required
The agent ID (e.g.,
agt_abc123)Request
number
required
Maximum cost allowed per single API call (in USD cents).
Use
0 for no limit.number
required
Maximum total spend allowed per day (in USD cents).
Use
0 for no limit.array
required
List of capabilities this agent can use.
Use empty array
[] to allow all capabilities.Response
Returns the new policy object.curl -X PUT https://api.saturn-pay.com/v1/agents/agt_abc123/policy \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"]
}'
const response = await fetch('https://api.saturn-pay.com/v1/agents/agt_abc123/policy', {
method: 'PUT',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({
maxPerCallUsdCents: 100,
maxPerDayUsdCents: 1000,
allowedCapabilities: [] // Allow all
})
});
{
"maxPerCallUsdCents": 100,
"maxPerDayUsdCents": 1000,
"allowedCapabilities": ["reason", "search", "read", "execute"],
"dailySpentUsdCents": 0
}