Manage Routing Rule
Retrieve, update, or delete a routing rule by ID. Update conditions, actions, priority, or enabled state. Deleting a rule does not affect previously routed documents.
Retrieve, update, or delete a single routing rule. Updates take effect immediately — the next document_classified event will use the updated rule. Deleting a rule does not retroactively affect documents that were already routed by it.
Use GET to inspect a rule's conditions, actions, and priority. Use PATCH to adjust conditions, change the schema assignment, toggle is_active, or update the priority. Use DELETE when a rule is no longer needed — previously routed documents are not affected.
The PATCH response returns the full updated rule including the new updated_at timestamp. All fields are optional — only include fields you want to change. The is_active toggle lets you temporarily disable a rule without deleting it, which is useful for testing or during maintenance windows.
After updating priority via PATCH, use GET /v1/routing-rules to verify the full evaluation order. For bulk priority changes, prefer the POST /v1/routing-rules/reorder endpoint instead of patching individual rules. Pair deletion with rule creation to replace a rule atomically.
document_classified events. Documents already routed by a previous version of the rule retain their assigned schema and routing actions./v1/routing-rules/:idResponse
Response fields
Response (GET)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Route invoices to finance schema",
"trigger_type": "document_classified",
"conditions": { "field": "document_type", "operator": "eq", "value": "invoice" },
"action_type": "route_to_schema",
"actions": { "type": "assign_schema", "schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
"priority": 1,
"is_active": true,
"review_required": false,
"source_connection_id": null,
"created_at": "2024-09-01T10:00:00.000Z",
"updated_at": null,
"links": {
"self": "/v1/routing-rules/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Errors
Error responses (GET)
/v1/routing-rules/:idResponse
Response fields (PATCH)
Response (PATCH)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Route invoices to finance schema",
"trigger_type": "document_classified",
"conditions": { "field": "document_type", "operator": "eq", "value": "invoice" },
"action_type": "route_to_schema",
"actions": { "type": "assign_schema", "schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
"priority": 1,
"is_active": false,
"review_required": false,
"source_connection_id": null,
"created_at": "2024-09-01T10:00:00.000Z",
"updated_at": "2024-09-20T08:00:00.000Z",
"links": {
"self": "/v1/routing-rules/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}Errors
Error responses (PATCH)
/v1/routing-rules/:idResponse
Response fields (DELETE)
Response (DELETE)
{
"deleted": true,
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Errors
Error responses (DELETE)