Reten Docs

Task Result Type Configs

Per-tenant configuration of active result types.

GET /api/task-result-type-configs

List all tenant result type configurations.

Auth: Required — activity:view permission

Example

curl https://api.reten.ai/api/task-result-type-configs \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>"
import axios from 'axios';

const response = await axios.get(
  'https://api.reten.ai/api/task-result-type-configs',
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

const configs = response.data;

Response 200 OK

[
  {
    "id": "880e8400-e29b-41d4-a716-446655440000",
    "code": "success",
    "label": "✅ Venta",
    "requiresFutureScheduledAt": false,
    "isActive": true,
    "createdAt": "2026-06-18T06:00:00.000Z",
    "updatedAt": "2026-06-18T06:00:00.000Z"
  },
  {
    "id": "990e8400-e29b-41d4-a716-446655440000",
    "code": "decision_maker_unavailable",
    "label": "👤 No se encuentra",
    "requiresFutureScheduledAt": false,
    "isActive": true,
    "createdAt": "2026-06-18T06:00:00.000Z",
    "updatedAt": "2026-06-18T06:00:00.000Z"
  }
]

GET /api/task-result-type-configs/defaults

Return the platform default result types as a flat { code, label } catalog. The admin app uses this to prefill the import dialog with the result types a tenant can adopt.

Auth: Required — activity:view permission

This endpoint is prefill, not an entity. The payload is the hardcoded defaults catalog — non-authoritative and NOT persisted — and always lists every default regardless of what the tenant already has. To adopt them, the admin picks the ones that are still missing and creates them via POST /api/task-result-type-configs/bulk. Nothing is created by calling this endpoint.

Example

curl https://api.reten.ai/api/task-result-type-configs/defaults \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>"
import axios from 'axios';

const response = await axios.get(
  'https://api.reten.ai/api/task-result-type-configs/defaults',
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

const defaults = response.data;

Response 200 OK

[
  {
    "code": "success",
    "label": "✅ Venta"
  },
  {
    "code": "decision_maker_unavailable",
    "label": "👤 No se encuentra"
  }
]

POST /api/task-result-type-configs

Create a tenant result type configuration.

Auth: Required — activity-config:manage permission

Request Body

FieldTypeRequiredDescription
codestringYesUnique code identifying this result type in the tenant catalog
labelstringYesDisplay label for this tenant

Example

curl -X POST https://api.reten.ai/api/task-result-type-configs \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "code": "success",
    "label": "Exito"
  }'
import axios from 'axios';

const response = await axios.post(
  'https://api.reten.ai/api/task-result-type-configs',
  {
    code: 'success',
    label: 'Exito',
  },
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

Response 201 Created


POST /api/task-result-type-configs/bulk

Bulk create tenant result type configurations.

Auth: Required — activity-config:manage permission

Request Body

FieldTypeRequiredDescription
itemsarrayYesArray of configurations to create
items[].codestringYesUnique code identifying this result type in the tenant catalog
items[].labelstringYesDisplay label for this tenant

Example

curl -X POST https://api.reten.ai/api/task-result-type-configs/bulk \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "code": "success",
        "label": "Exito"
      },
      {
        "code": "no_answer",
        "label": "Sin respuesta"
      }
    ]
  }'
import axios from 'axios';

const response = await axios.post(
  'https://api.reten.ai/api/task-result-type-configs/bulk',
  {
    items: [
      {
        code: 'success',
        label: 'Exito',
      },
      {
        code: 'no_answer',
        label: 'Sin respuesta',
      },
    ],
  },
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

Response 201 Created


PATCH /api/task-result-type-configs/:id

Update a tenant result type configuration.

Auth: Required — activity-config:manage permission

Request Body

FieldTypeRequiredDescription
labelstringNoDisplay label
is_activebooleanNoEnable or disable this config

Example

curl -X PATCH https://api.reten.ai/api/task-result-type-configs/<id> \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>" \
  -H "Content-Type: application/json" \
  -d '{
    "is_active": false
  }'
import axios from 'axios';

const response = await axios.patch(
  'https://api.reten.ai/api/task-result-type-configs/<id>',
  {
    is_active: false,
  },
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

Response 200 OK


DELETE /api/task-result-type-configs/:id

Deactivate a tenant result type configuration.

Auth: Required — activity-config:manage permission

Example

curl -X DELETE https://api.reten.ai/api/task-result-type-configs/<id> \
  -H "Authorization: Bearer <token>" \
  -H "x-tenant-id: <tenant-id>"
import axios from 'axios';

const response = await axios.delete(
  'https://api.reten.ai/api/task-result-type-configs/<id>',
  {
    headers: {
      Authorization: 'Bearer <token>',
      'x-tenant-id': '<tenant-id>',
    },
  }
);

Response 204 No Content