Task Activities
Dispatch Task Activity
Manually dispatch a TASK activity to an external provider.
POST /api/activities/tasks/:id/dispatch
Manually dispatch a TASK activity to an external provider. The activity must be in READY status.
Auth: Required — DISPATCH_ACTIVITY permission
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | UUID | Activity ID |
Example
curl -X POST https://api.reten.ai/api/activities/tasks/ee0e8400-e29b-41d4-a716-446655440000/dispatch \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>"import axios from 'axios';
const response = await axios.post(
'https://api.reten.ai/api/activities/tasks/ee0e8400-e29b-41d4-a716-446655440000/dispatch',
{},
{
headers: {
Authorization: 'Bearer <token>',
'x-tenant-id': '<tenant-id>',
},
}
);Response 204 No Content
No response body. The activity status transitions to DISPATCHED on success.
Error Responses
| Status | Description |
|---|---|
400 | Activity is not in READY status or is not a TASK type |
404 | Activity not found |
404 | No dispatch config found for the activity's channel |
Notes
- Uses optimistic locking to prevent concurrent dispatch
- On failure, retries up to 3 times before marking as FAILED
- Credentials are decrypted only during dispatch execution