Skip to content
KnockDevelopers
Routing

List routing rules

Chat with a Developer
GET
/v1/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}.

Authorization

ApiKeyAuth
headerx-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.

Response Body

Your routing rules.

application/json
  1. 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.

Example Request
curl -X GET 'https://app.knock-ai.com/v1/routing-rules' \  -H 'x-api-key: <YOUR_API_KEY>'
Example Response
{  "routingRules": [    {      "routingId": "6c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",      "name": "Inbound demo requests",      "isDefault": false    }  ]}