openapi: 3.0.1
info:
  title: Contactflow API
  description: Contactflow API
  version: 2.49.0
servers:
  - url: https://api.contactlab.it/flow/v1
paths:
  /me:
    get:
      tags:
        - User
      summary: Get current user info
      description: Returns basic informations about the current user and a list of
        nodes on which it can operate
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserInfo'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN, USER, GUEST]
  /actions:
    get:
      tags:
        - Actions
      summary: Get avaible actions for node
      description: Return the avaible actions of a node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepActionList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CONFIGURATOR, CLAB_OPERATOR, ADMIN, USER, GUEST]
  /nodes:
    get:
      tags:
        - Nodes
      summary: Get all nodes
      description: Returns all available nodes for the current user
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - name: portfolioUuid
          in: query
          description: Filter nodes by portfolio
          schema:
            type: string
            format: uuid
        - name: workspaceUuid
          in: query
          description: Filter nodes by workspace
          schema:
            type: string
            format: uuid
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableNodeList'
        401:
          description: 'Unathorized'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CONFIGURATOR, CLAB_OPERATOR, ADMIN, USER, GUEST]
    post:
      tags:
        - Nodes
      summary: Create a node
      description: Handles node provisioning
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      requestBody:
        description: The node resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Node'
        required: true
      responses:
        201:
          description: The node was successfully provisioned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Node'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        409:
          description: A resource with the same identifier already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR]
  /nodes/{nodeUuid}:
    get:
      tags:
        - Nodes
      summary: Get a node
      description: Returns the node with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Node'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CONFIGURATOR, CLAB_OPERATOR, ADMIN, USER, GUEST]
    delete:
      tags:
        - Nodes
      summary: Delete a node
      description: Deletes the node with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeUuidPathVariable'
      responses:
        204:
          description: The resource was deleted succesfully
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR]
    patch:
      tags:
        - Nodes
      summary: Update a node
      description: |
        Enables or disables a node, sms, email service by setting their active property.
        Updates hubPhoneField used for sms service.
        A disabled node is in a "logical deletion" status, which means it is not operational, not usable or visible.
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeUuidPathVariable'
      requestBody:
        description: The property of the node resource
        content:
          application/json:
            schema:
              type: object
              properties:
                active:
                  type: boolean
                smsActive:
                  type: boolean
                emailActive:
                  type: boolean
                hubPhoneField:
                  type: string
              required:
                - active
        required: true
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Node'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR]
  /settings:
    get:
      tags:
        - Node Settings
      summary: Get all settings
      description: Returns all settings for the specified node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - name: Category
          in: query
          description: Filter by category
          schema:
            type: string
            enum:
              - INTEGRATION
        - name: Type
          in: query
          description: Filter by type
          schema:
            type: string
            enum:
              - CLAB_API_SOAP
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupedSettings'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN]
    post:
      tags:
        - Node Settings
      summary: Add a setting
      description: Adds a setting to the specified node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      requestBody:
        description: The setting to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Setting'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Setting'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN]
  /settings/{settingUuid}:
    get:
      tags:
        - Node Settings
      summary: Get a setting
      description: Returns the setting with the specified UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/SettingUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Setting'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN]
    put:
      tags:
        - Node Settings
      summary: Update a setting
      description: Updates the setting with the specified UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/SettingUuidPathVariable'
      requestBody:
        description: The setting resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Setting'
        required: true
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Setting'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN]
    delete:
      tags:
        - Node Settings
      summary: Delete a setting
      description: Deletes the setting with the specified UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/SettingUuidPathVariable'
      responses:
        204:
          description: The resource was deleted succesfully
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CONFIGURATOR, CLAB_OPERATOR, ADMIN]
  /automations:
    get:
      tags:
        - Automations
      summary: Get all automations
      description: Returns all available automations
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - name: name
          in: query
          description: Filter by name
          schema:
            type: string
        - name: description
          in: query
          description: Filter by description
          schema:
            type: string
        - name: status
          in: query
          description: Filter by one or more statuses
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - COMMITTED
                - PAUSED
                - RUNNING
                - ARCHIVED
                - DRAFT
                - ERROR
                - TO_ARCHIVE
        - name: category
          in: query
          description: Filter by one or more categories
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - Custom
        - name: startDateBefore
          in: query
          description: Filter by automation startDate before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: startDateAfter
          in: query
          description: Filter by automation start date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: endDateBefore
          in: query
          description: Filter by automation end date before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: endDateAfter
          in: query
          description: Filter by automation end date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: createdBefore
          in: query
          description: Filter by automation creation date before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: createdAfter
          in: query
          description: Filter by automation creation date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: style
          in: query
          description: If equals compact, show less element in response
          schema:
            type: string
        - name: stepType
          in: query
          description: Filter automation by action type
          schema:
            type: string
            enum:
              - CLAB_CAMPAIGN_SMS
              - CLAB_CAMPAIGN
              - WEBHOOK
              - TAG
              - FROM_LAST_STEP
              - WAIT_AND_CHECK
              - WAIT_FOR_TRIGGER
              - AB_TEST
              - NO_ACTION
        - name: hasTrigger
          in: query
          description: Filter automation that have real time source
          schema:
            type: boolean
            default: false
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PageableAutomationList'
                  - $ref: '#/components/schemas/PageableAutomationListCompact'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CLAB_OPERATOR, ADMIN, USER, GUEST]
    post:
      tags:
        - Automations
      summary: Create an automation
      description: Creates an automation
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      requestBody:
        description: The automation resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Automation'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        409:
          description: A resource with the same identifier already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        422:
          description: The requested operation is not allowed while the resource is
            in the current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /automations/{automationUuid}:
    get:
      tags:
        - Automations
      summary: Get an automation
      description: Returns the automation with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CLAB_OPERATOR, ADMIN, USER, GUEST]
    put:
      tags:
        - Automations
      summary: Update an automation
      description: Updates the automation with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
        - $ref: "#/components/parameters/RemoveExpiredCustomersQueryParamNotRequired"
      requestBody:
        description: The automation resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Automation'
        required: true
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        422:
          description: The requested operation is not allowed while the resource is
            in the current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
    patch:
      tags:
        - Automations
      summary: Update an automation status and name
      description: Updates the automation status with the given UUID and status
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
        - $ref: "#/components/parameters/RemoveExpiredCustomersQueryParamNotRequired"
      requestBody:
        description: The automation resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutomationPatch'
        required: true
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Automation'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        422:
          description: The requested operation is not allowed while the resource is
            in the current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
    delete:
      tags:
        - Automations
      summary: Delete an automation
      description: Deletes the automation with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
      responses:
        204:
          description: The resource was deleted succesfully
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /automations/{automationUuid}/steps/{stepUuid}/feedbacks:
    get:
      tags:
        - Automations
      summary: Get feedbacks for a step
      description: Returns the feedbacks for the step eith the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
        - $ref: '#/components/parameters/StepUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StepFeedbacks'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /automations/{automationUuid}/feedbacks:
    get:
      tags:
        - Automations
      summary: Get feedbacks for an automation
      description: Returns the feedbacks for the automation with the given UUID
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationFeedbacks'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /automations/reports/automations.csv:
    post:
      tags:
        - Automations
      summary: Get reports for all Automations
      description: Returns reports for all Automations in a CSV file
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidQueryParam'
        - name: name
          in: query
          description: Filter by automation name
          schema:
            type: string
        - name: description
          in: query
          description: Filter by automation description
          schema:
            type: string
        - name: status
          in: query
          description: Filter by one or more status
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - COMMITTED
                - PAUSED
                - RUNNING
                - ARCHIVED
                - DRAFT
                - ERROR
        - name: category
          in: query
          description: Filter by one or more categories
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
              enum:
                - Custom
        - name: startDateBefore
          in: query
          description: Filter by automation startDate before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: startDateAfter
          in: query
          description: Filter by automation start date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: endDateBefore
          in: query
          description: Filter by automation end date before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: endDateAfter
          in: query
          description: Filter by automation end date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: createdBefore
          in: query
          description: Filter by automation creation date before or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: createdAfter
          in: query
          description: Filter by automation creation date after or equal to the specified
            date
          schema:
            type: string
            format: date-time
        - name: filename
          in: query
          description: filename
          schema:
            type: string
            default: feedbacks
        - name: stepType
          in: query
          description: Filter automation by action type
          schema:
            type: string
            enum:
              - CLAB_CAMPAIGN
              - CLAB_CAMPAIGN_SMS
              - FROM_LAST_STEP
              - WAIT_AND_CHECK
              - WAIT_FOR_TRIGGER
              - AB_TEST
              - NO_ACTION
        - name: hasTrigger
          in: query
          description: Filter automation that have real time source
          schema:
            type: boolean
            default: false
      responses:
        200:
          description: OK
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/csv:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/csv:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/csv:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /automations/categories:
    get:
      tags:
        - Automations
      summary: Get automation categories
      description: Returns all available automation categories
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/AutomationCategory'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      deprecated: true
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /automations/{automationUuid}/customers:
    post:
      tags:
        - Customers
      summary: Add a customer to an automation
      description: Adds a customer to the specified automation
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
      requestBody:
        description: The customer to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Customer'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Customer'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /automations/{automationUuid}/customers/{customerUuid}:
    delete:
      tags:
        - Customers
      summary: Delete a customer from an automation
      description: Deletes the customer with the given UUID from the specified automation
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
        - name: customerUuid
          in: path
          description: The UUID of the customer
          required: true
          schema:
            type: string
            format: uuid
      responses:
        204:
          description: The resource was deleted succesfully
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN]
  /automations/{automationUuid}/customers-batch:
    post:
      tags:
        - Customers
      summary: Add a batch of customers to an automation
      description: Adds a batch of customers to the specified automation
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
      requestBody:
        description: The list of customers to add to the automation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomersBatch'
        required: true
      responses:
        201:
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomersBatchStatus'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        422:
          description: The requested operation is not allowed while the resource is
            in the current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CLAB_OPERATOR, ADMIN, USER]
    delete:
      tags:
        - Customers
      summary: Delete an incomplete batch of customers from an automation
      description: |
        Deletes all customers belonging to an open batch source (by specifying
        sourceUuid parameter)
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidPathVariable'
        - $ref: '#/components/parameters/SourceUuidQueryParam'
      responses:
        204:
          description: The resource was deleted succesfully
          content: {}
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        422:
          description: The requested operation is not allowed while the resource is
            in the current status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [PLATFORM_INTEGRATION, CLAB_OPERATOR, ADMIN, USER]
  /customer-tokens/{tokenUuid}:
    get:
      tags:
        - Customer Tokens
      summary: Get token info
      description: Retrieves the detailed of the token by its id
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/TokenUuidPathVariable'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerToken'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /customer-tokens:
    get:
      tags:
        - Customer Tokens
      summary: Search current customers in node
      description: Retrieves a detailed list of current customers in node filtered
        by automation or step
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidQueryParam'
        - $ref: '#/components/parameters/StepUuidQueryParam'
        - $ref: '#/components/parameters/ClabUuidQueryParam'
        - $ref: '#/components/parameters/RecipientQueryParam'
        - $ref: '#/components/parameters/AggregatedStatusQueryParam'
        - $ref: '#/components/parameters/Page'
        - $ref: '#/components/parameters/Size'
        - $ref: '#/components/parameters/Style'
        - $ref: '#/components/parameters/TokensMonitorSort'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/PageableCustomerExtendedList'
                  - $ref: '#/components/schemas/PageableTokenMonitorList'
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /customer-tokens/reports/tokens:
    post:
      tags:
        - Customer Tokens
      summary: Get reports for all Tokens (ZIP)
      description: Returns reports for all Tokens in a ZIP file
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - $ref: '#/components/parameters/AutomationUuidQueryParam'
        - $ref: '#/components/parameters/StepUuidQueryParam'
        - $ref: '#/components/parameters/ClabUuidQueryParam'
        - $ref: '#/components/parameters/RecipientQueryParam'
        - $ref: '#/components/parameters/AggregatedStatusQueryParam'
        - name: filename
          in: query
          description: filename
          schema:
            type: string
            default: automations-monitor
      responses:
        200:
          description: OK
          content:
            application/zip:
              schema:
                type: string
                format: binary
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/zip:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/zip:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/zip:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/zip:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]

  /extContents/emaildesigner:
    get:
      tags:
        - External Contents
      summary: Get Email Designer configurations
      description: Returns Email Designer configurations of logged User (i.e. enabled)
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailDesignerConfogurations'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/messagemodels/mail:
    get:
      tags:
        - External Contents
      summary: Get all message mail models
      description: Returns all available mail message models (i.e. SEND Mail Groups)
        for the specified node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmailMessageModel'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/messagemodels/sms:
    get:
      tags:
        - External Contents
      summary: Get all sms mail models
      description: Returns all available sms message models (i.e. SMS Mail Groups)
        for the specified node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SmsMessageModel'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/pagebuilderTemplates:
    get:
      tags:
        - External Contents
      summary: Get PageBuilder templates
      description: Returns all available PageBuilder templates for the specified node
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePagebuilderTemplateList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/pagebuilderTemplates/{templateId}/pages:
    get:
      tags:
        - External Contents
      summary: Get all PageBuilder template's pages
      description: Returns all pages of a PageBuilder template
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - name: templateId
          in: path
          description: Template ID
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageablePagebuilderTemplatePageList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/pagebuilderTemplates/{templateId}/pages/{pageId}:
    get:
      tags:
        - External Contents
      summary: Get a PageBuilder template's page
      description: Returns a specific page of a given PageBuilder template
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
        - name: templateId
          in: path
          description: Template ID
          required: true
          schema:
            type: integer
        - name: pageId
          in: path
          description: Page ID
          required: true
          schema:
            type: integer
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PagebuilderTemplatePage'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /extContents/test/email:
    post:
      tags:
        - External Contents
      summary: Send email test for step mail
      description: Send email test for step mail
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      requestBody:
        description: The test campaign resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestCampaign'
        required: true
      responses:
        200:
          description: OK
          content: {}
        400:
          description: The request was malformed or some attributes were missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
  /subscriptions:
    get:
      tags:
        - Send Subscriptions
      summary: Get Send subscriptions
      description: Returns a list of Send subscriptions mapped in the source Send
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionsList'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [ CLAB_OPERATOR, ADMIN, USER, GUEST ]
  /kpis:
    get:
      tags:
        - KPIs
      summary: Get nodes basic infos and automations status aggregate
      description: Returns all nodes basic infos and the related automations status
        aggregate
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageableNodeAutomationsStatusAggregate'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR]
  /definitions/trigger-events:
    get:
      tags:
        - Definitions
      summary: Get trigger events definitions
      description: Return trigger events type with the related attributes
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /definitions/contexts:
    get:
      tags:
        - Definitions
      summary: Get events context definitions
      description: Return context definitions with the related attributes and types
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /definitions/customers:
    get:
      tags:
        - Definitions
      summary: Get customers definitions
      description: Return customers definitions with the related attributes and types
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        404:
          description: The requested resource does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER]
  /definitions/automation-categories:
    get:
      tags:
        - Definitions
      summary: Get automation categories
      description: Returns all available automation categories
      parameters:
        - $ref: '#/components/parameters/AuthorizationHeader'
        - $ref: '#/components/parameters/NodeHeader'
      responses:
        200:
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  categories:
                    type: array
                    items:
                      $ref: '#/components/schemas/AutomationCategory'
        401:
          description: Unauthorized (Missing or invalid authorization token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        403:
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        500:
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - OAuth2: [CLAB_OPERATOR, ADMIN, USER, GUEST]
components:
  schemas:
    User:
      type: object
      properties:
        userPk:
          type: integer
        name:
          type: string
        surname:
          type: string
        username:
          type: string
        email:
          type: string
        lang:
          type: string
        timezone:
          type: string
        picture:
          type: string
        roles:
          type: array
          items:
            type: string
            enum:
              - CONFIGURATOR
              - CLAB_OPERATOR
              - ADMIN
              - USER
              - GUEST
        mc:
          type: boolean
    UserInfo:
      type: object
      properties:
        base:
          $ref: '#/components/schemas/User'
        extended:
          type: object
          properties:
            nodes:
              type: array
              items:
                $ref: '#/components/schemas/Node'
    Node:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        workspaceUuid:
          type: string
          format: uuid
        workspaceName:
          type: string
        portfolioUuid:
          type: string
          format: uuid
        portfolioName:
          type: string
        groupPk:
          type: integer
          format: int64
        userdbId:
          type: integer
          format: int64
        groupName:
          type: string
        active:
          type: boolean
        emailActive:
          type: boolean
        smsActive:
          type: boolean
        created:
          type: string
          format: date-time
        hubPhoneField:
          type: string
    Setting:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        label:
          type: string
        category:
          type: string
          enum:
            - INTEGRATION
        type:
          type: string
          enum:
            - CLAB_API_SOAP
            - HUB
        value:
          type: object
          properties: {}
    GroupedSettings:
      type: object
      properties:
        integrations:
          type: array
          items:
            $ref: '#/components/schemas/Setting'
    Automation:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        category:
          $ref: '#/components/schemas/AutomationCategory'
        author:
          type: string
        startDate:
          type: string
          format: date-time
        timezone:
          type: string
        status:
          $ref: '#/components/schemas/AutomationStatus'
        created:
          type: string
          format: date-time
        createdBy:
          type: string
        description:
          type: string
        endDate:
          type: string
          format: date-time
        uniqueToken:
          type: boolean
          description: Set this to discard duplicated token
          default: false
        removeActionPrimary:
          type: boolean
          description: It is valid only for real time source when INSERT CUSTOMER
            ACTION and REMOVE CUSTOMER ACTION have same conditions. It specifies if
            REMOVE CUSTOMER ACTION has priority.
          default: false
        sourceDescription:
          type: string
          description: Description of source
        triggerEvents:
          type: array
          items:
            type: object
            properties:
              event:
                $ref: '#/components/schemas/TriggerEventType'
              context:
                $ref: '#/components/schemas/TriggerEventTypeContext'
              action:
                $ref: '#/components/schemas/TriggerAction'
              includeUpdateEvents:
                type: boolean
                description: Include update events on insert
                default: false
              mapping:
                $ref: '#/components/schemas/EventMapping'
              filter:
                $ref: '#/components/schemas/Filter'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/Step'
        connections:
          type: array
          items:
            $ref: '#/components/schemas/Connection'
        statistics:
          $ref: '#/components/schemas/AutomationStatistics'
    AutomationCompact:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
        category:
          $ref: '#/components/schemas/AutomationCategory'
        author:
          type: string
        startDate:
          type: string
          format: date-time
        timezone:
          type: string
        status:
          $ref: '#/components/schemas/AutomationStatus'
        created:
          type: string
          format: date-time
        createdBy:
          type: string
        description:
          type: string
        endDate:
          type: string
          format: date-time
        uniqueToken:
          type: boolean
          description: Set this to discard duplicated token
          default: false
        removeActionPrimary:
          type: boolean
          description: It is valid only for real time source when INSERT CUSTOMER
            ACTION and REMOVE CUSTOMER ACTION have same conditions. It specifies if
            REMOVE CUSTOMER ACTION has priority.
          default: false
        sourceDescription:
          type: string
          description: Description of source
        statistics:
          $ref: '#/components/schemas/AutomationStatistics'
    AutomationPatch:
      type: object
      properties:
        name:
          type: string
        status:
          $ref: '#/components/schemas/AutomationStatus'
    AutomationStatus:
      type: string
      enum:
        - COMMITTED
        - PAUSED
        - RUNNING
        - ARCHIVED
        - DRAFT
        - ERROR
        - TO_ARCHIVE
        - TO_DELETE
    AutomationCategory:
      type: string
      enum:
        - Custom
    TriggerEventType:
      type: string
      enum:
        - abandonedCart
        - abandonedSession
        - addedCompare
        - addedProduct
        - addedWishlist
        - campaignBlacklisted
        - campaignBounced
        - campaignLinkClicked
        - campaignMarkedSpam
        - campaignOpened
        - campaignOptinRequested
        - campaignSent
        - campaignSubscribed
        - campaignUnsubscribed
        - changedSetting
        - clickedLink
        - closedTicket
        - completedOrder
        - eventConfirmed
        - eventDeclined
        - eventEligible
        - eventInvited
        - eventNoShow
        - eventNotInvited
        - eventParticipated
        - eventRegistered
        - formCompiled
        - genericActiveEvent
        - genericPassiveEvent
        - loggedIn
        - loggedOut
        - openedTicket
        - orderShipped
        - removedCompare
        - removedProduct
        - removedWishlist
        - repliedTicket
        - reviewedProduct
        - searched
        - serviceSubscribed
        - serviceUnsubscribed
        - viewedPage
        - viewedProduct
        - viewedProductCategory
    TriggerEventTypeContext:
      type: string
      enum:
        - RETAIL
        - WEB
        - OTHER
        - DIGITAL_CAMPAIGN
        - MOBILE
        - CONTACT_CENTER
        - SOCIAL
        - IOT
        - ECOMMERCE
      description: it is valid only for INSERT_CUSTOMER actions where
        at least one placeholder with scope CONTEXT has been defined
    TriggerAction:
      type: string
      enum:
        - INSERT_CUSTOMER
        - REMOVE_CUSTOMER
    EventMapping:
      type: array
      items:
        $ref: '#/components/schemas/Mapping'
    Mapping:
      type: object
      properties:
        placeholder:
          type: string
        scope:
          type: string
          enum:
            - EVENT
            - CONTEXT
            - CUSTOMER
        path:
          type: string
        type:
          type: string
    Step:
      type: object
      properties:
        uuid:
          type: string
        description:
          type: string
        ref:
          type: string
        type:
          $ref: '#/components/schemas/StepType'
        operation:
          $ref: '#/components/schemas/StepOperation'
        properties:
          type: object
          oneOf:
            - $ref: '#/components/schemas/ClabCampaignProperties'
            - $ref: '#/components/schemas/ClabCampaignSmsProperties'
            - $ref: '#/components/schemas/TagProperties'
            - $ref: '#/components/schemas/WebhookProperties'
            - $ref: '#/components/schemas/DelayProperties'
            - $ref: '#/components/schemas/CheckProperties'
        sources:
          type: array
          items:
            $ref: '#/components/schemas/Source'
        statistics:
          $ref: '#/components/schemas/Statistics'
    Connection:
      required:
        - isDefault
        - sourceStepRef
        - targetStepRef
        - type
      type: object
      properties:
        uuid:
          type: string
        order:
          type: integer
        ref:
          type: string
          description: Ref of connection
        name:
          type: string
        type:
          type: string
          description: the connection type
          enum:
            - STEP
            - WAIT
            - SPLIT
        sourceStepRef:
          type: string
          description: It is the ref of source step
        targetStepRef:
          type: string
          description: It is the ref of target step
        isDefault:
          type: boolean
          description: Set it to define a default connection. For a pair of steps
            there must be a connection with default true
        filter:
          $ref: '#/components/schemas/Filter'
        percent:
          type: integer
          description: the percentage of the ab branch, the sum of the branch must be 100%, only if source step is type SPLIT
    Filter:
      type: object
      properties:
        operator:
          type: string
        scope:
          type: string
          enum:
            - EVENT
            - CONTEXT
            - CUSTOMER
            - PLACEHOLDER
        path:
          type: string
        value:
          type: object
          oneOf:
            - $ref: '#/components/schemas/FilterValueString'
            - $ref: '#/components/schemas/FilterRelativeDate'
            - $ref: '#/components/schemas/FilterPlaceholder'
          description: 'It can be an object { period: string, amount: integer } to
            specify a relative date or date-time. Period can be DAYS, WEEKS or MONTHS'
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
    FilterValueString:
      type: string
    FilterPlaceholder:
      type: object
      properties:
        placeholder:
          type: string
    FilterRelativeDate:
      type: object
      properties:
        period:
          type: string
          enum:
            - DAYS
            - WEEK
            - MONTHS
        amount:
          type: integer
    StepType:
      type: string
      enum:
        - ACTION
        - DELAY
        - CHECK
        - SPLIT
        - END
    StepOperation:
      type: string
      enum:
        - CLAB_CAMPAIGN_SMS
        - CLAB_CAMPAIGN
        - WEBHOOK
        - TAG
        - FROM_LAST_STEP
        - WAIT_AND_CHECK
        - WAIT_FOR_TRIGGER
        - AB_TEST
        - NO_ACTION
    StepAction:
      type: string
      enum:
        - CLAB_CAMPAIGN_SMS
        - CLAB_CAMPAIGN
        - WEBHOOK
        - TAG
    StepActionList:
      type: array
      items:
        $ref: '#/components/schemas/StepAction'
    ClabCampaignProperties:
      type: object
      properties:
        name:
          type: string
        modelIdentifier:
          type: string
        subscriptionsInfo:
          type: object
          properties:
            subscriptionsOperator:
              type: string
              enum:
                - AND
                - OR
            subscriptions:
              type: array
              items:
                $ref: '#/components/schemas/Subscription'
        subject:
          type: string
        alias:
          type: string
        senderName:
          type: string
        senderEmail:
          type: string
        senderReplyTo:
          type: string
        htmlContent:
          type: string
        textContent:
          type: string
    ClabCampaignSmsProperties:
      type: object
      properties:
        name:
          type: string
        modelIdentifier:
          type: string
        subject:
          type: string
    TagProperties:
      type: object
      properties:
        operator:
          $ref: '#/components/schemas/TagOperator'
        path:
          type: string
        value:
          type: string
    TagOperator:
      type: string
      enum:
        - SET_CONSTANT
        - ADD_CONSTANT
        - SUB_CONSTANT
        - SET_EVENT_PROPERTY
        - ADD_EVENT_PROPERTY
        - SUB_EVENT_PROPERTY
        - SET_PLACEHOLDER
        - ADD_PLACEHOLDER
        - SUB_PLACEHOLDER
    WebhookProperties:
      type: object
      properties:
        url:
          type: string
        body:
          type: array
          items:
            $ref: '#/components/schemas/JsonKeyValueObject'
        headers:
          type: array
          items:
            $ref: '#/components/schemas/JsonKeyValueObject'
    JsonKeyValueObject:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
    DelayProperties:
      type: object
      properties:
        duration:
          type: integer
        unit:
          $ref: '#/components/schemas/DelayTimeUnit'
    DelayTimeUnit:
      type: string
      enum:
        - SECONDS
        - MINUTES
        - HOURS
        - DAYS
        - WEEKS
        - MONTHS
    CheckProperties:
      type: object
      properties:
        event:
          $ref: '#/components/schemas/TriggerEventType'
        maxWait:
          $ref: '#/components/schemas/DelayTimeUnit'
        url:
          type: string
    Source:
      type: object
      properties:
        uuid:
          type: string
        label:
          type: string
        statistics:
          $ref: '#/components/schemas/Statistics'
    Statistics:
      type: object
      properties:
        completedCustomers:
          type: integer
        errorCustomers:
          type: integer
        excludedCustomers:
          type: integer
        removedCustomers:
          type: integer
        runningCustomers:
          type: integer
        totalCustomers:
          type: integer
        lastTokenEntered:
          type: string
          format: date-time
          description: The last token entered in automation or step
    AutomationStatistics:
      allOf:
        - $ref: '#/components/schemas/Statistics'
        - type: object
          properties:
            queuedCustomers:
              type: integer
    AutomationFeedbacks:
      type: object
      properties:
        automationUuid:
          type: string
        steps:
          type: array
          items:
            $ref: '#/components/schemas/StepFeedbacks'
    StepFeedbacks:
      type: object
      properties:
        uuid:
          type: string
        type:
          $ref: '#/components/schemas/StepType'
        operation:
          $ref: '#/components/schemas/StepOperation'
        description:
          type: string
        feedbacks:
          $ref: '#/components/schemas/StepFeedbacksDetail'
    StepFeedbacksDetail:
      type: object
      properties:
        bounce:
          type: integer
        delivered:
          type: integer
        deliveryId:
          type: integer
        deliveryName:
          type: string
        filterId:
          type: integer
        removeDuplicates:
          type: boolean
        sent:
          type: integer
        subject:
          type: string
        totalClicks:
          type: integer
        totalViews:
          type: integer
        uniqueClicks:
          type: integer
        uniqueViews:
          type: integer
    Customer:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        userPk:
          type: string
        clabUuid:
          type: string
          format: uuid
        attributes:
          type: object
          properties:
            recipient:
              type: string
              format: email
            recipientPhone:
              type: string
        automationUuid:
          type: string
          format: uuid
        automationName:
          type: string
    CustomerExtended:
      allOf:
        - $ref: '#/components/schemas/Customer'
        - type: object
          properties:
            automationUuid:
              type: string
              format: uuid
            automationName:
              type: string
    CustomerToken:
      allOf:
        - $ref: '#/components/schemas/Customer'
        - type: object
          properties:
            stepUuid:
              type: string
              format: uuid
            stepOperation:
              $ref: '#/components/schemas/StepOperation'
            stepType:
              $ref: '#/components/schemas/StepType'
            stepDescription:
              type: string
            enterStepDate:
              type: string
              format: date-time
            enterAutomationDate:
              type: string
              format: date-time
            status:
              $ref: '#/components/schemas/TokenStatus'
            automationStatus:
              $ref: '#/components/schemas/AutomationStatus'
            errorDate:
              type: string
              format: date-time
            errorMessage:
              type: string
    TokenStatus:
      type: string
      enum:
        - READY
        - LOCKED
        - ERROR
        - END
        - DELETED
        - EXCLUDED
        - DUPLICATED
        - ARCHIVED
    CustomerOfBatch:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        userPk:
          type: string
        clabUuid:
          type: string
        attributes:
          type: object
          additionalProperties:
            type: object
            properties:
              recipient:
                type: string
              recipientPhone:
                type: string
          example:
            recipient: "flow@test.it"
            recipientPhone: "+393666659505"
        automationUuid:
          type: string
        automationName:
          type: string
    CustomersBatch:
      allOf:
        - type: object
          properties:
            customers:
              type: array
              items:
                $ref: '#/components/schemas/CustomerOfBatch'
            notification:
              $ref: '#/components/schemas/BatchNotification'
            packet:
              type: string
              enum:
                - FIRST
                - MIDDLE
                - LAST
        - $ref: '#/components/schemas/CustomersBatchStatus'
    CustomersBatchStatus:
      type: object
      properties:
        sourceLabel:
          type: string
        sourceUuid:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - OPEN
            - CLOSED
            - ENABLED
            - ENABLED_OK_NOTIFYING
            - ENABLED_ERROR_NOTIFYING
            - ENABLED_OK_NOTIFIED
            - ENABLED_OK_NOT_NOTIFIED
            - ENABLED_ERROR_NOTIFIED
            - ENABLED_ERROR_NOT_NOTIFIED
    BatchNotification:
      type: object
      properties:
        customKey:
          type: string
        webhook:
          type: string
    EmailMessageModel:
      type: object
      properties:
        identifier:
          type: integer
        name:
          type: string
        description:
          type: string
        senderEmail:
          type: string
        senderName:
          type: string
        senderReplyTo:
          type: string
        subject:
          type: string
        htmlContent:
          type: string
        textContent:
          type: string
        charset:
          type: string
    PagebuilderTemplate:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
    SmsMessageModel:
      type: object
      properties:
        identifier:
          type: integer
        name:
          type: string
        description:
          type: string
        senderPhone:
          type: string
        content:
          type: string
        charset:
          type: string
    EmailDesignerConfogurations:
      type: object
      properties:
        enabled:
          type: boolean
    PagebuilderTemplatePage:
      type: object
      properties:
        id:
          type: integer
        templateId:
          type: integer
        name:
          type: string
    KpiList:
      type: object
      properties:
        kpis:
          type: array
          items:
            type: string
            enum:
              - NODES
              - NODES_USAGE
    NodeAutomationsStatusAggregate:
      allOf:
        - $ref: '#/components/schemas/Node'
        - type: object
          properties:
            automations:
              type: object
              properties:
                archived:
                  type: integer
                committed:
                  type: integer
                draft:
                  type: integer
                error:
                  type: integer
                paused:
                  type: integer
                running:
                  type: integer
                total:
                  type: integer
    NodeAutomationsKpiAggregate:
      allOf:
        - $ref: '#/components/schemas/Node'
        - type: object
          properties:
            automations:
              type: object
              properties:
                created:
                  type: integer
    Attributes:
      type: object
      properties:
        placeholder:
          type: string
        value:
          type: string
          description: it can be a normal string or a string representing an object
            or an array
    TestCampaign:
      type: object
      properties:
        modelIdentifier:
          type: integer
        senderName:
          type: string
        senderEmail:
          type: string
        senderReplyTo:
          type: string
        subject:
          type: string
        htmlContent:
          type: string
        textContent:
          type: string
        customRef:
          type: string
        email:
          type: string
        attributes:
          type: array
          items:
            $ref: '#/components/schemas/Attributes'
    Page:
      type: object
      properties:
        size:
          type: integer
        totalElements:
          type: integer
        totalUnfilteredElements:
          type: integer
        totalPages:
          type: integer
        number:
          type: integer
    PageableNodeList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Node'
    PageableAutomationList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Automation'
    PageableAutomationListCompact:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/AutomationCompact'
    PageableCustomerList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/Customer'
    PageableTokenMonitorList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/CustomerToken'
    PageableCustomerExtendedList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/CustomerExtended'
    PageablePagebuilderTemplateList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PagebuilderTemplate'
    PageablePagebuilderTemplatePageList:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/PagebuilderTemplatePage'
    PageableNodeAutomationsStatusAggregate:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/NodeAutomationsStatusAggregate'
    PageableNodeAutomationsKpiAggregate:
      type: object
      properties:
        page:
          $ref: '#/components/schemas/Page'
        elements:
          type: array
          items:
            $ref: '#/components/schemas/NodeAutomationsKpiAggregate'
    Error:
      type: object
      properties:
        message:
          type: string
        logref:
          type: string
        errors:
          type: array
          items:
            $ref: '#/components/schemas/NestedError'
    NestedError:
      type: object
      properties:
        message:
          type: string
        code:
          type: string
        path:
          type: string
    SubscriptionsList:
      type: object
      properties:
        subscriptions:
          type: array
          items:
            $ref: '#/components/schemas/Subscription'
    Subscription:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
  parameters:
    AuthorizationHeader:
      name: Authorization
      in: header
      description: A valid OAuth2 token
      required: true
      schema:
        type: string
    NodeHeader:
      name: Node
      in: header
      description: The UUID of the node to operate on
      required: true
      schema:
        type: string
        format: uuid
    NodeUuidPathVariable:
      name: nodeUuid
      in: path
      description: The UUID of the node
      required: true
      schema:
        type: string
        format: uuid
    AutomationUuidPathVariable:
      name: automationUuid
      in: path
      description: The UUID of the automation
      required: true
      schema:
        type: string
        format: uuid
    StepUuidPathVariable:
      name: stepUuid
      in: path
      description: The UUID of the step
      required: true
      schema:
        type: string
        format: uuid
    AutomationUuidQueryParam:
      name: automationUuid
      in: query
      description: The UUID of the automation
      schema:
        type: string
        format: uuid
    CustomerUuidPathVariable:
      name: customerUuid
      in: path
      description: The UUID of the customer
      required: true
      schema:
        type: string
        format: uuid
    SettingUuidPathVariable:
      name: settingUuid
      in: path
      description: The UUID of the setting
      required: true
      schema:
        type: string
        format: uuid
    SourceUuidQueryParam:
      name: sourceUuid
      in: query
      description: The UUID of the source
      schema:
        type: string
    RequiredSourceUuidQueryParam:
      name: sourceUuid
      in: query
      description: The UUID of the source
      required: true
      schema:
        type: string
    StepUuidQueryParam:
      name: stepUuid
      in: query
      description: The UUID of the step
      schema:
        type: string
        format: uuid
    ClabUuidQueryParam:
      name: clabUuid
      in: query
      description: UUID of the customer
      schema:
        type: string
    RecipientQueryParam:
      name: recipient
      in: query
      description: email recipient
      schema:
        type: string
    AggregatedStatusQueryParam:
      name: aggregatedStatus
      in: query
      description: Aggregated token status
      schema:
        type: string
        enum:
          - RUNNING
          - COMPLETED
          - ERROR
    Page:
      name: page
      in: query
      description: The requested page
      schema:
        type: integer
        default: 0
    Size:
      name: size
      in: query
      description: The number of elements in the page
      schema:
        type: integer
        default: 20
    TokenUuidPathVariable:
      name: tokenUuid
      in: path
      description: The UUID of the token
      required: true
      schema:
        type: string
        format: uuid
    Style:
      name: style
      in: query
      description: If equals compact, show less element in response
      schema:
        type: string
    TokensMonitorSort:
      name: sort
      in: query
      description: The field to sort by
      schema:
        type: string
        enum:
          - automationUuid
          - clabUuid
          - recipient
          - stepUuid
          - status
    RemoveExpiredCustomersQueryParamNotRequired:
      name: removeExpiredCustomers
      in: query
      description: |
        Specifies whether all the expired customers must be removed before updating the automation.
        This flag has effect if and only if the automation must change its status from PAUSED to RUNNING.
      required: false
      schema:
        type: boolean
        default: false
  securitySchemes:
    OAuth2:
      type: oauth2
      description: |
        The following table provides brief descriptions of the built-in OAuth2 scopes of this API.
        In this context, scopes are generally intended as application roles.
      flows:
        implicit:
          authorizationUrl: https://login.contactlab.it/o/oauth2/auth
          scopes:
            CONFIGURATOR: Customer Care Representative
            PLATFORM_INTEGRATION: Contactlab Application
            CLAB_OPERATOR: Contactlab Admin
            ADMIN: Admin
            USER: User
            GUEST: Guest