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).
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /internal/workflows | List Workflows in your organization. |
| POST | /internal/workflows | Create a new Workflow template. |
| GET | /internal/workflows/search | Search 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-data | Get the fields available for mapping at a specific step. |
| POST | /workflow/{id}/steps/{stepOrder}/validate-field-mappings | Validate 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
flowIdwithin 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.