axonpush
API referenceSpend policies

POST /spend-policies

POST
/spend-policies

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/spend-policies" \  -H "Content-Type: application/json" \  -d '{    "limitUsd": 0.1,    "name": "string",    "rungs": [      {        "action": "string",        "at_percent": 0      }    ],    "windowType": "daily"  }'
{  "$schema": "https://example.com/schemas/Policy.json",  "apiKeyId": "string",  "appId": "string",  "cooldownMins": 0,  "createdAt": "string",  "currentSpendUsd": 0.1,  "destination": "string",  "destinationType": "string",  "enabled": true,  "environmentId": "string",  "limitUsd": 0.1,  "model": "string",  "name": "string",  "policyId": "string",  "provider": "string",  "rungs": [    {      "action": "string",      "at_percent": 0,      "block_mode": "string",      "fallback_model": "string"    }  ],  "tagKey": "string",  "tagValue": "string",  "updatedAt": "string",  "userId": "string",  "windowType": "string"}