Skip to main content

Update Routing Rule

PATCH /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

ParameterTypeDescription
processorIdstring (uuid)Processor ID
ruleIdstring (uuid)Rule ID

Request Body

FieldTypeRequiredDescription
namestringNoUpdated rule name
workflow_idstring (uuid)NoNew target workflow
conditionsarrayNoReplaces all conditions (full array, not a merge)
positionintegerNoNew evaluation order
is_activebooleanNoEnable 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"
}

500 — Internal server error