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
| Parameter | Type | Description |
|---|---|---|
id | UUID | Dispatch 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
| Status | Description |
|---|---|
404 | Dispatch provider not found |
POST /api/dispatch-providers
Create a new global dispatch provider.
Auth: Required — activity-config:manage permission
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Unique provider code |
name | string | Yes | Provider name |
protocol_type | string | Yes | REST, 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
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Provider name |
protocol_type | string | No | Protocol type |
is_active | boolean | No | Active status |