Zendesk Automations API

The Zendesk Automations API lets you programmatically manage time-based business rules that keep Support tickets moving without manual work. Automations evaluate ticket conditions on a regular schedule (typically hourly) using time metrics like hours since creation, last update, or status change, and then perform actions such as changing status or priority, reassigning, adding tags, or sending notifications.

OpenAPI Specification

automations-openapi-original.yml Raw ↑
openapi: 3.1.0
info:
  version: "1.0"
  title: Zendesk Automations
  description: Needs a description.
paths:
  /api/v2/automations:
    get:
      operationId: ListAutomations
      tags:
        - Automations
      summary: Zendesk Get  Api V2 Automations
      description: >
        Lists all automations for the current account.


        #### Allowed For


        * Agents


        #### Available Parameters


        You can pass in any combination of the following optional filters:


        | Name       | Type    | Comment

        | ---------- | ------- | -------

        | active     | boolean | Only active automations if true, inactive
        automations if false

        | sort_by    | string  | Possible values are "alphabetical",
        "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d".
        Defaults to "position"

        | sort_order | string  | One of "asc" or "desc". Defaults to "asc" for
        alphabetical and position sort, "desc" for all others


        #### Sideloads


        The following sideloads are supported. The usage sideloads are only
        supported on the Support Professional or Suite Growth plan or above.


        | Name             | Will sideload

        | ---------------- | -------------

        | app_installation | The app installation that requires each automation,
        if present

        | permissions      | The permissions for each automation

        | usage_1h         | The number of times each automation has been used
        in the past hour

        | usage_24h        | The number of times each automation has been used
        in the past day

        | usage_7d         | The number of times each automation has been used
        in the past week

        | usage_30d        | The number of times each automation has been used
        in the past thirty days


        #### Pagination


        - Cursor pagination (recommended)

        - Offset pagination


        See [Pagination](/api-reference/introduction/pagination/).


        Returns a maximum of 100 records per page.
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsResponseExample'
    post:
      operationId: CreateAutomation
      tags:
        - Automations
      summary: Zendesk Post  Api V2 Automations
      description: >
        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
      responses:
        '201':
          description: Created response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationCreateResponseExample'
  /api/v2/automations/{automation_id}:
    parameters:
      - $ref: '#/components/parameters/AutomationId'
    get:
      operationId: ShowAutomation
      tags:
        - Automations
      summary: Zendesk Get  Api V2 Automations Automation_id
      description: |
        #### Allowed For

        * Agents
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationResponseExample'
    put:
      operationId: UpdateAutomation
      tags:
        - Automations
      summary: Zendesk Put  Api V2 Automations Automation_id
      description: >
        Updates an automation.


        Updated 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'


        **Note**: Updating a condition or action updates both the `conditions`
        and `actions` arrays, clearing all existing values of both arrays.
        Include all your conditions and actions when updating any condition or
        action.

        **Note**: You might be restricted from updating some default
        automations.


        #### Allowed For


        * Agents
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationResponseExample'
    delete:
      operationId: DeleteAutomation
      tags:
        - Automations
      summary: Zendesk Delete  Api V2 Automations Automation_id
      description: >
        **Note**: You might be restricted from deleting some default
        automations.


        #### Allowed For


        * Agents
      responses:
        '204':
          description: No Content response
  /api/v2/automations/active:
    get:
      operationId: ListActiveAutomations
      tags:
        - Automations
      summary: Zendesk Get  Api V2 Automations Active
      description: >
        Lists all active automations.


        #### Allowed For


        * Agents


        #### Available Parameters


        You can pass in any combination of the following optional filters:


        | Name       | Type   | Comment

        | ---------- | ------ | -------

        | sort_by    | string | Possible values are "alphabetical",
        "created_at", "updated_at", "usage_1h", "usage_24h", or "usage_7d".
        Defaults to "position"

        | sort_order | string | One of "asc" or "desc". Defaults to "asc" for
        alphabetical and position sort, "desc" for all others


        #### Sideloads


        The following sideloads are supported:


        | Name             | Will sideload

        | ---------------- | -------------

        | app_installation | The app installation that requires each automation,
        if present

        | permissions      | The permissions for each automation

        | usage_1h         | The number of times each automation has been used
        in the past hour

        | usage_24h        | The number of times each automation has been used
        in the past day

        | usage_7d         | The number of times each automation has been used
        in the past week

        | usage_30d        | The number of times each automation has been used
        in the past thirty days
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsResponseExample'
  /api/v2/automations/destroy_many:
    delete:
      operationId: BulkDeleteAutomations
      tags:
        - Automations
      summary: Zendesk Delete  Api V2 Automations Destroy_many
      description: >
        Deletes the automations corresponding to the provided comma-separated
        list of IDs.


        **Note**: You might be restricted from deleting some default
        automations. If included in a bulk deletion, the unrestricted
        automations will be deleted.


        #### Allowed For


        * Agents


        #### Request Parameters


        The DELETE request takes one parameter, an `ids` object that lists the
        automations to delete.


        | Name | Description

        | ---- | -----------

        | ids  | The IDs of the automations to delete


        #### Example request


        ```js

        {
          "ids": "25,23,27,22"
        }

        ```
      parameters:
        - name: ids
          in: query
          description: The IDs of the automations to delete
          schema:
            type: array
            items:
              type: integer
      responses:
        '204':
          description: No Content response
  /api/v2/automations/search:
    parameters:
      - $ref: '#/components/parameters/AutomationSearchQuery'
      - $ref: '#/components/parameters/AutomationActive'
      - $ref: '#/components/parameters/AutomationSortBy'
      - $ref: '#/components/parameters/AutomationSortOrder'
      - $ref: '#/components/parameters/AutomationInclude'
    get:
      operationId: SearchAutomations
      tags:
        - Automations
      summary: Zendesk Get  Api V2 Automations Search
      description: >
        #### Pagination


        * Offset pagination only


        See [Using Offset
        Pagination](/api-reference/introduction/pagination/#using-offset-pagination).


        #### Allowed For


        * Agents


        #### Sideloads


        The following sideloads are supported. For more information, see
        [Side-loading](/documentation/ticketing/using-the-zendesk-api/side_loading/).


        | Name             | Will sideload

        | ---------------- | -------------

        | app_installation | The app installation that requires each automation,
        if present

        | permissions      | The permissions for each automation

        | usage_1h         | The number of times each automation has been used
        in the past hour

        | usage_24h        | The number of times each automation has been used
        in the past day

        | usage_7d         | The number of times each automation has been used
        in the past week

        | usage_30d        | The number of times each automation has been used
        in the past thirty days
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsSearchResponseExample'
  /api/v2/automations/update_many:
    put:
      operationId: UpdateManyAutomations
      tags:
        - Automations
      summary: Zendesk Put  Api V2 Automations Update_many
      description: >
        **Note**: You might be restricted from updating some default
        automations. If included in a bulk update, the unrestricted automations
        will be updated.


        #### Allowed For


        * Agents


        #### Request Parameters


        The PUT request expects an `automations` object that lists the
        automations to update.


        Each automation may have the following properties:


        | Name     | Mandatory | Description

        | -------- | --------- | -----------

        | id       | yes       | The ID of the automation to update

        | position | no        | The new position of the automation

        | active   | no        | The active status of the automation (true or
        false)


        #### Example Request


        ```js

        {
          "automations": [
            {"id": 25, "position": 3},
            {"id": 23, "position": 5},
            {"id": 27, "position": 9},
            {"id": 22, "position": 7}
          ]
        }

        ```
      responses:
        '200':
          description: Success response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationsResponse'
              examples:
                default:
                  $ref: '#/components/examples/AutomationsUpdateManyResponseExample'
components:
  schemas:
    AutomationsResponse:
      type: object
      properties:
        automations:
          type: array
          items:
            $ref: '#/components/schemas/AutomationObject'
        count:
          type: integer
          readOnly: true
        next_page:
          type: string
          nullable: true
          readOnly: true
        previous_page:
          type: string
          nullable: true
          readOnly: true
    AutomationResponse:
      type: object
      properties:
        automation:
          $ref: '#/components/schemas/AutomationObject'
tags:
  - name: Automations