# Crear tarea de flujo

Crea una tarea de flujo. Vea los parámetros definidos por OpenAPI, el cuerpo de solicitud y las respuestas a continuación.

Source: https://zild.ai/es-ES/docs/api-reference/post-api-FlowTask

POST `/FlowTask`

Crea una tarea de flujo. Vea los parámetros definidos por OpenAPI, el cuerpo de solicitud y las respuestas a continuación.

**Descripción de OpenAPI:** Registra una tarea vinculada a un flujo y una etapa, con el título, la descripción, el estado, la prioridad, el payload y el plazo indicados en el cuerpo de la solicitud.

## Autenticación

**Se requiere autenticación.** Envía tu clave de API de usuario en la cabecera X-API-Key.

## Parámetros

Esta operación no tiene parámetros de ruta, consulta o encabezado.

## Órgano solicitante

**Tipo de contenido:** `application/json` · **Schema:** `FlowTaskDto`



<table class="api-params"><thead><tr><th>Propiedad</th><th>Tipo</th><th>Obligatorio</th><th>Descripción</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>flowId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>currentFlowStageId</code></td><td><code>integer · int32</code></td><td>No</td><td>Identificador de la etapa actual. Al actualizar, cambiar este valor mueve la tarea y puede programar la ejecución del agente responsable de la etapa de destino.</td><td>—</td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>status</code></td><td><code>FlowTaskStatus</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>priority</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>payload</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>dueDate</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>createdAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>createdBy</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>completedAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>canceledAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>flowRecurringTaskId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>recurringOccurrenceAtUtc</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>scheduledOccurrenceAtUtc</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>



## Ejemplo de solicitud



```
curl --request POST \
  --url 'https://api.zild.ai/FlowTask' \
  --header 'X-API-Key: YOUR_USER_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "id": 0,
  "flowId": 0,
  "currentFlowStageId": 0,
  "title": "string",
  "description": "string",
  "status": 0,
  "priority": 0,
  "payload": "string",
  "dueDate": "2026-09-22T18:00:00Z",
  "createdAt": "2026-09-22T18:00:00Z",
  "createdBy": 0,
  "completedAt": "2026-09-22T18:00:00Z",
  "canceledAt": "2026-09-22T18:00:00Z",
  "flowRecurringTaskId": 0,
  "recurringOccurrenceAtUtc": "2026-09-22T18:00:00Z",
  "scheduledOccurrenceAtUtc": "2026-09-22T18:00:00Z"
}'
```



## Respuestas



<table class="api-params"><thead><tr><th>Estado</th><th>Descripción</th><th>Cuerpo de respuesta</th></tr></thead><tbody><tr><td><code>200</code></td><td>Operación completada correctamente.</td><td><code>application/json</code> · <code>FlowTaskDto</code></td></tr></tbody></table>

**Respuesta de ejemplo (200):**



```
{
  "id": 0,
  "flowId": 0,
  "currentFlowStageId": 0,
  "title": "string",
  "description": "string",
  "status": 0,
  "priority": 0,
  "payload": "string",
  "dueDate": "2026-09-22T18:00:00Z",
  "createdAt": "2026-09-22T18:00:00Z",
  "createdBy": 0,
  "completedAt": "2026-09-22T18:00:00Z",
  "canceledAt": "2026-09-22T18:00:00Z",
  "flowRecurringTaskId": 0,
  "recurringOccurrenceAtUtc": "2026-09-22T18:00:00Z",
  "scheduledOccurrenceAtUtc": "2026-09-22T18:00:00Z"
}
```



## Modelos de datos

`FlowTaskDto`

<table class="api-params"><thead><tr><th>Propiedad</th><th>Tipo</th><th>Obligatorio</th><th>Descripción</th><th>Constraints</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>flowId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>currentFlowStageId</code></td><td><code>integer · int32</code></td><td>No</td><td>Identificador de la etapa actual. Al actualizar, cambiar este valor mueve la tarea y puede programar la ejecución del agente responsable de la etapa de destino.</td><td>—</td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>status</code></td><td><code>FlowTaskStatus</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>priority</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>payload</code></td><td><code>string</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>dueDate</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>createdAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>createdBy</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>—</td></tr><tr><td><code>completedAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>canceledAt</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>flowRecurringTaskId</code></td><td><code>integer · int32</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>recurringOccurrenceAtUtc</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr><tr><td><code>scheduledOccurrenceAtUtc</code></td><td><code>string · date-time</code></td><td>No</td><td>—</td><td>nullable</td></tr></tbody></table>

`FlowTaskStatus`0 = Pending; 1 = InProgress; 2 = Completed; 3 = Canceled

`integer`
