Update a rule
Endpoint
Section titled “Endpoint”PUT /v1/spending-rules/{ruleId}
Authentication
Section titled “Authentication”No authentication required.
Path Parameters
Section titled “Path Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
ruleId | string | Yes | Rule ID (UUID) |
Request Body
Section titled “Request Body”{}cURL Example
Section titled “cURL Example”curl -X PUT "https://api.sapiom.ai/v1/spending-rules/{ruleId}" \ -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 |
| 404 | - | Rule not found |
| 409 | - | Version conflict - rule was modified by another user |
See API Introduction for error handling details.