✅ Approval Workflows

Create an approval workflow

Changed on

Create a multi-level approval workflow with up to 5 levels. Every member referenced in levels[].members[] must belong to the workspace team. A workflow with any level that has no members is stored as a draft and cannot be set as default. is_default is not accepted — use the set-default endpoint. Requires the manage_workflow permission.

post/api/v1/workspaces/{workspace_id}/approval-workflows

Request

  • Base URL
    https://api.contentstudio.io
  • URL
    https://api.contentstudio.io/api/v1/workspaces/{workspace_id}/approval-workflows
  • Auth
    API key in header X-API-Key

Path parameters

workspace_idstring required
Example:610a1e660cb41530ca40d372

Request body

namestring required
is_draftboolean

Force draft status. A workflow with an unstaffed level is a draft regardless.

Example request

{
  "name": "Marketing Approval",
  "levels": [
    {
      "level_number": 1,
      "title": "Editors",
      "rule": "anyone",
      "members": [
        {
          "user_id": "627a078300a7d866600e7d02"
        }
      ]
    }
  ]
}

Response

Approval workflow created

statusboolean
messagestring

Example response

{
  "status": true,
  "message": "Approval workflow created successfully. Use the returned `id` as `approval_workflow.workflow_id` when creating or updating a post.",
  "data": {
    "id": "66a1f2e4c8b9a1234567890d",
    "_id": "66a1f2e4c8b9a1234567890d",
    "name": "Marketing Approval",
    "levels": [
      {
        "level_number": 1,
        "title": "Editors",
        "rule": "anyone",
        "members": [
          {
            "user_id": "627a078300a7d866600e7d02"
          }
        ]
      }
    ]
  }
}

Changes