Reten Docs

Dispatch Providers

CRUD for global dispatch providers and channel definitions.

GET /api/dispatch-providers

List all global dispatch providers with their channel definitions.

Auth: Required — activity:view permission

Response 200 OK

[
  {
    "id": "660e8400-e29b-41d4-a716-446655440000",
    "code": "YOM",
    "name": "YOM Provider",
    "protocolType": "REST",
    "isActive": true,
    "channelDefinitions": [
      {
        "channel": "SALESMAN",
        "credentialSchema": [
          {
            "key": "apiKey",
            "label": "API Key",
            "type": "password",
            "required": true
          }
        ],
        "settingsSchema": []
      }
    ]
  }
]

GET /api/dispatch-providers/:id/channel-definitions

List channel definitions for a specific dispatch provider.

Auth: Required — activity:view permission

Path Parameters

ParameterTypeDescription
idUUIDDispatch provider ID

Example

curl https://api.reten.ai/api/dispatch-providers/660e8400-e29b-41d4-a716-446655440000/channel-definitions \
  -H "Authorization: Bearer <token>"
const providerId = "660e8400-e29b-41d4-a716-446655440000";
const response = await fetch(`https://api.reten.ai/api/dispatch-providers/${providerId}/channel-definitions`, {
  headers: { "Authorization": "Bearer <token>" },
});
const definitions = await response.json();
import requests

provider_id = "660e8400-e29b-41d4-a716-446655440000"
response = requests.get(
    f"https://api.reten.ai/api/dispatch-providers/{provider_id}/channel-definitions",
    headers={"Authorization": "Bearer <token>"},
)
definitions = response.json()

Response 200 OK

[
  {
    "id": "770e8400-e29b-41d4-a716-446655440000",
    "dispatchProviderId": "660e8400-e29b-41d4-a716-446655440000",
    "channel": "SALESMAN",
    "credentialSchema": [
      {
        "key": "apiKey",
        "label": "API Key",
        "type": "password",
        "required": true
      }
    ],
    "settingsSchema": [],
    "createdAt": "2025-01-15T10:00:00.000Z",
    "updatedAt": "2025-01-15T10:00:00.000Z"
  }
]

Error Responses

StatusDescription
404Dispatch provider not found

POST /api/dispatch-providers

Create a new global dispatch provider.

Auth: Required — activity-config:manage permission

Request Body

FieldTypeRequiredDescription
codestringYesUnique provider code
namestringYesProvider name
protocol_typestringYesREST, WEBHOOK, EMAIL, SMS, or WSP

Response 201 Created


PATCH /api/dispatch-providers/:id

Update a dispatch provider.

Auth: Required — activity-config:manage permission

Request Body

FieldTypeRequiredDescription
namestringNoProvider name
protocol_typestringNoProtocol type
is_activebooleanNoActive status

Response 200 OK