Update Routing Rule
/processors/:processorId/rules/:ruleId
Update a routing rule's name, conditions, target workflow, position, or active status. Only include the fields you want to change.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
processorId | string (uuid) | Processor ID |
ruleId | string (uuid) | Rule ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated rule name |
workflow_id | string (uuid) | No | New target workflow |
conditions | array | No | Replaces all conditions (full array, not a merge) |
position | integer | No | New evaluation order |
is_active | boolean | No | Enable or disable the rule |
Example
curl -X PATCH https://api.getnexor.ai/api/public/processors/abc-123-uuid/rules/rule-uuid \
-H "Content-Type: application/json" \
-H "X-API-Key: nxr_live_your_api_key" \
-d '{
"name": "English leads (updated)",
"conditions": [
{
"field": "metadata.language",
"operator": "in",
"value": ["EN", "en", "english"]
}
]
}'
Responses
200 — Rule updated
{
"success": true,
"rule": {
"id": "rule-uuid",
"processor_id": "abc-123-uuid",
"name": "English leads (updated)",
"workflow_id": "uuid-of-en-workflow",
"conditions": [
{
"field": "metadata.language",
"operator": "in",
"value": ["EN", "en", "english"]
}
],
"position": 1,
"is_active": true,
"created_at": "2026-03-31T12:00:00Z",
"updated_at": "2026-03-31T14:00:00Z"
}
}
400 — Validation error
{
"error": "Validation error",
"message": "workflow_id not found or does not belong to your account"
}
401 — Authentication error
See Authentication.
404 — Not found
{
"error": "Not found",
"message": "Rule not found"
}