Create Routing Rule
Create a new routing rule with conditions on document properties and actions to apply when matched. Conditions can match document type, source, and other metadata.
POST
/v1/routing-rulesResponse
Response fields (201 Created)
idstringRouting rule UUID.
namestringRule name.
trigger_typestringAlways document_classified for rules created via the API.
conditionsobjectCondition configuration.
action_typestringResolved action type.
actionsobjectAction configuration.
priorityintegerAssigned priority.
is_activebooleanAlways true for newly created rules.
review_requiredbooleanWhether matched documents require manual review.
source_connection_idstring | nullSource connection scope, if any.
created_atstringISO 8601 creation timestamp.
updated_atstring | nullISO 8601 last update timestamp.
linksobjectRelated resource URLs (self).
Response (201 Created)
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"name": "Route contracts to legal schema",
"trigger_type": "document_classified",
"conditions": { "field": "document_type", "operator": "eq", "value": "contract" },
"action_type": "route_to_schema",
"actions": { "type": "assign_schema", "schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
"priority": 100,
"is_active": true,
"review_required": false,
"source_connection_id": null,
"created_at": "2024-09-15T14:00:00.000Z",
"updated_at": null,
"links": {
"self": "/v1/routing-rules/c3d4e5f6-a7b8-9012-cdef-123456789012"
}
}Errors
Error responses
401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.