Skip to main content
POST
/
dispatch
/
router
Dispatch object to router
curl --request POST \
  --url https://api.routera.io/dispatch/router \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "router_id": "<string>",
  "object_id": "<string>"
}
'
{
  "message": "The object was successfully assigned",
  "success": true,
  "user": "jane@example.com",
  "field_name": "contact_owner",
  "owner_assigned_at": "Thu, 12 Jun 2025 14:30:00 GMT"
}

Endpoint

POST https://api.routera.io/dispatch/router
Route: /dispatch/router
Authentication: Bearer JWT
Runs router assignment logic for a given object: evaluates triggers, availability, distribution model, and assigns an owner when rules match.

Request body

FieldRequiredDescription
router_idYesRouter to execute
object_idYesObject to assign
{
  "router_id": "router-uuid",
  "object_id": "object-uuid"
}

Responses

200 — Assignment succeeded
FieldDescription
messageHuman-readable outcome
successtrue when the object was assigned
userEmail of the assigned owner
field_nameDisplay name of the owner field updated
owner_assigned_atAssignment timestamp (RFC 2822 UTC)
{
  "message": "The object was successfully assigned",
  "success": true,
  "user": "jane@example.com",
  "field_name": "contact_owner",
  "owner_assigned_at": "Thu, 12 Jun 2025 14:30:00 GMT"
}
When the router has a HubSpot integration and sync fails after a successful Routera assignment, the response is still 200 with success: true plus:
FieldDescription
hubspot_sync_failedtrue
hubspot_errorHubSpot sync error detail
200 — Other outcomes (no assignment; response has message only, no error flag)
message
Trigger did not match
Router not found
Object not found
The router is unpublished
The router has no settings
Account not found
Account is not active
Assignment limit reached
The router can not overwrite
There are no users available and the backup user is disabled
400 — Invalid JSON or missing required fields
{
  "message": "Invalid event: require router_id and object_id",
  "error": true
}
500 — Processing error
{
  "message": "<error detail>",
  "error": true
}
This endpoint can also be invoked asynchronously via SQS with the same router_id and object_id fields in the message body.

Authorizations

Authorization
string
header
required

Bearer JWT with valid account context.

Body

application/json
router_id
string
required

Router to run

object_id
string
required

Object to assign

Response

Dispatch completed

Assignment succeeded, or a non-error outcome (HTTP 200). When success is true, the object was assigned.

message
string
success
boolean

Present and true when the object was assigned

user
string

Email of the user assigned as owner

field_name
string

Display name of the owner field that was updated

owner_assigned_at
string

Assignment timestamp (RFC 2822 UTC)

hubspot_sync_failed
boolean

True when Routera assigned the owner but HubSpot sync failed

hubspot_error
string

HubSpot sync error detail (when hubspot_sync_failed is true)

error
boolean

True only on HTTP 400/500 error responses