---
title: "Create Automation"
method: POST
path: "/api/v2/automations"
tags: ["Automations"]
---

# Create Automation

`POST /api/v2/automations`

Creates an automation.

New automations must be unique and have at least one condition that is true only once or an action that nullifies at least one of the conditions. Active automations can have overlapping conditions but can't be identical.

The request must include the following conditions in the `all` array:

- At least one time-based condition
- At least one condition that checks one of the following fields: `status`, `type`, `group_id`, `assignee_id`, or `requester_id`.

#### Allowed For

* Agents

## Response `201`

Created response

- AutomationResponse
  - `automation` AutomationObject
    - `actions` ActionObject[] — An object describing what the automation will do. See [Actions reference](/documentation/ticketing/reference-guides/actions-reference)
      - `field` string — The name of a ticket field to modify
      - `value` string — The new value of the field
    - `active` boolean — Whether the automation is active
    - `conditions` ConditionsObject — An object that describes the conditions under which the automation will execute. See [Conditions reference](/documentation/ticketing/reference-guides/conditions-reference)
      - `all` ConditionObject[] — Logical AND. Tickets must fulfill all of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
      - `any` ConditionObject[] — Logical OR. Tickets may satisfy any of the conditions to be considered matching
        - `field` string — The name of a ticket field
        - `operator` string — A comparison operator
        - `value` string — The value of a ticket field
    - `created_at` string, date-time — The time the automation was created
    - `default` boolean — If true, the automation is a default automation
    - `id` integer — Automatically assigned when created
    - `position` integer — The position of the automation which specifies the order it will be executed
    - `raw_title` string — The raw title of the automation
    - `title` string — The title of the automation
    - `updated_at` string, date-time — The time of the last update of the automation

---

[API](https://skmtc.dev/botbrains-io/apis/support-api.md) · [All operations](https://skmtc.dev/botbrains-io/apis/support-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/botbrains-io/support-api/revisions/d53eac07ba68/schema)
