---
title: "Create Workflow"
method: POST
path: "/workflow"
---

# Create Workflow

`POST /workflow`

## Request

- Base URL: `https://dc-region.zuperpro.com/api`
- URL: `https://dc-region.zuperpro.com/api/workflow`
- Auth: API key in header `x-api-key`

Creates a workflow automation rule (trigger + conditions + actions). Workflow activation uses a different payload shape than other modules' activate endpoints (e.g. Territory) — see Activate Workflow below for the type: ACTIVATE|DEACTIVATE body, not is_active. allowed_teams is required (non-empty) when workflow_access is TEAMS; allowed_users is required when workflow_access is USERS.

## Request body

- object
  - `workflow` object
    - `workflow_name` string, required: Required.
    - `workflow_description` string, required: Required.
    - `trigger_module` 'JOB' | 'CUSTOMER' | 'PRODUCT' | 'EMPLOYEE' | 'TIMESHEET' | 'ESTIMATE' | 'INVOICE' | 'ASSET' | 'USER' | 'TEAM' | 'SERVICE_CONTRACT' | 'PAYMENTS' | 'REQUEST' | 'PROJECT': Get valid values from Get all workflow modules.
    - `workflow_access` 'COMPANY_WIDE' | 'USERS' | 'TEAMS': USERS requires a non-empty allowed_users; TEAMS requires a non-empty allowed_teams (400 otherwise).
    - `allowed_users` string[]: User UIDs. Required (non-empty) when workflow_access is USERS.
    - `allowed_teams` string[]: Team UIDs. Required (non-empty) when workflow_access is TEAMS.
    - `trigger_event` string, required: Required, e.g. "job.new". Get valid values from Get all workflow modules.
    - `trigger_event_name` string, required: Required, e.g. "New Job" — the display name paired with trigger_event.
    - `bu_uids` string[]: Business unit UIDs to scope this workflow to. Validated against the company's business units, and further restricted to the requesting user's own business units if the company's employee.restrict_bu_data policy is on.
    - `conditions` object[]
      - `field_type` 'DEFAULT' | 'CUSTOM' | 'CHECKLIST'
      - `field_value` string, required
      - `display_name` string, required
      - `match` 'EQUAL_TO' | 'NOT_EQUAL_TO' | 'CONTAINS' | 'NOT_CONTAINS' | 'EMPTY' | 'NOT_EMPTY' | 'GREATER_THAN' | 'LESS_THAN' | 'GREATER_THAN_EQUAL_TO' | 'LESS_THAN_EQUAL_TO' | 'DATE_GREATER_THAN' | 'DATE_LESS_THAN' | 'DATE_GREATER_THAN_EQUAL_TO' | 'DATE_LESS_THAN_EQUAL_TO' | 'DATE_EMPTY' | 'DATE_NOT_EMPTY' | 'DATE_TIME_GREATER_THAN' | 'DATE_TIME_LESS_THAN' | 'DATE_TIME_GREATER_THAN_EQUAL_TO' | 'DATE_TIME_LESS_THAN_EQUAL_TO' | 'DATE_TIME_EMPTY' | 'DATE_TIME_NOT_EMPTY' | 'TIME_GREATER_THAN' | 'TIME_LESS_THAN' | 'TIME_GREATER_THAN_EQUAL_TO' | 'TIME_LESS_THAN_EQUAL_TO' | 'TIME_EMPTY' | 'TIME_NOT_EMPTY': For the *_EMPTY / *_NOT_EMPTY values, match_value is not meaningful — the server auto-sets match_value to the same value as match for these.
      - `condition_type` 'AND' | 'OR': How this condition combines with the next one.
      - `match_value` string, required
      - `custom_values` object[]
        - `label` string
        - `value` string
    - `actions` object[]
      - `action_type` 'CREATE' | 'DELETE' | 'UPDATE'
      - `action_module` 'JOB' | 'CUSTOMER' | 'PRODUCT' | 'EMPLOYEE' | 'TIMESHEET' | 'ESTIMATE' | 'INVOICE' | 'ASSET' | 'REQUEST' | 'PROJECT' | 'OTHERS'
      - `field_type` 'DEFAULT' | 'CUSTOM'
      - `field_value` string
      - `display_name` string
      - `custom_values` object[]
        - `label` string
        - `value` string
      - `change_value` string
      - `type_of_operation` object
        - `label` string: Required.
        - `value` 'UPDATE_FIELDS' | 'UPDATE_JOB_ASSIGNMENT' | 'UPDATE_JOB_CATEGORY' | 'OTHERS' | 'UPDATE_JOB_STATUS' | 'CREATE_INVOICE' | 'UPDATE_JOB_ASSIGNMENT_UNASSIGN' | 'UPDATE_JOB_DUE_DATE' | 'UPDATE_JOB_SCHEDULE_DATE' | 'DELETE_JOB' | 'CREATE_JOB' | 'EXECUTE_CUSTOM_FUNCTION' | 'EXECUTE_WEBHOOK' | 'UPDATE_REQUEST_STATUS' | 'UPDATE_REQUEST_ASSIGNMENT' | 'UPDATE_REQUEST_ASSIGNMENT_UNASSIGN' | 'DELETE_REQUEST' | 'CREATE_REQUEST' | 'UPDATE_PROJECT_STATUS' | 'UPDATE_PROJECT_ASSIGNMENT' | 'UPDATE_PROJECT_ASSIGNMENT_UNASSIGN' | 'DELETE_PROJECT' | 'CREATE_PROJECT' | 'COPY_JOB_CARD_TO_NOTES' | 'COPY_CHECKLIST_TO_CUSTOM_FIELD': EXECUTE_CUSTOM_FUNCTION is only available if the company's custom_functions_enabled policy is on.

## Response `200`

200

## Other responses

- `400`: 400
- `500`: 500

## Changes

- **2026-11-03** `3c21bc232e16`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zuper/apis/zuper-pro-api/changes/workflow/post.md)

---

[API](https://skmtc.dev/zuper/apis/zuper-pro-api.md) - [All operations](https://skmtc.dev/zuper/apis/zuper-pro-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zuper/apis/zuper-pro-api/revisions/3c21bc232e16?raw)
