Workflows
Workflows define the stages a project moves through — from proposal to completion. Create custom workflows, add stages with colors, and assign workflows to projects.
The Workflow Object
Section titled “The Workflow Object”| Field | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the workflow |
account_id | uuid | ID of the account that owns the workflow |
name | string | Workflow (pipeline) name |
is_default | bool | Whether this is the account’s default workflow; the default cannot be deleted |
stages | object[] | Ordered list of stages in the workflow |
created_at | datetime | Timestamp the workflow was created, ISO 8601 |
updated_at | datetime | Timestamp the workflow was last updated, ISO 8601 |
Create a new workflow with stages
Section titled “Create a new workflow with stages”Endpoint: workflows-create
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workflow (pipeline) name (required) |
stages | object[] | Yes | Ordered list of stages for the workflow; at least one is required |
curl -X POST https://api.driftwoodapp.com/api/workflows-create \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name": "...", "stages": []}'Delete a non-default workflow
Section titled “Delete a non-default workflow”Endpoint: workflows-delete
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the workflow to delete; the default workflow cannot be deleted |
curl -X POST https://api.driftwoodapp.com/api/workflows-delete \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "..."}'Get a workflow by ID
Section titled “Get a workflow by ID”Endpoint: workflows-get
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the workflow to retrieve |
curl -X POST https://api.driftwoodapp.com/api/workflows-get \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "..."}'List all workflows for the account
Section titled “List all workflows for the account”Endpoint: workflows-list
Replace the stages of a workflow
Section titled “Replace the stages of a workflow”Endpoint: workflows-set-stages
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the workflow whose stages to replace |
stages | object[] | Yes | New ordered list of stages; at least one is required. Stages currently in use cannot be removed |
curl -X POST https://api.driftwoodapp.com/api/workflows-set-stages \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "...", "stages": []}'Update a workflow name
Section titled “Update a workflow name”Endpoint: workflows-update
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Yes | ID of the workflow to update |
name | string | Yes | Updated workflow name (required) |
curl -X POST https://api.driftwoodapp.com/api/workflows-update \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{"id": "...", "name": "..."}'Error Codes
Section titled “Error Codes”| Code | Description |
|---|---|
workflows.name_required | Name required |
workflows.stages_required | Stages required |
workflows.stage_label_required | Stage label required |
workflows.invalid_id | Invalid id |
workflows.cannot_delete_default | Cannot delete default |
workflows.not_found | Not found |
workflows.invalid_stage_id | Invalid stage id |
workflows.stage_in_use | Stage in use |