Routes
Assign/Remove Operator
Assign or remove an operator from a route.
POST /api/routes/:id/operators
Assign an operator to a route with an optional role. Assignment is idempotent — if the link exists but is inactive, it gets reactivated.
Auth: Required — MANAGE_ROUTES permission
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Route ID |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
operatorId | UUID | Yes | Operator to assign |
role | string | No | LEAD or MEMBER |
Example
curl -X POST https://api.reten.ai/api/routes/dd0e8400-e29b-41d4-a716-446655440000/operators \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "Content-Type: application/json" \
-d '{
"operatorId": "cc0e8400-e29b-41d4-a716-446655440000",
"role": "LEAD"
}'import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/routes/dd0e8400-e29b-41d4-a716-446655440000/operators',
{
operatorId: 'cc0e8400-e29b-41d4-a716-446655440000',
role: 'LEAD',
},
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);Response 201 Created
{
"routeId": "dd0e8400-e29b-41d4-a716-446655440000",
"operatorId": "cc0e8400-e29b-41d4-a716-446655440000",
"role": "LEAD",
"isActive": true
}DELETE /api/routes/:id/operators/:opId
Remove an operator from a route. This is a hard delete of the link record.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Route ID |
opId | UUID | Operator ID |
Example
curl -X DELETE https://api.reten.ai/api/routes/dd0e8400-e29b-41d4-a716-446655440000/operators/cc0e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>"import axios from 'axios';
const response = await axios.delete(
'https://api.reten.ai/api/routes/dd0e8400-e29b-41d4-a716-446655440000/operators/cc0e8400-e29b-41d4-a716-446655440000',
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);