Skip to main content
POST /processors Create a pre-workflow processor that routes incoming leads to different workflows based on conditions. Instead of specifying a workflow_id when creating a lead, you send leads to the processor’s endpoint and it evaluates routing rules to assign the correct workflow automatically. Each processor has a default workflow — the fallback when no routing rule matches.

Request Body

FieldTypeRequiredDescription
namestringYesProcessor name (e.g., “Language Router”)
descriptionstringNoWhat this processor does
default_workflow_idstring (uuid)YesFallback workflow when no rule matches. Use GET /workflows to list available workflows

Example

curl -X POST https://api.getnexor.ai/api/public/processors \
  -H "Content-Type: application/json" \
  -H "X-API-Key: nxr_live_your_api_key" \
  -d '{
    "name": "Language Router",
    "description": "Routes leads to ES or EN workflows based on metadata.language",
    "default_workflow_id": "uuid-of-es-workflow"
  }'

Responses

201 — Processor created successfully

{
  "success": true,
  "processor": {
    "id": "abc-123-uuid",
    "name": "Language Router",
    "description": "Routes leads to ES or EN workflows based on metadata.language",
    "default_workflow_id": "uuid-of-es-workflow",
    "is_active": true,
    "created_at": "2026-03-31T12:00:00Z",
    "updated_at": "2026-03-31T12:00:00Z"
  }
}

400 — Validation error

{
  "error": "Validation error",
  "message": "name is required"
}
Other validation errors:
  • "default_workflow_id is required"
  • "default_workflow_id not found or does not belong to your account"

401 — Authentication error

See Authentication.

500 — Internal server error

Last modified on June 18, 2026