Workflow
Get and list approval workflows and their steps.
Workflows let you 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 approved and ready for publishing.
For more details on configuring workflows in the Oktopost platform, see the Help Center article on Approval Workflows.
Workflow Structure
A workflow consists of:
- The 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 in order. Each step must be approved before the content moves to the next step.
Get Workflow
Retrieve a single workflow by ID, optionally with its steps.
GET /v2/workflow/:workflowId
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/workflow/cwf000000000001?withSteps=1" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Id": "cwf000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "My Workflow",
"Status": "active",
"Steps": [
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000001",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "Jane Smith",
"Email": "jane.smith@example.com"
}
]
},
{
"Id": "cws000000000002",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000001",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}Prop
Type
List Workflows
Retrieve all workflows in your account.
GET /v2/workflow
This endpoint isn't paginated. All workflows are returned in a single response.
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/workflow?withSteps=1" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Items": [
{
"Id": "cwf000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "My Workflow",
"Status": "active",
"Steps": [
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000001",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "Jane Smith",
"Email": "jane.smith@example.com"
}
]
},
{
"Id": "cws000000000002",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000001",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}
]
}Get Workflow Step
Retrieve a single workflow step by ID.
GET /v2/workflow-step/:stepId
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/workflow-step/cws000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Id": "cws000000000001",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000001",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "Jane Smith",
"Email": "jane.smith@example.com"
}
]
}List Workflow Steps
Retrieve all workflow steps in your account, optionally filtered by workflow.
GET /v2/workflow-step
Parameters
Prop
Type
Example Request
curl -X GET "https://api.oktopost.com/v2/workflow-step?workflowId=cwf000000000001" \
-u ACCOUNT_ID:API_KEYExample Response
{
"Result": true,
"Items": [
{
"Id": "cws000000000001",
"Created": "2020-09-03 11:10:27",
"WorkflowId": "cwf000000000001",
"Name": "Marketing",
"MustBeApprovedByEveryone": false,
"Approvers": [
{
"Id": "00A000000000001",
"Created": "2020-09-03 11:10:27",
"Name": "Jane Smith",
"Email": "jane.smith@example.com"
}
]
},
{
"Id": "cws000000000002",
"Created": "2020-09-03 11:11:37",
"WorkflowId": "cwf000000000001",
"Name": "Manager Confirmation",
"MustBeApprovedByEveryone": false,
"Approvers": []
}
]
}Understanding Workflow Steps
Approval Logic
Two properties of each workflow step determine how approval works:
MustBeApprovedByEveryone:true: all assigned approvers must approve before content moves to the next step.false: any single approver can approve to move content forward.
Approvers:- The users who can approve content at this step.
- If it's empty, the step may need 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, the content moves to the next step.
- The process repeats until all steps are complete.
- The content is approved and ready for publishing.
Use Cases
Checking Workflow Configuration
Retrieve workflows with their steps to verify the approval setup:
curl -X GET "https://api.oktopost.com/v2/workflow?withSteps=1" \
-u ACCOUNT_ID:API_KEYIdentifying Approvers
Get a step to see who can approve content at that stage:
curl -X GET "https://api.oktopost.com/v2/workflow-step/cws000000000001" \
-u ACCOUNT_ID:API_KEYFiltering by Workflow
Retrieve all steps of a workflow to see its complete approval process:
curl -X GET "https://api.oktopost.com/v2/workflow-step?workflowId=cwf000000000001" \
-u ACCOUNT_ID:API_KEYBest Practices
- Use
withSteps=1when you need the complete workflow structure in a single call. - Query individual steps when you need details about a specific approval stage.
- Check
MustBeApprovedByEveryoneto understand the approval requirements at each step. - Verify approver lists to make sure the right users are assigned to each step.
- Monitor workflow status to find inactive workflows that may need attention.
Related Endpoints
To manage content through the approval process:
- Workflow Items: view and manage posts and messages pending approval.
- Posts: send posts to workflows with the
workflowIdparameter. - Messages: send messages to workflows for approval before scheduling.
For more information on configuring and using workflows, see the Oktopost Help Center.