---
title: "Create a Workflow Template"
method: POST
path: "/app/v1/workflow_templates"
tags: ["workflow_templates"]
---

# Create a Workflow Template

`POST /app/v1/workflow_templates`

## Request body

- ICreateWorkflowTemplateInput
  - `name` string, required
  - `description` string, required
  - `version` integer, required
  - `status` 'archive' | 'draft' | 'active', required
  - `category_id` string, uuid, required
  - `config` object, required
    - `start` string, required
    - `steps` object, required
    - `workflow_name` string
    - `workflow_description` string
  - `triggers` union[], required
    - union
      - object
        - `type` 'scheduled', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `cron` string — https://docs.aws.amazon.com/lambda/latest/dg/services-cloudwatchevents-expressions.html
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'form_submission_create', required
        - `form_schema_id` string, uuid, required
        - `answer_filter` union
          - object
            - `id` string, uuid
            - `submission_id` string, uuid
            - `section_id` string
            - `question_index` integer
            - `question_id` string, required
            - `answer.value` union
              - …
          - object[]
            - `id` string, uuid
            - `submission_id` string, uuid
            - `section_id` string
            - `question_index` integer
            - `question_id` string, required
            - `answer.value` union
              - …
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'asset_create', required
        - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
        - `asset_filter` object, required
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'asset_update', required
        - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
        - `asset_filter` object, required
        - `attributes` string[]
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'workflow_complete', required
        - `workflow_template_id` string, uuid, required
  - `output` object, required
  - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
  - `asset_filter` object, required
  - `workflow_owner_id` string, uuid, required
  - `workflow_notifications` object
    - `events` union[], required
      - union
        - object
          - `type` 'created', required
        - object
          - `type` 'status_changed', required
        - object
          - `type` 'deleted', required
        - object
          - `type` 'upcoming_due_date', required
    - `recipients` union[], required
      - union
        - object
          - `type` 'owner', required
        - object
          - `type` 'all_assignees', required
        - object
          - `type` 'users', required
          - `users` string[], required
    - `channels` object[], required
      - `type` 'email', required
  - `workflow_task_notifications` object
    - `events` union[], required
      - union
        - object
          - `type` 'created', required
        - object
          - `type` 'status_changed', required
        - object
          - `type` 'assignee_changed', required
    - `recipients` union[], required
      - union
        - object
          - `type` 'workflow_owner', required
        - object
          - `type` 'assignee', required
        - object
          - `type` 'assignee_user', required
        - object
          - `type` 'assignee_group', required
        - object
          - `type` 'users', required
          - `users` string[], required
    - `channels` object[], required
      - `type` 'email', required
    - `input` object
      - `$.description` string
    - `step_ids` string[]
    - `task_status` string[]
  - `facility_filter` object, nullable

## Response `200`

A successful operation

- IWorkflowTemplate
  - `id` string, uuid, required
  - `company_id` string, uuid, required
  - `category_id` string, uuid, required
  - `name` string, required
  - `description` string, required
  - `version` integer, required
  - `status` 'archive' | 'draft' | 'active', required
  - `triggers` union[], required
    - union
      - object
        - `type` 'scheduled', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `cron` string — https://docs.aws.amazon.com/lambda/latest/dg/services-cloudwatchevents-expressions.html
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'form_submission_create', required
        - `form_schema_id` string, uuid, required
        - `answer_filter` union
          - object
            - `id` string, uuid
            - `submission_id` string, uuid
            - `section_id` string
            - `question_index` integer
            - `question_id` string, required
            - `answer.value` union
              - …
          - object[]
            - `id` string, uuid
            - `submission_id` string, uuid
            - `section_id` string
            - `question_index` integer
            - `question_id` string, required
            - `answer.value` union
              - …
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'asset_create', required
        - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
        - `asset_filter` object, required
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'asset_update', required
        - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
        - `asset_filter` object, required
        - `attributes` string[]
      - object
        - `type` 'system', required
        - `due_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
          - `start_variable` string
        - `notification_date` object
          - `time_period` 'hours' | 'days' | 'weeks' | 'months', required
          - `duration` number, required
        - `output` object — key-value pairs for storing workflow variables. Value accept static value or a JSON path starting with $
        - `event` 'workflow_complete', required
        - `workflow_template_id` string, uuid, required
  - `config` object, required
    - `start` string, required
    - `steps` object, required
    - `workflow_name` string
    - `workflow_description` string
  - `output` object, required
  - `workflow_notifications` object, required
    - `events` union[], required
      - union
        - object
          - `type` 'created', required
        - object
          - `type` 'status_changed', required
        - object
          - `type` 'deleted', required
        - object
          - `type` 'upcoming_due_date', required
    - `recipients` union[], required
      - union
        - object
          - `type` 'owner', required
        - object
          - `type` 'all_assignees', required
        - object
          - `type` 'users', required
          - `users` string[], required
    - `channels` object[], required
      - `type` 'email', required
  - `workflow_task_notifications` object, required
    - `events` union[], required
      - union
        - object
          - `type` 'created', required
        - object
          - `type` 'status_changed', required
        - object
          - `type` 'assignee_changed', required
    - `recipients` union[], required
      - union
        - object
          - `type` 'workflow_owner', required
        - object
          - `type` 'assignee', required
        - object
          - `type` 'assignee_user', required
        - object
          - `type` 'assignee_group', required
        - object
          - `type` 'users', required
          - `users` string[], required
    - `channels` object[], required
      - `type` 'email', required
    - `input` object
      - `$.description` string
    - `step_ids` string[]
    - `task_status` string[]
  - `asset_type` 'asset_group' | 'facility' | 'equipment' | 'device' | 'flow', required
  - `asset_filter` object, required
  - `workflow_owner_id` string, uuid, required
  - `created_at` union, required
    - string
    - string, date-time
  - `updated_at` union, required
    - string
    - string, date-time
  - `created_by` string, uuid, required
  - `updated_by` string, uuid, required

---

[API](https://skmtc.net/validere/apis/carbonhub-api.md) · [All operations](https://skmtc.net/validere/apis/carbonhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/validere/carbonhub-api/revisions/053edab62415/schema)
