latestOpenAPI 3.1.02026-08-171503582.2 MB

6199a9464227

Workflow Tasks

Create a workflow task

Creates a workflow task on a draft workflow revision. AI and Code tasks cannot have due date offsets or stop flags. Task names can include merge tag variables (e.g. {{workflow.name}}). Use the listWorkflowRevisionVariables endpoint to discover available variables.

💡 Notes for MCP clients:

  • Don't prefix task names with numbers (e.g. "1. ", "Task 1:"). The UI already shows a position number next to each task, and task order can change — hard-coded numbers go stale.
  • Consider adding content widgets to tasks with instructions, context, or guidance for the person running the workflow. Well-explained tasks make processes easier to follow.
post/workflows/{workflowId}/revisions/{revisionId}/tasks

Path parameters

workflowIdstring required

The ID of the Workflow

revisionIdstring required

The ID of the Revision

Request body

namestring

Display name.

taskType'Standard' | 'Approval' | 'AI' | 'Code'

What the task does.

  • Standard — a regular task that a user manually checks off when done.
  • Approval — an approval task; a reviewer approves or rejects it, gating subsequent tasks.
  • AI — an automated task that runs an AI prompt to populate form field values.
  • Code — an automated task that runs a custom code snippet.
stopboolean
hiddenByDefaultboolean

When true, the widget is hidden by default; conditional logic rules can reveal it at runtime. Defaults to false.

dueOffsetstring

Response

Example response

{
  "data": {
    "audit": {
      "createdBy": {
        "id": "naAJxoDIuwdgNsQHGRRGqA",
        "email": "jane.doe@example.com",
        "username": "Jane Doe"
      },
      "updatedBy": {
        "id": "naAJxoDIuwdgNsQHGRRGqA",
        "email": "jane.doe@example.com",
        "username": "Jane Doe"
      }
    },
    "links": [
      {
        "href": "https://api.process.st/api/v1.1/resource/XXX"
      }
    ]
  },
  "links": [
    {
      "href": "https://api.process.st/api/v1.1/resource/XXX"
    }
  ]
}