List routing rules
Returns your routing rules from Workflow Routing in the Knock dashboard, the default rule first, then by name: the rules your forms and workflows route with, whose routingId POST /v1/route takes.
The list is not paged: it holds at most 15 rules, the cap on a workspace's rules. A default rule can be added past that cap, and then the last rule by name is left out, though its routingId still reads and routes. Read a rule's segments and assignees with GET /v1/routing-rules/{routingId}.
ApiKeyAuthx-api-key<token>Your Knock API key. Ask your Knock account team for one: a key with the Enrichment API role to enrich and route leads, or the Viewer role to read chats, meetings and routing rules.
Your routing rules.
application/json- response
Your routing rules.
routingRules*array<>Your routing rules, the default rule first, then by name, at most 15: the list is not paged. A workspace has at most 15 rules, but its default rule can be added past that cap, and then the last rule by name is not listed; its routingId still reads and routes.
curl -X GET 'https://app.knock-ai.com/v1/routing-rules' \ -H 'x-api-key: <YOUR_API_KEY>'{ "routingRules": [ { "routingId": "6c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f", "name": "Inbound demo requests", "isDefault": false } ]}Route a lead POST
Routes a lead, identified by email, with one of your routing rules and returns the decision: the outcome, the matching segment, the assignee (the team member t…
Get a routing rule GET
Returns one routing rule with its segments, in the order they are checked, and its fallback: how POST /v1/route routes a lead with it.