Create a new rule
Endpoint
Section titled “Endpoint”POST /v1/spending-rules
Authentication
Section titled “Authentication”No authentication required.
Request Body
Section titled “Request Body”{}cURL Example
Section titled “cURL Example”curl -X POST "https://api.sapiom.ai/v1/spending-rules" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{}'Response
Section titled “Response”{ "id": "string", "tenantId": "string", "numericId": 0, "formattedId": "string", "name": "string", "ruleType": "usage_limit", "resolutionStrategy": "automatic", "status": "active", "version": 0, "metadata": null, "createdAt": "2025-01-15T10:30:00Z", "updatedAt": "2025-01-15T10:30:00Z"}Error Responses
Section titled “Error Responses”| Status | Code | Description |
|---|---|---|
| 400 | - | Invalid request data |
| 401 | - | Unauthorized - invalid or missing authentication |
| 403 | - | Forbidden - insufficient permissions |
See API Introduction for error handling details.