---
title: "Create a new workflow document"
method: POST
path: "/automation-studio/automations"
tags: ["Automation Studio"]
---

# Create a new workflow document

`POST /automation-studio/automations`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/automation-studio/automations`
- Auth: none declared

Creates a new workflow document.

## Request body

- object
  - `automation` AutomationStudioWorkflowDocument: Third generation workflow document as it exists in the database
    - `_id` string
    - `uuid` string
    - `namespace` AutomationStudioWorkflowDocumentNamespace
      - `type` unknown, required
      - `_id` AutomationStudioWorkflowDocumentNamespaceId, required: A MongoDB ObjectId
      - `name` string, required
    - `name` string, required
    - `type` string, required
    - `description` string, nullable
    - `preAutomationTime` integer: Time (milliseconds) automation would have taken someone to complete without using IAP.
    - `sla` integer
    - `tasks` AutomationStudioWorkflowDocumentTasks, required
      - `workflow_start` AutomationStudioWorkflowDocumentTasksWorkflowStart, required
        - `name` string
        - `summary` string
        - `groups` string[]
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksWorkflowStartNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
      - `workflow_end` AutomationStudioWorkflowDocumentTasksWorkflowEnd, required
        - `name` string
        - `summary` string
        - `groups` string[]
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksWorkflowEndNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
      - `error_handler` AutomationStudioWorkflowDocumentTasksErrorHandler: Deprecated gen2-specific feature
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksErrorHandlerNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
        - `name` 'childJob', required
        - `summary` string, required
        - `description` string, required
        - `app` string, required
        - `variables` AutomationStudioWorkflowDocumentTasksErrorHandlerVariables, required
          - `incoming` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesIncoming, required
          - `outgoing` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesOutgoing, required
          - `error` string
          - `decorators` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesDecoratorsItems[]
            - `type` 'encryption' | 'query'
            - `pointer` string, json-pointer
            - `displayPath` string: Human-readable dot/bracket notation query (for query decorators)
        - `deprecated` boolean
        - `scheduled` boolean
        - `groups` string[], required
        - `type` 'operation', required
        - `retrySettings` AutomationStudioWorkflowDocumentTasksErrorHandlerRetrySettings: Retry settings for a task.
          - `state` AutomationStudioWorkflowDocumentTasksErrorHandlerRetrySettingsStateItems[], required: Finish states the task will retry on. The task will retry on any of the included states.
          - `autoRetry` boolean, required: Whether the task is set to retry automatically or manually.
          - `limit` integer, required: Limit of retries on a task before it will take normal transitions and stop retrying.
          - `delay` integer, required: Delay between each retry in milliseconds.
          - `count` integer: Current retry count used for workflow engine job processing
    - `transitions` AutomationStudioWorkflowDocumentTransitions, required
      - `workflow_start` AutomationStudioWorkflowDocumentTransitionsWorkflowStart, required
      - `workflow_end` AutomationStudioWorkflowDocumentTransitionsWorkflowEnd, required
      - `error_handler` AutomationStudioWorkflowDocumentTransitionsErrorHandler
    - `errorHandler` AutomationStudioWorkflowDocumentErrorHandler: Deprecated gen2-specific feature
      - `type` string
      - `name` string
    - `font_size` integer: Deprecated, unused, gen1-specific feature
    - `groups` string[], required
    - `created` string, date-time
    - `created_by` union
      - AutomationStudioWorkflowDocumentCreatedBy0
        - `username` string, required
        - `provenance` string, required
      - string
    - `createdVersion` string
    - `last_updated` string, date-time
    - `last_updated_by` union
      - AutomationStudioWorkflowDocumentLastUpdatedBy0
        - `username` string, required
        - `provenance` string, required
      - string
    - `lastUpdatedVersion` string: This value represents the semantic version of the application that last modified it. For workflows with canvasVersion = 1, this field will refer to the version of Workflow Builder. For workflows with canvasVersion > 1, this field will refer to the version of Studio.
    - `tags` string[]
    - `canvasVersion` number, double, required
    - `encodingVersion` '1'
    - `inputSchema` AutomationStudioWorkflowDocumentInputSchema
    - `outputSchema` AutomationStudioWorkflowDocumentOutputSchema
    - `outputData` object: Deprecated gen2-specific feature
    - `decorators` AutomationStudioWorkflowDocumentDecoratorsItems[]
      - `type` 'encryption' | 'query'
      - `pointer` string, json-pointer
      - `displayPath` string: Human-readable dot/bracket notation query (for query decorators)
    - `migrationVersion` integer
    - `scenarios` AutomationStudioWorkflowDocumentScenariosItems[]
      - `name` string, required
      - `description` string
      - `input` AutomationStudioWorkflowDocumentScenariosItemsInput, required
      - `taskMocks` AutomationStudioWorkflowDocumentScenariosItemsTaskMocks
      - `last_updated` string, date-time
      - `last_updated_by` union
        - union
          - AutomationStudioWorkflowDocumentScenariosItemsLastUpdatedBy00
            - `username` string, required
            - `provenance` string, required
          - string
        - object

## Response `200`

Created workflow and associated edit URI.

- AutomationStudioCreateAutomationResponse200: Created workflow and associated edit URI.
  - `created` AutomationStudioWorkflowDocument, required: Third generation workflow document as it exists in the database
    - `_id` string
    - `uuid` string
    - `namespace` AutomationStudioWorkflowDocumentNamespace
      - `type` unknown, required
      - `_id` AutomationStudioWorkflowDocumentNamespaceId, required: A MongoDB ObjectId
      - `name` string, required
    - `name` string, required
    - `type` string, required
    - `description` string, nullable
    - `preAutomationTime` integer: Time (milliseconds) automation would have taken someone to complete without using IAP.
    - `sla` integer
    - `tasks` AutomationStudioWorkflowDocumentTasks, required
      - `workflow_start` AutomationStudioWorkflowDocumentTasksWorkflowStart, required
        - `name` string
        - `summary` string
        - `groups` string[]
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksWorkflowStartNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
      - `workflow_end` AutomationStudioWorkflowDocumentTasksWorkflowEnd, required
        - `name` string
        - `summary` string
        - `groups` string[]
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksWorkflowEndNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
      - `error_handler` AutomationStudioWorkflowDocumentTasksErrorHandler: Deprecated gen2-specific feature
        - `nodeLocation` AutomationStudioWorkflowDocumentTasksErrorHandlerNodeLocation: Stores the coordinates used by canvasVersion: 3 workflows
          - `x` number, double, required
          - `y` number, double, required
        - `x` number, double
        - `y` number, double
        - `name` 'childJob', required
        - `summary` string, required
        - `description` string, required
        - `app` string, required
        - `variables` AutomationStudioWorkflowDocumentTasksErrorHandlerVariables, required
          - `incoming` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesIncoming, required
          - `outgoing` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesOutgoing, required
          - `error` string
          - `decorators` AutomationStudioWorkflowDocumentTasksErrorHandlerVariablesDecoratorsItems[]
            - `type` 'encryption' | 'query'
            - `pointer` string, json-pointer
            - `displayPath` string: Human-readable dot/bracket notation query (for query decorators)
        - `deprecated` boolean
        - `scheduled` boolean
        - `groups` string[], required
        - `type` 'operation', required
        - `retrySettings` AutomationStudioWorkflowDocumentTasksErrorHandlerRetrySettings: Retry settings for a task.
          - `state` AutomationStudioWorkflowDocumentTasksErrorHandlerRetrySettingsStateItems[], required: Finish states the task will retry on. The task will retry on any of the included states.
          - `autoRetry` boolean, required: Whether the task is set to retry automatically or manually.
          - `limit` integer, required: Limit of retries on a task before it will take normal transitions and stop retrying.
          - `delay` integer, required: Delay between each retry in milliseconds.
          - `count` integer: Current retry count used for workflow engine job processing
    - `transitions` AutomationStudioWorkflowDocumentTransitions, required
      - `workflow_start` AutomationStudioWorkflowDocumentTransitionsWorkflowStart, required
      - `workflow_end` AutomationStudioWorkflowDocumentTransitionsWorkflowEnd, required
      - `error_handler` AutomationStudioWorkflowDocumentTransitionsErrorHandler
    - `errorHandler` AutomationStudioWorkflowDocumentErrorHandler: Deprecated gen2-specific feature
      - `type` string
      - `name` string
    - `font_size` integer: Deprecated, unused, gen1-specific feature
    - `groups` string[], required
    - `created` string, date-time
    - `created_by` union
      - AutomationStudioWorkflowDocumentCreatedBy0
        - `username` string, required
        - `provenance` string, required
      - string
    - `createdVersion` string
    - `last_updated` string, date-time
    - `last_updated_by` union
      - AutomationStudioWorkflowDocumentLastUpdatedBy0
        - `username` string, required
        - `provenance` string, required
      - string
    - `lastUpdatedVersion` string: This value represents the semantic version of the application that last modified it. For workflows with canvasVersion = 1, this field will refer to the version of Workflow Builder. For workflows with canvasVersion > 1, this field will refer to the version of Studio.
    - `tags` string[]
    - `canvasVersion` number, double, required
    - `encodingVersion` '1'
    - `inputSchema` AutomationStudioWorkflowDocumentInputSchema
    - `outputSchema` AutomationStudioWorkflowDocumentOutputSchema
    - `outputData` object: Deprecated gen2-specific feature
    - `decorators` AutomationStudioWorkflowDocumentDecoratorsItems[]
      - `type` 'encryption' | 'query'
      - `pointer` string, json-pointer
      - `displayPath` string: Human-readable dot/bracket notation query (for query decorators)
    - `migrationVersion` integer
    - `scenarios` AutomationStudioWorkflowDocumentScenariosItems[]
      - `name` string, required
      - `description` string
      - `input` AutomationStudioWorkflowDocumentScenariosItemsInput, required
      - `taskMocks` AutomationStudioWorkflowDocumentScenariosItemsTaskMocks
      - `last_updated` string, date-time
      - `last_updated_by` union
        - union
          - AutomationStudioWorkflowDocumentScenariosItemsLastUpdatedBy00
            - `username` string, required
            - `provenance` string, required
          - string
        - object
  - `edit` string, required: URI to the edit page for the newly created workflow.

## Other responses

- `500`: Error response from API

## Changes

- **2026-10-31** `2095cc90e583`: 2 info
  - api tag `Automation Studio` added
  - api tag `automationStudio` removed

[Operation history](https://skmtc.dev/itential/apis/itential-2/changes/automation-studio/automations/post.md)

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
