Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mileapp.dev/llms.txt

Use this file to discover all available pages before exploring further.

What is a Workflow?

A Workflow is a named template that chains multiple Flows into a sequence of steps. Workflows are used by the Activity feature — when an Activity is created from a Workflow, MileApp creates one parent task (taskType = activityMaster) plus one child task (taskType = activityChild) per Workflow step. Each Workflow step references a Flow and can optionally define:
  • An assignee that becomes the default user for tasks created at that step.
  • A status mapping that maps the step’s task to a status label (such as the Workflow’s custom statuses).
  • Field mappings that copy field values from earlier steps’ completed tasks into the current step’s new task (step 2 and later), or set manual default values (step 1).
To see the details of the Workflow object, please follow this link.

Endpoints

MethodPathDescription
GET/internal/workflowsList Workflows in your organization.
POST/internal/workflowsCreate a new Workflow template.
GET/internal/workflows/searchSearch Workflows by name or step Flow name.
GET/workflow/{id}Get a single Workflow by ID.
PUT/workflow/{id}Update an existing Workflow’s name, steps, or custom statuses.
DELETE/workflow/{id}Delete a Workflow (rejected if there are Activities still using it).
GET/workflow/{id}/steps/{stepOrder}/field-mapping-dataGet the fields available for mapping at a specific step.
POST/workflow/{id}/steps/{stepOrder}/validate-field-mappingsValidate a step’s field mapping configuration before saving.

Constraints

  • Workflow name must be unique within your organization and between 2 and 100 characters.
  • A Workflow can have between 1 and 10 steps.
  • Each step must reference a different Flow — no duplicate flowId within the same Workflow.
  • Step count cannot change after the Workflow is created — updates that change the number of steps are rejected with HTTP 400.
  • A Workflow cannot be deleted while there are Activity tasks still referencing it.