Reten Docs

Dispatch Configs

CRUD for per-tenant dispatch provider channel configurations.

GET /api/dispatch-configs

List all dispatch configs for the current tenant.

Auth: Required — VIEW_ACTIVITIES permission

Response 200 OK

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "dispatchProviderId": "660e8400-e29b-41d4-a716-446655440000",
    "channel": "SALESMAN",
    "baseUrl": "https://provider.example.com",
    "settings": {},
    "isActive": true,
    "dispatchProvider": {
      "code": "YOM",
      "name": "YOM Provider"
    }
  }
]

POST /api/dispatch-configs

Create a dispatch config for a provider+channel combination.

Auth: Required — MANAGE_ACTIVITY_CONFIG permission

Request Body

FieldTypeRequiredDescription
dispatchProviderIdUUIDYesGlobal dispatch provider ID
channelstringYesChannel (SALESMAN, CALLCENTER, etc.)
baseUrlstringYesProvider endpoint URL
credentialsobjectYesAuthentication credentials (will be encrypted)
settingsobjectNoAdditional configuration

Example

curl -X POST https://api.reten.ai/api/dispatch-configs \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "dispatchProviderId": "660e8400-e29b-41d4-a716-446655440000",
    "channel": "SALESMAN",
    "baseUrl": "https://provider.example.com",
    "credentials": {
      "apiKey": "sk-xxx"
    }
  }'
const response = await fetch("https://api.reten.ai/api/dispatch-configs", {
  method: "POST",
  headers: {
    "Authorization": "Bearer <token>",
    "x-tenant-id": "<tenant-id>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    dispatchProviderId: "660e8400-e29b-41d4-a716-446655440000",
    channel: "SALESMAN",
    baseUrl: "https://provider.example.com",
    credentials: { apiKey: "sk-xxx" },
  }),
});
const config = await response.json();
import requests

response = requests.post(
    "https://api.reten.ai/api/dispatch-configs",
    headers={
        "Authorization": "Bearer <token>",
        "x-tenant-id": "<tenant-id>",
    },
    json={
        "dispatchProviderId": "660e8400-e29b-41d4-a716-446655440000",
        "channel": "SALESMAN",
        "baseUrl": "https://provider.example.com",
        "credentials": {"apiKey": "sk-xxx"},
    },
)
config = response.json()

Response 201 Created

Validation

  • Provider must support the specified channel (channel definition must exist)
  • All required credential fields per the channel definition must be provided
  • All required settings fields per the channel definition must be provided

PATCH /api/dispatch-configs/:id

Update a dispatch config.

Auth: Required — MANAGE_ACTIVITY_CONFIG permission


DELETE /api/dispatch-configs/:id

Deactivate a dispatch config (soft delete).

Auth: Required — MANAGE_ACTIVITY_CONFIG permission

Response 204 No Content