ConnectCloud Developers

Answer a task – approve, reject or fill its form (tenant:flows:tasks, an assignee)

POST /api/flows/v1/tasks/{id}/answer

Module: Flows · operationId: answerFlowTask · Tag: Tasks · Auth: access token (Authorization: Bearer <accessToken>)

An approval needs outcome approved or rejected (required form fields only when approved); a form task needs its required fields. Values are checked against the form (400 invalid with field values.). The run continues on the outcome's port. Someone who is no assignee gets 404, the run's starter of a node with excludeStarter 403 starter_excluded, a task answered, timed out or cancelled 409 task_closed.

Parameters

Name In Type Required Description
id path string (uuid) yes

Request body

application/json (required)

  • comment (string): Comment stored with the answer (max length 4000)
  • outcome (string): approved or rejected for an approval (one of approved, rejected, completed)
  • values (object): Form values by field key

Example:

{
  "comment": "Passt, bitte beim Stammlieferanten bestellen.",
  "outcome": "approved",
  "values": {
    "kostenstelle": "4100 Vertrieb"
  }
}

Responses

  • 200 The answered task (application/json)
  • 400 Invalid input (invalid); field names the first invalid field, details.fields every one. (application/json)
  • 401 Missing, invalid or expired token (no body).
  • 403 The token lacks the permission or has no active tenant (forbidden). Also: person_required (a service-account key on personal flows or the task inbox), live_test_forbidden, forbidden_grant, starter_excluded. (application/json)
  • 404 The record does not exist in the token's tenant – or it belongs to a scope the caller may not view (a scoped flow stays hidden). (application/json)
  • 409 The state does not allow it: version_conflict (reload), no_changes, archived, key_taken, flow_disabled, flow_tripped, task_closed, run_finished. (application/json)

Fields of the 200 answer:

  • assignees (array of string, required): E-mail addresses of the people who may answer
  • body (string, required): Text, rendered when the task was created
  • canAnswer (boolean, required): The caller is an assignee of the open task
  • createdAt (string (date-time), required): When the task was created
  • flowId (string (uuid), required): Id of the flow
  • flowName (string, required): Name of the flow
  • form (array of object, required): The fields to fill in
    • key (string, required): Key of the value in values
    • label (string, required): Label of the field
    • type (string, required): Input type (one of text, longtext, number, bool, select, date)
    • options (array of string): The choices of a select field
    • required (boolean): The field must be filled in
  • id (string (uuid), required): Task id
  • nodeId (string, required): Id of the human_task node
  • runId (string (uuid), required): Id of the run that created the task
  • status (string, required): State of the task (one of open, completed, timed_out, cancelled)
  • title (string, required): Title, rendered when the task was created
  • type (string, required): approval (approve or reject) or form (fill in fields) (one of approval, form)
  • comment (string): Comment of the answer
  • completedAt (string (date-time)): When the task was answered or closed
  • completedBy (string): E-mail of who answered
  • deadlineAt (string (date-time)): Deadline of the task
  • outcome (string): How the task was answered or ended (one of approved, rejected, completed, timeout)
  • values (object): The submitted form values

Example 200 answer:

{
  "assignees": [
    "laura.kaestner@muster-it.example"
  ],
  "body": "Lukas Wimmer bittet um Freigabe der Bestellung für die neuen Arbeitsplätze im Vertrieb.",
  "canAnswer": true,
  "createdAt": "2026-11-18T08:14:31Z",
  "deadlineAt": "2026-11-20T16:00:00Z",
  "flowId": "2c8d4e6f-0a1b-4c3d-9e5f-7a8b9c0d1e2f",
  "flowName": "Beschaffung freigeben",
  "form": [
    {
      "key": "kostenstelle",
      "label": "Kostenstelle",
      "options": [
        "4100 Vertrieb",
        "4200 Technik"
      ],
      "required": true,
      "type": "select"
    }
  ],
  "id": "0b7e3c9a-5d1f-4a2b-8c6e-4f9a1b2c3d5e",
  "nodeId": "freigabe",
  "runId": "9a1b3c5d-7e2f-4a6b-8c0d-1e3f5a7b9c2d",
  "status": "open",
  "title": "Freigabe: 3 × Lenovo ThinkPad T14 Gen 5 (3.147,00 € netto)",
  "type": "approval"
}

Example request

curl -X POST 'https://api.mbcom.cloud/api/flows/v1/tasks/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12/answer' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"comment":"Passt, bitte beim Stammlieferanten bestellen.","outcome":"approved","values":{"kostenstelle":"4100 Vertrieb"}}'

View as Markdown · Interactive reference · OpenAPI