Skip to content

Spending policy for an agent

GET
/merchants/agent-policies/{agentId}
curl --request GET \
--url https://hub.stablezact.com/api/v1/merchants/agent-policies/example \
--header 'X-Public-Key: <X-Public-Key>'

Returns policy: null with a message when no policy exists, rather than 404. Check the field, not the status code. The DELETE on this path does return 404 for an agent that does not exist, so the two verbs disagree.

agentId
required
string
<= 100 characters /^[a-zA-Z0-9_-]+$/

The policy, or null with a message.

Media typeapplication/json
object
success
boolean
policy
object | null
message
string
Examplegenerated
{
"success": true,
"policy": "example",
"message": "example"
}

Missing or invalid credentials.

Media typeapplication/json
object
success
boolean
error
required

Short machine-ish reason.

string
message

Longer explanation, when there is one.

string
Example
{
"error": "API credentials required. Use x-public-key header or x-api-key and x-api-secret headers."
}