Operators
Create Operator
Create a new field operator.
POST /api/operators
Create a new operator with type, contact info, and metadata.
Auth: Required — MANAGE_OPERATORS permission
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | SALESMAN, ACTIVATOR, or CALLCENTER |
name | string | Yes | Operator name |
email | string | No | Email address |
phone | string | No | Phone number |
external_id | string | No | External system identifier |
is_placeholder | boolean | No | Mark as placeholder record |
metadata | object | No | Arbitrary JSON |
Example
curl -X POST https://api.reten.ai/api/operators \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "Content-Type: application/json" \
-d '{
"type": "SALESMAN",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+56912345678",
"external_id": "emp-001"
}'import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/operators',
{
type: 'SALESMAN',
name: 'John Doe',
email: 'john.doe@example.com',
phone: '+56912345678',
external_id: 'emp-001',
},
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);Response 201 Created
{
"id": "cc0e8400-e29b-41d4-a716-446655440000",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "+56912345678",
"type": "SALESMAN",
"externalId": "emp-001",
"isActive": true,
"isPlaceholder": false
}Error Responses
| Status | Description |
|---|---|
409 | Email already exists or duplicate type + externalId |