Skip to content
Go To Dashboard

Restore a rule (unarchive from soft delete)

POST /v1/spending-rules/{ruleId}/restore

No authentication required.

ParameterTypeRequiredDescription
ruleIdstringYesRule ID (UUID)
{
"version": 1
}
Terminal window
curl -X POST "https://api.sapiom.ai/v1/spending-rules/{ruleId}/restore" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"version": 1
}'
{
"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"
}
StatusCodeDescription
404-Rule not found
409-Version conflict or rule not archived

See API Introduction for error handling details.