openapi: 3.0.0
info:
  title: Automation - Synerise Public API
  version: 1.9.0
servers:
  - url: https://api.synerise.com
    description: Microsoft Azure EU
  - url: https://api.azu.synerise.com
    description: Microsoft Azure USA
  - url: https://api.geb.synerise.com
    description: Google Cloud Platform
tags:
  - name: Workflows
  - name: Workflow schedules
  - name: Control Center
  - name: Data Processing Job Logs
x-tagGroups:
  - name: Automation
    tags:
      - Workflows
      - Workflow schedules
      - Control Center
      - Data Processing Job Logs
paths:
  /automation-brain/dashboard/diagrams/count-by-trigger-type:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Count workflows by trigger type
      operationId: countDiagramsByTriggerType
      description: |
        Returns the count of active workflows grouped by trigger node type for the current workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      responses:
        "200":
          description: Workflow counts by trigger type
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramCountByTriggerTypeResponse"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/countDiagramsByTriggerType
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/count-by-trigger-type", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/count-by-trigger-type",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-trigger-type")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/count-by-status:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Count workflows by status
      operationId: countDiagramsByStatus
      description: |
        Returns the count of workflows grouped by status for the current workspace.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      responses:
        "200":
          description: Workflow counts by status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramCountByStatusResponse"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/countDiagramsByStatus
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/count-by-status", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/count-by-status",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/count-by-status")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/most-used:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get most used workflows
      operationId: getMostUsedDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of data points (events) generated by those workflows.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of most used workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostUsed"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getMostUsedDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/most-used');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/most-used?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/most-triggered:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get most triggered workflows
      operationId: getMostTriggeredDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of triggered paths.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of most triggered workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsMostTriggered"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getMostTriggeredDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/most-triggered?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/in-progress:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with paths in progress
      operationId: getInProgressDiagrams
      description: |
        Returns a paginated list of workflows ordered by the number of paths currently in progress.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of workflows with paths in progress
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsInProgress"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getInProgressDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/in-progress?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/upcoming-status-changes:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get upcoming status changes
      operationId: getUpcomingStatusChanges
      description: |
        Returns a paginated list of upcoming workflow status changes (resumes, pauses, and stops).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of upcoming status changes
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardUpcomingStatusChanges"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getUpcomingStatusChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/upcoming-status-changes?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/upcoming-triggers:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get upcoming trigger events
      operationId: getUpcomingTriggers
      description: |
        Returns a paginated list of upcoming trigger events for workflows with active scheduled triggers.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of upcoming trigger events
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardUpcomingTriggers"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getUpcomingTriggers
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/upcoming-triggers');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/upcoming-triggers?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/with-issues:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with issues
      operationId: getDiagramsWithIssues
      description: |
        Returns a paginated list of workflows that have encountered failures, ordered by failure count.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-timePeriod"
        - name: context
          description: AutomationContext for which workflows should be returned
          in: query
          required: false
          schema:
            type: string
            enum:
              - Client
              - Business
              - Undefined
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of workflows with issues
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsWithIssues"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getDiagramsWithIssues
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE',
              'context' => 'SOME_STRING_VALUE',
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/with-issues?timePeriod=SOME_STRING_VALUE&context=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/dashboard/diagrams/failing-jobs:
    get:
      security:
        - JWT: []
      tags:
        - Control Center
      summary: Get workflows with failing jobs
      operationId: getFailingJobsDiagrams
      description: |
        Returns a paginated list of workflows that had failing jobs in the given time period. Counts are per job, so a journey with several failed blocks counts each of them. Results are ordered worst-first (failedCount descending, then warningCount descending).


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-timePeriod"
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
      responses:
        "200":
          description: A page of workflows with failing jobs
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDashboardDiagramsFailingJobs"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Control-Center/operation/getFailingJobsDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/dashboard/diagrams/failing-jobs');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE',
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/dashboard/diagrams/failing-jobs?timePeriod=SOME_STRING_VALUE&page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get list of workflows/diagrams
      operationId: getPaginatedDiagrams
      description: |
        Retrieve a paginated list of workflows.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit"
        - $ref: "#/components/parameters/automation-brain-filterByStatus"
        - $ref: "#/components/parameters/automation-brain-sortDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortByDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortingOrder"
        - $ref: "#/components/parameters/automation-brain-search"
        - $ref: "#/components/parameters/automation-brain-directoryId"
        - $ref: "#/components/parameters/automation-brain-blockTypes"
        - $ref: "#/components/parameters/automation-brain-triggersOnEvent"
        - $ref: "#/components/parameters/automation-brain-generatesEvent"
      responses:
        "200":
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDiagrams"
        "400":
          $ref: "#/components/responses/automation-brain-400"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getPaginatedDiagrams
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'sort' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdTime:desc',
              'order' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'blockTypes' => 'SOME_STRING_VALUE',
              'triggersOnEvent' => 'SOME_STRING_VALUE',
              'generatesEvent' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/v2/diagrams:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get list of workflows
      operationId: getPaginatedDiagramsV2
      description: |
        Retrieve a paginated list of workflows.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_LIST_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-page"
        - $ref: "#/components/parameters/automation-brain-limit50"
        - $ref: "#/components/parameters/automation-brain-filterByStatus"
        - $ref: "#/components/parameters/automation-brain-sortDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortByDiagrams"
        - $ref: "#/components/parameters/automation-brain-sortingOrder"
        - $ref: "#/components/parameters/automation-brain-search"
        - $ref: "#/components/parameters/automation-brain-directoryId"
        - $ref: "#/components/parameters/automation-brain-tagIds"
        - $ref: "#/components/parameters/automation-brain-blockTypes"
        - $ref: "#/components/parameters/automation-brain-triggersOnEvent"
        - $ref: "#/components/parameters/automation-brain-generatesEvent"
      responses:
        "200":
          description: A page of workflows
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-PaginatedDiagramsV2"
        "400":
          $ref: "#/components/responses/automation-brain-400"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getPaginatedDiagramsV2
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/v2/diagrams');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'page' => 'SOME_NUMBER_VALUE',
              'limit' => 'SOME_NUMBER_VALUE',
              'status' => 'SOME_STRING_VALUE',
              'sort' => 'SOME_STRING_VALUE',
              'sortBy' => 'createdTime:desc',
              'order' => 'SOME_STRING_VALUE',
              'search' => 'SOME_STRING_VALUE',
              'directoryId' => 'SOME_STRING_VALUE',
              'tags' => 'SOME_STRING_VALUE',
              'blockTypes' => 'SOME_STRING_VALUE',
              'triggersOnEvent' => 'SOME_STRING_VALUE',
              'generatesEvent' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/v2/diagrams?page=SOME_NUMBER_VALUE&limit=SOME_NUMBER_VALUE&status=SOME_STRING_VALUE&sort=SOME_STRING_VALUE&sortBy=createdTime%3Adesc&order=SOME_STRING_VALUE&search=SOME_STRING_VALUE&directoryId=SOME_STRING_VALUE&tags=SOME_STRING_VALUE&blockTypes=SOME_STRING_VALUE&triggersOnEvent=SOME_STRING_VALUE&generatesEvent=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/run:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Run/resume workflow
      operationId: runAutomationDiagram
      description: |
        Run a or resume workflow.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramActionRequest"
      responses:
        "200":
          description: Workflow run/resumed or was already running
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/runAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"scheduleAction":"On"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"scheduleAction\":\"On\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/run", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "scheduleAction": "On"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/run",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({scheduleAction: 'On'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"scheduleAction":"On"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/run")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"scheduleAction\":\"On\"}")
              .asString();
  /automation-brain/diagrams/{diagramId}/pause:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Pause workflow
      operationId: pauseAutomationDiagram
      description: |
        Pause a workflow.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramActionRequest"
      responses:
        "200":
          description: Diagram paused or was already paused
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/pauseAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"scheduleAction":"On"}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"scheduleAction\":\"On\"}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/pause", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "scheduleAction": "On"
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/pause",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({scheduleAction: 'On'}));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"scheduleAction":"On"}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/pause")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"scheduleAction\":\"On\"}")
              .asString();
  /automation-brain/diagrams/{diagramId}/stop:
    post:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Stop workflow
      operationId: stopAutomationDiagram
      description: |
        Stop a workflow.

        <span style="color:red"><strong>WARNING:</strong> A stopped workflow can't be restarted.</span>


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow stopped or was already stopped
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/stopAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/stop", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/stop",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/stop")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get workflow schedule
      operationId: getDiagramSchedule
      description: |
        Get all schedule rules of a workflow.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Schedule rules
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramSchedule"
        "400":
          $ref: "#/components/responses/automation-brain-SimpleError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramSchedule
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/schedule", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule');
            $request->setMethod(HTTP_METH_GET);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
    post:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Set schedule rules for workflow
      description: |
        Set schedule rules for a workflow. This lets you activate, pause, or stop a workflow according to a plan. 

        After the schedule is set, it must be activated to take effect (see the `POST /automation-brain/diagrams/{diagramId}/schedule-on` method).  

        **The backend doesn't validate the logic of the schedule**. You must ensure it's well-built (rules make logical sense) and complies with the structure of the workflow (such as trigger node time rules). See ["Workflow Scheduler > Important" in the Synerise Hub](https://hub.synerise.com/docs/automation/workflow-scheduler#important).

        The contents of this request overwrite an existing schedule.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_UPDATE`

        **User role permission required:** `automation_2_journeys: update`
      operationId: setDiagramSchedule
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/automation-brain-DiagramScheduleRequest"
        required: true
      responses:
        "200":
          description: Schedule saved
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-DiagramSchedule"
        "400":
          $ref: "#/components/responses/automation-brain-SimpleError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/setDiagramSchedule
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
              --header 'content-type: application/json' \
              --data '{"timezone":"Europe/Paris","rules":[{"ruleId":"70af3071-65d9-4ec3-b3cb-5283e8d55dac","actionType":"Resume","repeatModel":{"repeatType":"Interval","body":{"start":"2020-01-01T01:00:00.000","intervalSeconds":6000}}}]}'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            payload = "{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}"

            headers = {
                'Authorization': "Bearer REPLACE_BEARER_TOKEN",
                'content-type': "application/json"
                }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/schedule", payload, headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = JSON.stringify({
              "timezone": "Europe/Paris",
              "rules": [
                {
                  "ruleId": "70af3071-65d9-4ec3-b3cb-5283e8d55dac",
                  "actionType": "Resume",
                  "repeatModel": {
                    "repeatType": "Interval",
                    "body": {
                      "start": "2020-01-01T01:00:00.000",
                      "intervalSeconds": 6000
                    }
                  }
                }
              ]
            });

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
            xhr.setRequestHeader("content-type", "application/json");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN",
                "content-type": "application/json"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.write(JSON.stringify({
              timezone: 'Europe/Paris',
              rules: [
                {
                  ruleId: '70af3071-65d9-4ec3-b3cb-5283e8d55dac',
                  actionType: 'Resume',
                  repeatModel: {
                    repeatType: 'Interval',
                    body: {start: '2020-01-01T01:00:00.000', intervalSeconds: 6000}
                  }
                }
              ]
            }));
            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN',
              'content-type' => 'application/json'
            ]);

            $request->setBody('{"timezone":"Europe/Paris","rules":[{"ruleId":"70af3071-65d9-4ec3-b3cb-5283e8d55dac","actionType":"Resume","repeatModel":{"repeatType":"Interval","body":{"start":"2020-01-01T01:00:00.000","intervalSeconds":6000}}}]}');

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .header("content-type", "application/json")
              .body("{\"timezone\":\"Europe/Paris\",\"rules\":[{\"ruleId\":\"70af3071-65d9-4ec3-b3cb-5283e8d55dac\",\"actionType\":\"Resume\",\"repeatModel\":{\"repeatType\":\"Interval\",\"body\":{\"start\":\"2020-01-01T01:00:00.000\",\"intervalSeconds\":6000}}}]}")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-on:
    post:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Enable schedule for workflow
      operationId: scheduleOnAutomationDiagram
      description: |
        Enable schedule for a workflow. The schedule must first be set with `POST /automation-brain/diagrams/{diagramId}/schedule`

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow scheduled or was already scheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/scheduleOnAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-on", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-on",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-on")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-off:
    post:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Disable schedule for workflow
      operationId: scheduleOffAutomationDiagram
      description: |
        Disable schedule for a workflow.

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_EXECUTE`

        **User role permission required:** `automation_2_journeys: execute`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
      responses:
        "200":
          description: Workflow unscheduled or was already unscheduled
          content:
            text/plain:
              schema:
                type: string
                enum:
                  - OK
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "401":
          $ref: "#/components/responses/automation-brain-401"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          $ref: "#/components/responses/automation-brain-404"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/scheduleOffAutomationDiagram
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request POST \
              --url https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("POST", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-off", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("POST", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "POST",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-off",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off');
            $request->setMethod(HTTP_METH_POST);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.post("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-off")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-executed-events:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get schedule execution events
      operationId: getDiagramScheduleExecutedEvents
      description: |
        Get events (rule executions) that were already processed for the workflow. You can limit the list to a time range defined by `start` and `end`.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: start
          in: query
          required: true
          description: Start date
          schema:
            type: string
            format: date-time
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Executed schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Executed schedule rules
                    items:
                      $ref: "#/components/schemas/automation-brain-ExecutedDiagramScheduleEvent"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramScheduleExecutedEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'start' => 'SOME_STRING_VALUE',
              'end' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-executed-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/schedule-upcoming-events:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get upcoming schedule events
      operationId: getDiagramSchedulePendingEvents
      description: |
        Get a list of upcoming events (rule executions) caused by a schedule. You can limit the list to a time range defined by `start` and `end`.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterStart"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Upcoming schedule events
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Upcoming schedule rule executions
                    items:
                      $ref: "#/components/schemas/automation-brain-UpcomingDiagramScheduleEvent"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramSchedulePendingEvents
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'start' => 'SOME_STRING_VALUE',
              'end' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/schedule-upcoming-events?start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/upcoming-status-changes:
    get:
      security:
        - JWT: []
      tags:
        - Workflow schedules
      summary: Get upcoming workflow status changes
      operationId: getDiagramUpcomingStatusChanges
      description: |
        Get upcoming status changes for a workflow. You can limit the list to a time range defined by `start` and `end`.


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATON_BRAIN_DIAGRAM_SCHEDULE_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: initialStatus
          in: query
          description: "Initial status used if diagramId is not present (default: Pending)"
          schema:
            type: string
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterStart"
        - $ref: "#/components/parameters/automation-brain-ScheduleEventFilterEnd"
      responses:
        "200":
          description: Upcoming status changes
          content:
            application/json:
              schema:
                type: object
                properties:
                  hasMore:
                    $ref: "#/components/schemas/automation-brain-HasMore"
                  events:
                    type: array
                    description: Upcoming status changes of the workflow
                    items:
                      $ref: "#/components/schemas/automation-brain-UpcomingDiagramStatusChange"
                required:
                  - hasMore
                  - events
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflow-schedules/operation/getDiagramUpcomingStatusChanges
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'initialStatus' => 'SOME_STRING_VALUE',
              'start' => 'SOME_STRING_VALUE',
              'end' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/upcoming-status-changes?initialStatus=SOME_STRING_VALUE&start=SOME_STRING_VALUE&end=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/statistics:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get workflow statistics with node details
      operationId: getDiagramStatistics
      description: |
        Retrieve workflow execution statistics, including node statistics and metadata (name, type).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATION_STATS_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: timePeriod
          in: query
          description: Time period for the statistics
          required: false
          schema:
            type: string
            enum:
              - currentHour
              - currentDay
              - previousHour
              - previousDay
      responses:
        "200":
          description: Diagram statistics with node info
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-ExternalDiagramStatsWithInfo"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          description: Diagram not found
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getDiagramStatistics
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/statistics?timePeriod=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /automation-brain/diagrams/{diagramId}/blocks/{blockId}/statistics:
    get:
      security:
        - JWT: []
      tags:
        - Workflows
      summary: Get node statistics
      operationId: getBlockStatistics
      description: |
        Retrieve execution statistics for a single block enriched with block metadata (name, type).

        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `AUTOMATION_STATS_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - $ref: "#/components/parameters/automation-brain-diagramId"
        - name: blockId
          in: path
          description: UUID of the node
          required: true
          schema:
            type: string
        - name: timePeriod
          in: query
          description: Time period for statistics
          required: false
          schema:
            type: string
            enum:
              - currentHour
              - currentDay
              - previousHour
              - previousDay
      responses:
        "200":
          description: Block statistics with block info
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"
        "400":
          $ref: "#/components/responses/automation-brain-genericError"
        "403":
          $ref: "#/components/responses/automation-brain-403"
        "404":
          description: Diagram or block not found
      x-snr-doc-urls:
        - /api-reference/automation#tag/Workflows/operation/getBlockStatistics
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'timePeriod' => 'SOME_STRING_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/automation-brain/diagrams/%7BdiagramId%7D/blocks/%7BblockId%7D/statistics?timePeriod=SOME_STRING_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
  /morph/logs/automation/{automationWorkflowId}/last-run/with-stages:
    get:
      tags:
        - Data Processing Job Logs
      operationId: getExtendedInfoAboutLastRun
      summary: Get last log with stages
      description: |
        
        Retrieve the status of a workflow's last run and its stages.

        The workflow must contain at least one of the following nodes:
        - Any Data Transformation node
        - Any node that pulls data into a workflow (for example local file, SFTP, Azure Blob Storage)
        - Any node that pushes data out of the workflow (for example SFTP, Pub/Sub)
        - Any node that imports data into Synerise


        ---

        **API consumers:** <a href="/api-reference/authorization?tag=Authorization&amp;operationId=userLogin" target="_blank" rel="noopener">Synerise User</a>, <a href="/api-reference/authorization?tag=Authorization&amp;operationId=profileLogin" target="_blank" rel="noopener">Workspace (Business Profile)</a>

        **API key permission required:** `MORPH_JOBS_READ`

        **User role permission required:** `automation_2_journeys: read`
      parameters:
        - name: automationWorkflowId
          in: path
          required: true
          description: "`diagramId` of the workflow to fetch last job from"
          schema:
            type: string
            format: uuid
        - $ref: "#/components/parameters/morph-LogsLimitInQuery"
      responses:
        "200":
          description: Information about last data transformation journey status
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-DtDiagramLastRunResponse"
        "401":
          $ref: "#/components/responses/morph-401"
        "403":
          $ref: "#/components/responses/morph-403"
        "404":
          description: |
            - workflow doesn't exist; 
            - no journeys exist for a workflow; 
            - workflow doesn't contain any of the required nodes (returns a "no journeys found" error)
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/morph-HttpErrorDetails"
              example:
                error: Not found
                status: 404
                timestamp: 2023-09-06T11:54:08.564Z
                message: No journeys for diagram fe7e3a80-91bb-433a-94cf-744253cc442c found
      security:
        - JWT: []
      x-snr-doc-urls:
        - /api-reference/automation#tag/Data-Processing-Job-Logs/operation/getExtendedInfoAboutLastRun
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE' \
              --header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
        - lang: Python
          label: Python
          source: |-
            import http.client

            conn = http.client.HTTPSConnection("api.synerise.com")

            headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }

            conn.request("GET", "/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE", headers=headers)

            res = conn.getresponse()
            data = res.read()

            print(data.decode("utf-8"))
        - lang: JavaScript
          label: JavaScript
          source: |-
            const data = null;

            const xhr = new XMLHttpRequest();
            xhr.withCredentials = true;

            xhr.addEventListener("readystatechange", function () {
              if (this.readyState === this.DONE) {
                console.log(this.responseText);
              }
            });

            xhr.open("GET", "https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE");
            xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");

            xhr.send(data);
        - lang: Node.js
          label: Node.js
          source: |-
            const http = require("https");

            const options = {
              "method": "GET",
              "hostname": "api.synerise.com",
              "port": null,
              "path": "/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE",
              "headers": {
                "Authorization": "Bearer REPLACE_BEARER_TOKEN"
              }
            };

            const req = http.request(options, function (res) {
              const chunks = [];

              res.on("data", function (chunk) {
                chunks.push(chunk);
              });

              res.on("end", function () {
                const body = Buffer.concat(chunks);
                console.log(body.toString());
              });
            });

            req.end();
        - lang: PHP
          label: PHP
          source: |-
            <?php

            $request = new HttpRequest();
            $request->setUrl('https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages');
            $request->setMethod(HTTP_METH_GET);

            $request->setQueryData([
              'limit' => 'SOME_NUMBER_VALUE'
            ]);

            $request->setHeaders([
              'Authorization' => 'Bearer REPLACE_BEARER_TOKEN'
            ]);

            try {
              $response = $request->send();

              echo $response->getBody();
            } catch (HttpException $ex) {
              echo $ex;
            }
        - lang: Java
          label: Java
          source: |-
            HttpResponse<String> response = Unirest.get("https://api.synerise.com/morph/logs/automation/%7BautomationWorkflowId%7D/last-run/with-stages?limit=SOME_NUMBER_VALUE")
              .header("Authorization", "Bearer REPLACE_BEARER_TOKEN")
              .asString();
components:
  securitySchemes:
    JWT:
      type: http
      scheme: bearer
      description: |-
        JWT Bearer token. The header looks like this: `Bearer {JWT}`

        Remember to include the space between 'Bearer' and the token.

        Generate a token via the **Authorization** endpoints.
    TrackerKey:
      type: apiKey
      name: token
      in: query
      description: Authorization by tracker key sent as a query parameter. This is the same key as used in the website tracking code.
  schemas:
    automation-brain-HTTP400:
      type: object
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the message was sent
        message:
          type: string
          description: Description of the problem
    automation-brain-Error:
      type: object
      properties:
        httpStatus:
          type: integer
          description: HTTP status code of error
        errorCode:
          type: string
          description: Synerise error code. See [API error reference](https://developers.synerise.com/errors.html)
        message:
          type: string
          description: A description of the problem
        timestamp:
          type: string
          format: date-time
          description: Time when the problem occurred
        help:
          type: string
          description: Link to the error reference
        traceId:
          type: string
          description: Trace ID for troubleshooting
        errors:
          type: array
          description: Array of errors
          items:
            $ref: "#/components/schemas/automation-brain-Error"
        source:
          $ref: "#/components/schemas/automation-brain-PointerSource"
        details:
          $ref: "#/components/schemas/automation-brain-ErrorDetails"
        field:
          type: string
          description: JSON field which caused a problem
      required:
        - errorCode
        - httpStatus
        - message
    automation-brain-ErrorDetails:
      type: object
      description: Additional details
      additionalProperties:
        type: string
    automation-brain-PointerSource:
      type: object
      description: Source of the problem
      properties:
        pointer:
          type: string
        value:
          type: string
      required:
        - pointer
    automation-brain-DiagramCountByTriggerTypeResponse:
      type: object
      properties:
        counts:
          type: array
          items:
            $ref: "#/components/schemas/automation-brain-TriggerTypeCount"
          description: List of trigger types with their workflow counts
        total:
          type: integer
          description: Total number of active workflows across all trigger types
          example: 55
      required:
        - counts
        - total
    automation-brain-TriggerTypeCount:
      type: object
      properties:
        triggerType:
          type: string
          description: The type of trigger node
          example: EventTrigger
        count:
          type: integer
          description: Number of running workflows with this trigger type
          example: 25
      required:
        - triggerType
        - count
    automation-brain-DiagramCountByStatusResponse:
      type: object
      properties:
        counts:
          type: array
          items:
            $ref: "#/components/schemas/automation-brain-StatusCount"
          description: List of statuses with their workflow counts (always includes all 5 statuses)
        total:
          type: integer
          description: Total number of workflows across all statuses
          example: 70
      required:
        - counts
        - total
    automation-brain-StatusCount:
      type: object
      properties:
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        count:
          type: integer
          description: Number of workflows with this status
          example: 42
      required:
        - status
        - count
    automation-brain-DiagramStatus:
      type: string
      description: The status of the workflow
      enum:
        - Draft
        - Pending
        - Running
        - Paused
        - Stopped
    automation-brain-PaginatedDashboardDiagramsMostUsed:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of most used workflows
          items:
            $ref: "#/components/schemas/automation-brain-DashboardDiagramMostUsedItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-PaginationV2:
      type: object
      description: Pagination data
      required:
        - limit
        - links
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        links:
          type: array
          description: Links to previous/next/first pages
          items:
            $ref: "#/components/schemas/automation-brain-ListingLink"
    automation-brain-ListingLink:
      type: object
      required:
        - rel
        - url
      properties:
        rel:
          type: string
          description: The type of relation
          example: first
          enum:
            - first
            - prev
            - next
        url:
          type: string
          description: Link to the page
          example: http://automation-brain/v2/diagrams?page=1&limit=10
    automation-brain-DashboardDiagramMostUsedItem:
      type: object
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        dataPoints:
          type: integer
          description: Number of data points generated by this workflow
          example: 1500
      required:
        - diagramId
        - name
        - status
        - dataPoints
    automation-brain-DiagramName:
      type: string
      description: Name of the workflow
      example: Example workflow
    automation-brain-DiagramId:
      type: string
      format: uuid
      description: UUID of the workflow
    automation-brain-PaginatedDashboardDiagramsMostTriggered:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of most triggered workflows
          items:
            $ref: "#/components/schemas/automation-brain-DashboardDiagramMostTriggeredItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardDiagramMostTriggeredItem:
      type: object
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        triggeredPathsCount:
          type: integer
          description: Number of triggered paths for this workflow
          example: 320
      required:
        - diagramId
        - name
        - status
        - triggeredPathsCount
    automation-brain-PaginatedDashboardDiagramsInProgress:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows with at least one path in progress
          items:
            $ref: "#/components/schemas/automation-brain-DashboardDiagramInProgressItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardDiagramInProgressItem:
      type: object
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        journeysInProgress:
          type: integer
          description: Number of paths currently active in this workflow
          example: 42
      required:
        - diagramId
        - name
        - status
        - journeysInProgress
    automation-brain-PaginatedDashboardUpcomingStatusChanges:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of upcoming status changes
          items:
            $ref: "#/components/schemas/automation-brain-DashboardUpcomingStatusChangeItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardUpcomingStatusChangeItem:
      type: object
      properties:
        actionType:
          type: string
          description: Type of the scheduled status change
          enum:
            - Resume
            - Pause
            - Stop
          example: Pause
        plannedAt:
          $ref: "#/components/schemas/automation-brain-PlannedAt"
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        currentStatus:
          type: string
          description: Current status of the workflow
          enum:
            - Draft
            - Running
            - Paused
            - Stopped
            - Pending
          example: Running
      required:
        - actionType
        - plannedAt
        - diagramId
        - name
        - currentStatus
    automation-brain-PlannedAt:
      type: string
      format: date-time
      description: Planned execution time
      example: 2024-06-15T10:00:00.000Z
    automation-brain-PaginatedDashboardUpcomingTriggers:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of upcoming trigger events
          items:
            $ref: "#/components/schemas/automation-brain-DashboardUpcomingTriggerItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardUpcomingTriggerItem:
      type: object
      properties:
        triggerType:
          type: string
          description: Type of the trigger
          example: RepeatTrigger
        plannedAt:
          $ref: "#/components/schemas/automation-brain-PlannedAt"
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
      required:
        - plannedAt
        - diagramId
        - name
    automation-brain-PaginatedDashboardDiagramsWithIssues:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows with issues
          items:
            $ref: "#/components/schemas/automation-brain-DashboardDiagramWithIssuesItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardDiagramWithIssuesItem:
      type: object
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        failureCount:
          type: integer
          description: Number of failures encountered by this workflow
          example: 12
      required:
        - diagramId
        - name
        - status
        - failureCount
    automation-brain-PaginatedDashboardDiagramsFailingJobs:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows with failing jobs, ordered worst-first (failedCount descending, then warningCount descending)
          items:
            $ref: "#/components/schemas/automation-brain-DashboardDiagramFailingJobsItem"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DashboardDiagramFailingJobsItem:
      type: object
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        failedCount:
          type: integer
          description: Number of failed jobs of this workflow in the given time period. Counts are per job, so a journey with several failed blocks counts each of them.
          example: 12
        warningCount:
          type: integer
          description: Number of jobs of this workflow that finished with a warning in the given time period. Counts are per job, so a journey with several warning blocks counts each of them.
          example: 3
      required:
        - diagramId
        - name
        - status
        - failedCount
        - warningCount
    automation-brain-PaginatedDiagrams:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: "#/components/schemas/automation-brain-DiagramDetails"
        meta:
          $ref: "#/components/schemas/automation-brain-Pagination"
    automation-brain-Pagination:
      type: object
      description: Pagination data
      required:
        - limit
        - page
        - totalPages
        - totalCount
      properties:
        limit:
          type: number
          example: 3
          description: Maximum number of items per page
        page:
          type: number
          example: 1
          description: Current page number
        totalPages:
          type: number
          example: 10
          description: Total number of pages
        totalCount:
          description: Total number of workflows on all pages
          type: number
          example: 29
    automation-brain-DiagramDetails:
      type: object
      description: Details of the workflow
      required:
        - diagramId
        - author
        - listingAuthor
        - name
        - created
        - updated
        - status
        - scheduleStatus
        - configuration
        - catalogId
        - context
        - tags
        - description
        - hasTransformation
        - businessProfileId
      properties:
        diagramId:
          $ref: "#/components/schemas/automation-brain-DiagramId"
        author:
          description: Author of the workflow
          type: string
          example: example@synerise.com
        listingAuthor:
          type: object
          properties:
            userId:
              type: number
            clientId:
              type: number
            clientApiHash:
              type: string
            businessProfileApiHash:
              type: string
        name:
          $ref: "#/components/schemas/automation-brain-DiagramName"
        created:
          description: Creation time
          type: string
          format: date-time
          example: 2019-01-04T13:17:18.315Z
        updated:
          description: Last update time
          type: string
          format: date-time
          example: 2019-01-04T13:17:18.315Z
        status:
          $ref: "#/components/schemas/automation-brain-DiagramStatus"
        scheduleStatus:
          description: Workflow schedule status
          type: string
          enum:
            - On
            - Off
            - NoSchedule
        configuration:
          $ref: "#/components/schemas/automation-brain-DiagramConfiguration"
        catalogId:
          description: UUID of the catalog where the workflow is saved
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
        context:
          $ref: "#/components/schemas/automation-brain-AutomationContext"
        tags:
          description: Tags associated with this workflow
          type: array
          items:
            $ref: "#/components/schemas/automation-brain-TagDetails"
        description:
          description: Workflow description
          type: string
          example: Sample workflow description
        hasTransformation:
          type: boolean
          description: "`true` if the workflow contains Data Transformation nodes"
        businessProfileId:
          type: number
    automation-brain-TagDetails:
      type: object
      required:
        - hash
        - value
        - color
      properties:
        hash:
          type: string
          example: 030a9be3-8ccc-44c7-b20b-27768816cab7
          description: Unique ID of the tag
        value:
          type: string
          description: Name of the tag
        color:
          type: string
          description: Color of the tag, hexadecimal
          example: "#0b68ff"
        description:
          type: string
          description: Description of the tag
        icon:
          type: string
          description: URL of the tag's icon
    automation-brain-AutomationContext:
      description: |
        Context of the workflow.
        - `Client` workflows are triggered by "Profile Event"; "Data Changed"; and "Audience" nodes.
        - `Business` workflows are triggered by "Business Event" and "Scheduled Run" nodes.
        - `Undefined` workflows have no trigger and can't be started until their configuration is finished.
      type: string
      enum:
        - Client
        - Business
        - Undefined
    automation-brain-DiagramConfiguration:
      description: Workflow configuration
      type: object
      properties:
        capping:
          $ref: "#/components/schemas/automation-brain-LimitConfiguration"
        multipleJourneys:
          type: boolean
          description: Diagram has multiple journeys enabled
          default: false
    automation-brain-LimitConfiguration:
      type: object
      description: Capping configuration of the workflow
      required:
        - limit
        - period
      properties:
        limit:
          type: number
          description: The maximum number of times the a journey for a single profile within the limits defined in `period`
        period:
          type: object
          description: The time period for the quantitative limit defined in `limit`
          required:
            - type
          properties:
            type:
              type: string
              description: |-
                The type of time limit. `Time` is the only type available for workflows. A journey can be started X times in a period defined by `timeSeconds`.
                X is defined by the `limit` field.
              enum:
                - Time
            timeSeconds:
              type: number
              description: The length of the limit, in seconds (the limit is always calculated into seconds, even if another unit of time is used in the Synerise Web Application).
    automation-brain-PaginatedDiagramsV2:
      type: object
      required:
        - data
        - meta
      properties:
        data:
          type: array
          description: An array of workflows
          items:
            $ref: "#/components/schemas/automation-brain-DiagramDetails"
        meta:
          $ref: "#/components/schemas/automation-brain-PaginationV2"
    automation-brain-DiagramActionRequest:
      type: object
      properties:
        scheduleAction:
          type: string
          enum:
            - On
            - Off
            - NoAction
    automation-brain-DiagramSchedule:
      type: object
      properties:
        active:
          description: "`true` if schedule is enabled."
          type: boolean
        timezone:
          $ref: "#/components/schemas/automation-brain-ScheduleTimezone"
        rules:
          type: array
          description: Rules of the schedule
          items:
            type: object
            properties:
              ruleId:
                $ref: "#/components/schemas/automation-brain-RuleId"
              actionType:
                $ref: "#/components/schemas/automation-brain-ScheduledActionType"
              repeatModel:
                $ref: "#/components/schemas/automation-brain-RepeatModel"
              listingAuthor:
                type: object
                description: Author of the rule
                properties:
                  userId:
                    type: number
                    description: Unique ID of a Synerise user
              createdAt:
                type: string
                example: 2020-01-01T01:00:00Z
                format: date-time
                description: Date and time when the rule was created
            required:
              - ruleId
              - actionType
              - repeatModel
              - listingAuthor
              - createdAt
      required:
        - active
        - timezone
        - rules
    automation-brain-RepeatModel:
      description: Repetition times
      type: object
      required:
        - repeatType
        - body
      properties:
        repeatType:
          description: |
            Repetition type. **Currently, only `OnDate` is compatible with the Synerise Web Portal.**

            - "Interval" runs the rule after a counter finishes. Then the counter restarts.
            - "Daily" runs the rule at a specific time each day.
            - "Weekly" runs the rule on specific days of the week, at a specific time.
            - "Monthly" runs the rule on specific days of the month, at a specific time.
            - "OnDate" runs the rule once, at a specific date and time.
          type: string
          enum:
            - Interval
            - Daily
            - Weekly
            - Monthly
            - OnDate
        body:
          description: Repetition time
          oneOf:
            - $ref: "#/components/schemas/automation-brain-RepeatInterval"
            - $ref: "#/components/schemas/automation-brain-RepeatDaily"
            - $ref: "#/components/schemas/automation-brain-RepeatWeekly"
            - $ref: "#/components/schemas/automation-brain-RepeatMonthly"
            - $ref: "#/components/schemas/automation-brain-OnDate"
    automation-brain-OnDate:
      title: OnDate
      type: object
      required:
        - date
      properties:
        date:
          type: string
          description: A date and time when the rule runs.
          example: 2020-01-01T01:00:00.000
    automation-brain-RepeatMonthly:
      title: Monthly
      type: object
      required:
        - daysOfMonth
      properties:
        daysOfMonth:
          type: array
          description: Used for running the automation on specific days of the month.
          items:
            type: object
            required:
              - day
              - dayTime
              - ruleId
            properties:
              day:
                type: integer
                description: Days of the month with. `-1` is the last day of the month.
              dayTime:
                type: string
                description: Hour with minutes
                example: 21:37
              ruleId:
                type: integer
                description: Number of rule
    automation-brain-RepeatWeekly:
      title: Weekly
      type: object
      required:
        - daysOfWeek
      properties:
        daysOfWeek:
          type: array
          description: Used for running the rule on specific days of the week.
          items:
            type: object
            required:
              - day
              - dayTime
              - ruleId
            properties:
              day:
                type: integer
                description: Number of the day in the week. `1` is Monday.
              dayTime:
                type: string
                description: Hour with minutes
                example: 21:37
              ruleId:
                type: integer
                description: Number of the rule
    automation-brain-RepeatDaily:
      title: Daily
      type: object
      required:
        - hours
      properties:
        hours:
          type: array
          description: Used for running the rule at a specific time or times every day.
          items:
            type: string
            description: Hour with minutes
            example: 12:30
    automation-brain-RepeatInterval:
      title: Interval
      type: object
      required:
        - start
        - intervalSeconds
      properties:
        start:
          type: string
          description: Date and time to start counting the interval from
          format: date-time
          example: 2020-01-01T01:00:00.000
        intervalSeconds:
          type: integer
          minimum: 3600
          maximum: 31536000
          description: The interval value in seconds
          example: 6000
    automation-brain-ScheduledActionType:
      type: string
      description: The status to apply when the rule runs. **A stopped workflow can't be restarted**.
      enum:
        - Resume
        - Pause
        - Stop
    automation-brain-RuleId:
      type: string
      format: uuid
      description: Unique ID of the rule
    automation-brain-ScheduleTimezone:
      description: |
        Timezone of the schedule. Accepts these formats:
        - "Europe/Paris"
        - "-05:00"
        - "UTC-1"
      type: string
      example: Europe/Paris
    automation-brain-DiagramScheduleRequest:
      type: object
      properties:
        timezone:
          $ref: "#/components/schemas/automation-brain-ScheduleTimezone"
        rules:
          type: array
          description: Rules of the schedule
          items:
            type: object
            properties:
              ruleId:
                type: string
                format: uuid
                description: In POST requests, rule ID is only used in `preview` requests. It lets you match a rule with upcoming events and status changes.
              actionType:
                $ref: "#/components/schemas/automation-brain-ScheduledActionType"
              repeatModel:
                $ref: "#/components/schemas/automation-brain-RepeatModel"
            required:
              - actionType
              - repeatModel
      required:
        - timezone
        - rules
    automation-brain-ExecutedDiagramScheduleEvent:
      type: object
      properties:
        actionType:
          $ref: "#/components/schemas/automation-brain-ScheduledActionType"
        ruleId:
          $ref: "#/components/schemas/automation-brain-RuleId"
        executedAt:
          type: string
          example: 2020-01-01T01:00:00Z
          description: Date and time when the rule was executed
        timezone:
          $ref: "#/components/schemas/automation-brain-ScheduleTimezone"
        status:
          type: string
          enum:
            - Success
            - Failure
        error:
          $ref: "#/components/schemas/automation-brain-Error"
      required:
        - actionId
        - actionType
        - executedAt
        - timezone
        - status
    automation-brain-HasMore:
      type: boolean
      description: "`true` when there are entries outside the start/end range"
    automation-brain-UpcomingDiagramScheduleEvent:
      type: object
      properties:
        actionType:
          $ref: "#/components/schemas/automation-brain-ScheduledActionType"
        ruleId:
          $ref: "#/components/schemas/automation-brain-RuleId"
        plannedAt:
          $ref: "#/components/schemas/automation-brain-PlannedAtNoTz"
        timezone:
          $ref: "#/components/schemas/automation-brain-ScheduleTimezone"
      required:
        - actionId
        - actionType
        - plannedAt
        - timezone
    automation-brain-PlannedAtNoTz:
      type: string
      description: The time when this rule will be executed
      example: 2020-01-01T01:00:00Z
    automation-brain-UpcomingDiagramStatusChange:
      type: object
      description: A workflow status change defined by a schedule
      properties:
        status:
          type: string
          description: The status to apply
          enum:
            - Running
            - Paused
            - Stopped
        ruleId:
          $ref: "#/components/schemas/automation-brain-RuleId"
        plannedAt:
          $ref: "#/components/schemas/automation-brain-PlannedAtNoTz"
        timezone:
          $ref: "#/components/schemas/automation-brain-ScheduleTimezone"
      required:
        - actionId
        - actionType
        - plannedAt
        - timezone
    automation-brain-ExternalDiagramStatsWithInfo:
      type: object
      required:
        - started
        - finished
        - inProgress
        - blocks
      properties:
        started:
          type: integer
          format: int64
          description: The number of times a workdlow was started (a trigger node was activated)
        finished:
          type: integer
          format: int64
          description: The number of times an "End" node was reached.
        inProgress:
          type: integer
          format: int64
          description: The number of profiles currently in the workflow.
        blocks:
          type: object
          description: Statistics for individual nodes.
          additionalProperties:
            $ref: "#/components/schemas/automation-brain-ExternalBlockStatsWithInfo"
    automation-brain-ExternalBlockStatsWithInfo:
      type: object
      description: The name of this object is the UUID of the node
      required:
        - type
        - entered
      properties:
        name:
          type: string
          description: Name of the node, if defined
        type:
          type: string
          description: Node type
          example: EventTrigger
        entered:
          type: integer
          format: int64
          description: The number of profiles which entered this node
        executed:
          type: integer
          format: int64
          description: "The number of profiles which completed this node. NOT available for: Trigger nodes, End nodes, ABx Test nodes, Split Path nodes, and Merge Paths nodes."
      additionalProperties:
        type: integer
        description: Additional statistics, depending on node type. See the [User guide](https://hub.synerise.com/docs/automation/automation-activity-tracking/#statistics-reference) for a list.
        format: int64
    morph-HttpErrorDetails:
      type: object
      required:
        - error
        - status
      properties:
        error:
          type: string
          description: Summary of the error
        status:
          type: integer
          format: int32
          description: Status code
        timestamp:
          type: string
          description: Time when the error occurred
        message:
          type: string
          description: Description of the problem. If an error code is included, check the [API Error Reference](https://developers.synerise.com/errors.html) for details.
    morph-DtDiagramLastRunResponse:
      type: object
      required:
        - startTime
        - pipelineResponse
        - overallRunStatus
      properties:
        startTime:
          $ref: "#/components/schemas/morph-StartTime"
        runId:
          $ref: "#/components/schemas/morph-RunId"
        pipelineResponse:
          $ref: "#/components/schemas/morph-AutomationLogsResponse"
        overallRunStatus:
          $ref: "#/components/schemas/morph-JobStatus"
    morph-JobStatus:
      type: string
      description: High-level status of the job. If a given type of job doesn't exist in a workflow (for example, `transformData` in a workflow without any Data Transformation nodes), the status is `Pending`.
      enum:
        - Pending
        - InProgress
        - Finished
        - Failed
        - Warning
      example: Pending
    morph-AutomationLogsResponse:
      description: Logs for each stage in the workflow
      type: object
      properties:
        importData:
          description: Logs for pulling data into the workflow
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
        transformData:
          description: Logs for Data Transformation processing
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
        exportData:
          description: Logs for pushing data from the workflow
          allOf:
            - $ref: "#/components/schemas/morph-LogsForStage"
    morph-LogsForStage:
      type: object
      required:
        - status
        - logs
        - logsSize
      properties:
        status:
          $ref: "#/components/schemas/morph-JobStatus"
        runDate:
          type: string
          description: Time when this job started
          example: 2022-01-31T12:37:25.109Z
        logs:
          type: array
          description: An array of log lines
          items:
            type: string
            example: 2022-01-31T12:37:25.109412Z INFO Job finished with success!
        logsSize:
          type: number
          description: The number of returned log lines
        failedRecordsFileId:
          type: string
          format: uuid
          description: UUID of the input file that couldn't be processed
        successCount:
          type: integer
          description: Number of rows successfully processed by the job
        failureCount:
          type: integer
          description: Number of rows that failed during processing by the job
    morph-RunId:
      type: string
      format: uuid
      description: "`journeyId` of the last Automation run"
    morph-StartTime:
      description: Time when the journey started
      type: string
      format: date-time
      example: 2023-09-05T14:07:44.264Z
  parameters:
    automation-brain-limit:
      name: limit
      in: query
      description: Number of items per page
      schema:
        type: number
        default: 10
    automation-brain-page:
      name: page
      in: query
      description: The selected page
      schema:
        type: number
        default: 1
        minimum: 1
    automation-brain-timePeriod:
      name: timePeriod
      in: query
      description: Time period for statistics
      schema:
        type: string
        enum:
          - 24h
          - 7d
    automation-brain-generatesEvent:
      name: generatesEvent
      in: query
      required: false
      description: |
        Event name generated by the workflow. If provided, only workflows
        containing a SendEvent block, or a Webhook block whose responseAction
        is set to this event, are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    automation-brain-triggersOnEvent:
      name: triggersOnEvent
      in: query
      required: false
      description: |
        Event name that triggers or filters the workflow. If provided, only
        workflows containing an EventTrigger or EventFilter block configured
        for this event are returned. Matched case-insensitively.
      schema:
        type: string
        maxLength: 64
        pattern: ^[a-zA-Z0-9.\-_]+$
    automation-brain-blockTypes:
      name: blockTypes
      in: query
      required: false
      description: |
        Comma-separated list of block type names (e.g. "Email,EventTrigger").
        If provided, only workflows that contain a block of EVERY listed type
        are returned. The parameter may also be repeated.
      schema:
        type: string
    automation-brain-directoryId:
      name: directoryId
      in: query
      description: UUID of the directory/catalogue/folder.
      schema:
        type: string
        format: uuid
    automation-brain-search:
      name: search
      in: query
      description: A string to search for in workflow names and email addresses of authors. Workflows that don't match the search aren't returned at all.
      schema:
        type: string
    automation-brain-sortingOrder:
      name: order
      in: query
      description: Sorting order
      schema:
        type: string
        enum:
          - Asc
          - Desc
        default: Desc
    automation-brain-sortByDiagrams:
      name: sortBy
      in: query
      description: Sort workflows clause
      example: createdTime:desc
      schema:
        type: string
    automation-brain-sortDiagrams:
      name: sort
      in: query
      description: Sort workflows by a property value
      schema:
        type: string
        enum:
          - Author
          - Name
          - CreatedTime
          - UpdatedTime
          - Status
        default: UpdatedTime
    automation-brain-filterByStatus:
      name: status
      in: query
      description: Filter workflows by status
      schema:
        type: string
        enum:
          - All
          - Recent
          - Draft
          - Pending
          - Active
          - Paused
          - Stopped
          - Inactive
          - Scheduled
          - NoSchedule
          - ScheduleOn
          - ScheduleOff
        default: All
    automation-brain-tagIds:
      name: tags
      in: query
      required: false
      schema:
        type: string
        description: List of comma separated tags
    automation-brain-limit50:
      name: limit
      in: query
      description: Number of items per page
      schema:
        type: number
        default: 50
    automation-brain-diagramId:
      name: diagramId
      in: path
      description: UUID of the workflow/diagram
      required: true
      schema:
        type: string
    automation-brain-ScheduleEventFilterEnd:
      name: end
      in: query
      description: End date
      schema:
        type: string
        format: date-time
    automation-brain-ScheduleEventFilterStart:
      name: start
      in: query
      description: Start date
      schema:
        type: string
        format: date-time
    morph-LogsLimitInQuery:
      name: limit
      in: query
      required: false
      schema:
        type: number
        default: 500
        maximum: 5000
      description: The maximum number of log lines in each stage
  responses:
    automation-brain-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-genericError:
      description: See error message for details
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-Error"
    automation-brain-404:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-400:
      description: "Bad request: input data missing or malformed"
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/automation-brain-HTTP400"
    automation-brain-SimpleError:
      description: See error message for details
      content:
        text/plain:
          schema:
            type: string
            description: Description of the problem
    morph-403:
      description: Forbidden; insufficient permissions
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
    morph-401:
      description: "Unauthorized: wrong consumer scope; token missing/expired/invalid; invalid API key; etc."
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/morph-HttpErrorDetails"
