Skip to main content

Reorder Rules

PUT /processors/:processorId/rules/reorder

Bulk-update the position of all rules in a processor. Useful after drag-and-drop reordering in a UI. You must include all active rule IDs — any omitted rules will be appended at the end.

Path Parameters

ParameterTypeDescription
processorIdstring (uuid)Processor ID

Request Body

FieldTypeRequiredDescription
rule_idsarray of stringsYesOrdered list of rule UUIDs. First element gets position 1, second gets position 2, etc.

Example

curl -X PUT https://api.getnexor.ai/api/public/processors/abc-123-uuid/rules/reorder \
-H "Content-Type: application/json" \
-H "X-API-Key: nxr_live_your_api_key" \
-d '{
"rule_ids": [
"rule-2-uuid",
"rule-1-uuid",
"rule-3-uuid"
]
}'

Responses

200 — Rules reordered

{
"success": true,
"rules": [
{ "id": "rule-2-uuid", "name": "Spanish leads", "position": 1 },
{ "id": "rule-1-uuid", "name": "English leads", "position": 2 },
{ "id": "rule-3-uuid", "name": "Portuguese leads", "position": 3 }
]
}

400 — Validation error

{
"error": "Validation error",
"message": "rule_ids must be a non-empty array"
}

401 — Authentication error

See Authentication.

404 — Processor not found

{
"error": "Not found",
"message": "Processor not found or does not belong to your account"
}

500 — Internal server error