Skip to main content

List Routing Rules

List document routing rules ordered by priority. Rules match incoming documents by conditions and apply actions like automatic schema assignment.

Routing rules automate document processing: each rule matches incoming documents against conditions (like document type) and applies an action (like assigning an extraction schema). The GET /v1/routing-rules endpoint lists every rule in your workspace. Rules are evaluated in priority order, and the first matching rule wins.

When a document is classified (after OCR and type detection), the routing engine evaluates each active rule in priority order. The first rule whose conditions match is applied, and subsequent rules are skipped. This lets you build a priority chain: specific rules at the top, catch-all rules at the bottom.

  • Rules trigger on document_classified events after OCR and type detection.
  • Conditions can match document_type, source, language, sensitivity, and other metadata.
  • Actions include schema assignment, Job triggering, and team routing.
  • Lower priority numbers are evaluated first.
Only the first matching rule is applied per document. If a document unexpectedly skips a rule, check whether a higher-priority (lower number) rule matched it first.
GET/v1/routing-rules

Query parameters

limitintegerMaximum number of results to return (1–100). Default: 20
cursorstringPagination cursor from a previous response.
orderstringSort direction by created_at. Default: desc

Request

Response

Response fields

dataarrayArray of routing rule objects, ordered by priority ascending.
data[].idstringRouting rule UUID.
data[].namestringHuman-readable rule name.
data[].trigger_typestringEvent type that triggers evaluation (e.g. document_classified).
data[].conditionsobjectCondition configuration used to match documents.
data[].action_typestringAction applied when the rule matches (e.g. route_to_schema).
data[].actionsobjectAction configuration.
data[].priorityintegerPriority order. Lower values are evaluated first.
data[].is_activebooleanWhether the rule is currently active.
data[].review_requiredbooleanWhether matched documents require manual review.
data[].source_connection_idstring | nullSource connection scope for this rule, if any.
data[].created_atstringISO 8601 creation timestamp.
data[].updated_atstring | nullISO 8601 last update timestamp.
data[].linksobjectRelated resource URLs (self).
pagination.totalintegerTotal number of rules.
pagination.limitintegerMaximum results per page.
pagination.has_morebooleanWhether more results exist beyond this page.
pagination.next_cursorstring | nullCursor to fetch the next page. Null if no more results.

Response

{
  "data": [
    {
      "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"
      }
    }
  ],
  "pagination": {
    "total": 5,
    "limit": 20,
    "has_more": false,
    "next_cursor": null
  }
}

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.