422
Unprocessable Content
validation_failed — Validation failed
Message
What causes it
- A field has a value outside its allowed set — `execution_mode` must be `test` or `live`; `decision` must be `approved` or `denied`; `bulk_action` must be `approve`, `deny`, or `assign_to_me`; `assignee` must be `"me"` or `null`.
- A CSV filter contains an unknown value (`filter[status]`, `filter[review_status]`, `filter[event_type]`); the detail message lists the accepted values.
- Batch `rows` is missing, empty, not an array of objects, or longer than 500; `execution_ids` is empty or longer than 25.
- A record failed model validation on save — a cascade with no `name` or an unparseable `definition`, a webhook subscription with a blank, non-HTTPS, or private-network `url`, an unknown event in `event_filter`, a blank review `note`, or a blank / over-length `prompt` for generation.
How to fix it
- Read `details[]` — each entry names the `field` and the rule it broke. Fix every entry; the API reports all of them at once.
- For filters, copy the allowed values from the detail message rather than guessing.
- Split batches above 500 rows into several requests, each with its own `Idempotency-Key`.
Operations that return it
-
POST
/workflowsCreate a workflow -
PATCH
/workflows/{id}Update a workflow -
POST
/workflows/generateGenerate a workflow from a prompt -
POST
/workflows/{id}/triggerTrigger a workflow -
GET
/batchesList batches -
POST
/workflows/{id}/batchesCreate a batch from N rows -
GET
/batches/{id}/executionsList child executions of a batch -
GET
/executionsList executions -
POST
/executions/{id}/review_decisionsApprove or deny a paused review -
POST
/executions/{id}/review_assignmentClaim or unassign a review -
POST
/executions/{id}/review_notesAppend a review note -
POST
/executions/review_bulk_actionsBulk approve / deny / assign_to_me -
POST
/webhook_subscriptionsCreate a webhook subscription -
PATCH
/webhook_subscriptions/{id}Update a webhook subscription -
GET
/webhook_deliveriesList webhook deliveries
Example response
HTTP/1.1 422 Unprocessable Content
· Content-Type: application/json
422 Unprocessable Content
{
"error": {
"code": "validation_failed",
"message": "The request could not be processed.",
"details": [
{
"field": "execution_mode",
"message": "must be test or live"
}
],
"request_id": "6f1c2a3e-8d4b-4c5e-9f0a-1b2c3d4e5f60",
"doc_url": "https://cascades.crscreditapi.com/docs/api/errors/validation_failed"
}
}