Reten Docs
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

FieldTypeRequiredDescription
typestringYesSALESMAN, ACTIVATOR, or CALLCENTER
namestringYesOperator name
emailstringNoEmail address
phonestringNoPhone number
external_idstringNoExternal system identifier
is_placeholderbooleanNoMark as placeholder record
metadataobjectNoArbitrary 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

StatusDescription
409Email already exists or duplicate type + externalId