Create Activity Result
Create a task activity result.
POST /api/activity-results/tasks
Create a result for a task activity from the internal admin/operator app. Results can be linked to an existing Reten activity (pass activity_id) or created as standalone entries (omit it).
Auth: Required — Authorization: Bearer <token> + x-tenant-id + x-project-id headers, with the activity-result:submit permission.
This is the internal endpoint. External providers use the partner endpoint POST /api/integration/activity-results/tasks, which has a different request shape and is authenticated with x-api-key.
Request Body
All fields are snake_case.
| Field | Type | Required | Description |
|---|---|---|---|
activity_id | UUID | No | Reten activity ID. Omit to create a STANDALONE result not tied to an existing activity. |
commerce_id | UUID | No | Internal Reten commerce ID. |
channel | enum | No | Channel through which the activity was actioned. One of SALESMAN, CALLCENTER, WHATSAPP, EMAIL, SMS, PUSH. |
result | string | Yes | Result-type code (e.g., success, not_home). Pattern ^[a-zA-Z0-9_-]+$, max 100 chars. |
comment | string | No | Free text comment, max 500 chars. |
future_scheduled_at | ISO 8601 | Conditional | Required only when the selected result-type demands a follow-up date. |
Example
curl -X POST https://api.reten.ai/api/activity-results/tasks \
-H "Authorization: Bearer <token>" \
-H "x-tenant-id: <tenant-id>" \
-H "x-project-id: <project-id>" \
-H "Content-Type: application/json" \
-d '{
"activity_id": "ee0e8400-e29b-41d4-a716-446655440000",
"channel": "SALESMAN",
"result": "success",
"comment": "Order placed successfully"
}'const response = await fetch("https://api.reten.ai/api/activity-results/tasks", {
method: "POST",
headers: {
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
"x-project-id": "<project-id>",
"Content-Type": "application/json",
},
body: JSON.stringify({
activity_id: "ee0e8400-e29b-41d4-a716-446655440000",
channel: "SALESMAN",
result: "success",
comment: "Order placed successfully",
}),
});
const result = await response.json();import requests
response = requests.post(
"https://api.reten.ai/api/activity-results/tasks",
headers={
"Authorization": "Bearer <token>",
"x-tenant-id": "<tenant-id>",
"x-project-id": "<project-id>",
},
json={
"activity_id": "ee0e8400-e29b-41d4-a716-446655440000",
"channel": "SALESMAN",
"result": "success",
"comment": "Order placed successfully",
},
)
result = response.json()Response 201 Created
The internal endpoint returns the enriched activity-result entity directly. The representative subset:
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"projectId": "3f6c2b1a-8d4e-4f7a-9b2c-5e1d0a7f6c34",
"source": "RETEN_ACTIVITY",
"origin": "PLATFORM",
"activityId": "ee0e8400-e29b-41d4-a716-446655440000",
"commerceId": "c1d2e3f4-a5b6-7890-cdef-1234567890ab",
"resultStatus": "COMPLETED",
"occurredAt": "2026-04-11T10:30:00.000Z",
"createdAt": "2026-04-11T10:30:05.000Z",
"updatedAt": "2026-04-11T10:30:05.000Z",
"taskDetails": {
"comment": "Order placed successfully",
"isEffective": true,
"futureScheduledAt": null,
"result": {
"code": "success",
"label": "Éxito"
},
"answers": null,
"modality": null,
"formId": null,
"formVersion": null
}
}Notes
- If
activity_idmatches an existing activity,sourceisRETEN_ACTIVITY; if omitted,sourceisSTANDALONE. - The status of the activity associated with the result becomes completed (regardless of whether the result is positive or negative, e.g. "no sale" or "schedule for another day").
taskDetails.isEffectivesays whether the result counted as effective, that is, whether the customer expressed a preference. It is copied from its result type when the result is registered or its result code changes, and it does not change if the result type is reclassified later.taskDetails.resultConfig.isEffectiveis the result type's current mark, so the two can differ.taskDetails.answers,taskDetails.modality,taskDetails.formIdandtaskDetails.formVersionare alwaysnullon a result registered through this endpoint: they are filled only when a result is submitted with the answers to a form, through the integration endpoint.- The activity accepts a result in every state except
CANCELED. That includesFAILED: the result completes the activity. - Once the day of the activity closes, this endpoint rejects the result: the margin for late submissions applies only to the integration endpoint.