Workflow
Manage approval workflows to control the content review process.
Workflows enable you to set up approval processes for posts, messages and advocacy stories before they're published. Each workflow consists of one or more steps that define which users need to approve the content and whether everyone or just one approver is required at each stage. Once content passes through all workflow steps, it's automatically approved and ready for publishing.
For more details on configuring workflows in the Oktopost platform, see our Help Center article on Approval Workflows.
Workflow Structure
A workflow consists of:
- Workflow - The parent approval process with a name and status
- Steps - Individual approval stages within the workflow
- Approvers - Users assigned to approve content at each step
Content moves through workflow steps sequentially. At each step, approval is required before proceeding to the next step.
Get Workflow
Retrieve details for a specific workflow by ID, optionally including its steps.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| withSteps | Integer | No | Set to 1 to include the workflow's steps in the response. |
Request
curl -i "https://api.oktopost.com/v2/workflow/cwf000000000000?withSteps=1"Response
{
"Result": true,
"Id": "cwf000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "My Workflow",
"Status": "active",
"Steps": [
{
"Id": "cws000000000000",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000000",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "Main User",
"Email": "user@oktopost.com"
}
]
},
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000000",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}Response Fields
| Field | Description |
|---|---|
| Status | Workflow status. Values: active, inactive |
| Steps | Array of workflow steps (only included if withSteps=1) |
| MustBeApprovedByEveryone | If true, all approvers must approve. If false, any single approver can approve. |
| Approvers | Array of users assigned to approve content at this step |
List Workflows
Retrieve all workflows in your account.
Pagination is disabled for this endpoint. All workflows are returned in a single response.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| withSteps | Integer | No | Set to 1 to include each workflow's steps in the response. |
Request
curl -i "https://api.oktopost.com/v2/workflow?withSteps=1"Response
{
"Result": true,
"Items": [
{
"Id": "cwf000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "My Workflow",
"Status": "active",
"Steps": [
{
"Id": "cws000000000000",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000000",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "Main User",
"Email": "user@oktopost.com"
}
]
},
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000000",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}
]
}Get Workflow Step
Retrieve details for a specific workflow step by ID.
Request
curl -i https://api.oktopost.com/v2/workflow-step/cws000000000000Response
{
"Result": true,
"Id": "cws000000000000",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000000",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "Main User",
"Email": "user@oktopost.com"
}
]
}List Workflow Steps
Retrieve all workflow steps in your account or filter by a specific workflow.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workflowId | String | No | Filter results by workflow ID to get steps for a specific workflow. |
Request
curl -i "https://api.oktopost.com/v2/workflow-step?workflowId=cwf000000000000"Response
{
"Result": true,
"Items": [
{
"Id": "cws000000000000",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000000",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000000",
"Created": "2020-09-03 11:10:27",
"Name": "Main User",
"Email": "user@oktopost.com"
}
]
},
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000000",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}Understanding Workflow Steps
Approval Logic
Each workflow step has two key properties that determine how approval works:
-
MustBeApprovedByEveryone:
true- All assigned approvers must approve before content moves to the next stepfalse- Any single approver can approve to move content forward
-
Approvers:
- Array of users who can approve content at this step
- If empty, the step may require manual configuration in the platform
Sequential Processing
Content moves through workflow steps in order:
- Content is submitted to the first workflow step
- Approvers review and approve (or reject) the content
- Once the step is approved, content moves to the next step
- Process repeats until all steps are completed
- Content is automatically approved and ready for publishing
Use Cases
Checking Workflow Configuration
Retrieve workflows with steps to verify approval process setup:
curl -i "https://api.oktopost.com/v2/workflow?withSteps=1"Identifying Approvers
Get step details to see who can approve content at each stage:
curl -i https://api.oktopost.com/v2/workflow-step/cws000000000000Filtering by Workflow
Retrieve all steps for a specific workflow to understand its complete approval process:
curl -i "https://api.oktopost.com/v2/workflow-step?workflowId=cwf000000000000"Best Practices
- Use
withSteps=1when you need complete workflow structure in a single call - Query individual steps when you need detailed information about specific approval stages
- Check
MustBeApprovedByEveryoneto understand approval requirements at each step - Verify approver lists to ensure appropriate users are assigned to each step
- Monitor workflow status to identify inactive workflows that may need attention
Related Endpoints
For managing content through the approval process:
- Workflow Items - View and manage posts and messages pending approval
- Posts - Send posts to workflows using the
workflowIdparameter - Messages - Send messages to workflows for approval before scheduling
For more information on configuring and using workflows, see the Oktopost Help Center.