openapi: 3.0.3
info:
  title: Dixa API
  version: beta
servers:
  - url: https://dev.dixa.io
paths:
  /beta/analytics/metrics:
    get:
      tags:
        - Analytics
      summary: Metrics Catalogue
      description: >-
        This endpoint lists all available metric IDs that can be used to fetch
        data in Get Metric Data
      operationId: getAnalyticsMetrics
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The catalogue of metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricsOutput'
              example:
                data:
                  - id: csat
                    description: >-
                      (Number of satisfied customers (4 and 5)/ Number of survey
                      responses) x 100 = % of satisfied customers
                    filters:
                      - filterAttribute: agent_id
                        description: Used to filter by the agent_id
                      - filterAttribute: queue_id
                        description: Used to filter by the queue_id
                      - filterAttribute: channel
                        description: Used to filter by the channel
                      - filterAttribute: initial_direction
                        description: Used to filter by the initial_direction
                      - filterAttribute: tag_id
                        description: Used to filter by the tag_id
                      - filterAttribute: contact_point
                        description: Used to filter by the contact_point
                    aggregations:
                      - measure: Percentage
                        description: Calculated Percentage
                    relatedRecordIds:
                      - ratings
                  - id: closed_conversations
                    description: Closed conversation data
                    filters:
                      - filterAttribute: queue_id
                        description: Used to filter by the queue_id
                      - filterAttribute: channel
                        description: Used to filter by the channel
                      - filterAttribute: initial_direction
                        description: Used to filter by the initial_direction
                      - filterAttribute: tag_id
                        description: Used to filter by the tag_id
                      - filterAttribute: contact_point
                        description: Used to filter by the contact_point
                    aggregations:
                      - measure: Count
                        description: Conversation closed count
                    relatedRecordIds:
                      - closed_conversations
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Analytics
      summary: Get Metric Data
      description: Get data of a specific metric (aggregated)
      operationId: postAnalyticsMetrics
      requestBody:
        description: >-
          The available request filters and aggregations for fetching the metric
          data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetMetricDataInput'
            examples:
              Example0:
                value:
                  id: closed_conversations
                  periodFilter:
                    value:
                      _type: PreviousWeek
                    _type: Preset
                  filters:
                    - attribute: channel
                      values:
                        - email
                  aggregations:
                    - Count
                  timezone: Europe/Copenhagen
              Example1:
                value:
                  id: closed_conversations
                  csidFilter:
                    - 42
                    - 43
                    - 44
                  filters:
                    - attribute: channel
                      values:
                        - email
                  aggregations:
                    - Count
                  timezone: Europe/Copenhagen
        required: true
      responses:
        '200':
          description: The metric data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricDataOutput'
              example:
                data:
                  id: closed_conversations
                  aggregates:
                    - value: 42
                      measure: Count
                      _type: LongAggregateValue
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/analytics/metrics/{metricId}:
    get:
      tags:
        - Analytics
      summary: Metric Description
      description: >-
        This endpoint lists all available properties of a metric to use for
        querying its data
      operationId: getAnalyticsMetricsMetricid
      parameters:
        - name: metricId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The metric properties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricOutput'
              example:
                data:
                  id: csat
                  description: >-
                    (Number of satisfied customers (4 and 5)/ Number of survey
                    responses) x 100 = % of satisfied customers
                  filters:
                    - filterAttribute: agent_id
                      description: Used to filter by the agent_id
                    - filterAttribute: queue_id
                      description: Used to filter by the queue_id
                    - filterAttribute: channel
                      description: Used to filter by the channel
                    - filterAttribute: initial_direction
                      description: Used to filter by the initial_direction
                    - filterAttribute: tag_id
                      description: Used to filter by the tag_id
                    - filterAttribute: contact_point
                      description: Used to filter by the contact_point
                  aggregations:
                    - measure: Percentage
                      description: Calculated Percentage
                  relatedRecordIds:
                    - ratings
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/analytics/filter/{filterAttribute}:
    get:
      tags:
        - Analytics
      summary: Filter values
      description: >-
        Get possible values to be used with a given filter attribute. Filter
        attributes are not metric or record specific, so one filter attribute
        can be used with multiple metrics/records. When a filter value is not
        relevant for a specific metric/record, it is simply ignored.
      operationId: getAnalyticsFilterFilterattribute
      parameters:
        - name: filterAttribute
          in: path
          required: true
          schema:
            type: string
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: >-
            The possible filter values to be used when fetching metrics or
            records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetFilterValuesOutput'
              example:
                data:
                  - value: CALLBACK
                    label: Callback
                  - value: CONTACT_FORM
                    label: Contact Form
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/analytics/records:
    get:
      tags:
        - Analytics
      summary: Metric Records Catalogue
      description: >-
        This endpoint lists all available record IDs that can be used to fetch
        data in Get Metric Records Data
      operationId: getAnalyticsRecords
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The catalogue of metric records
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricRecordsOutput'
              example:
                data:
                  - id: ratings
                    description: Conversation Ratings
                    filters:
                      - filterAttribute: agent_id
                        description: Used to filter by the agent_id
                      - filterAttribute: queue_id
                        description: Used to filter by the queue_id
                      - filterAttribute: channel
                        description: Used to filter by the channel
                      - filterAttribute: initial_direction
                        description: Used to filter by the initial_direction
                      - filterAttribute: tag_id
                        description: Used to filter by the tag_id
                      - filterAttribute: contact_point
                        description: Used to filter by the contact_point
                    relatedMetricIds:
                      - csat
                    fieldsMetadata:
                      - field: conversation_id
                        description: Conversation ID
                        nullable: false
                      - field: agent_id
                        description: The agent assigned to the conversation
                        nullable: true
                      - field: queue_id
                        description: >-
                          The queue which the conversation was part of when the
                          conversation was offered
                        nullable: true
                  - id: closed_conversations
                    description: Closed conversation data
                    filters:
                      - filterAttribute: queue_id
                        description: Used to filter by the queue_id
                      - filterAttribute: channel
                        description: Used to filter by the channel
                      - filterAttribute: initial_direction
                        description: Used to filter by the initial_direction
                      - filterAttribute: tag_id
                        description: Used to filter by the tag_id
                      - filterAttribute: contact_point
                        description: Used to filter by the contact_point
                    relatedMetricIds:
                      - closed_conversations
                    fieldsMetadata:
                      - field: closed_at
                        description: Timestamp of when the conversation was closed
                        nullable: false
                      - field: conversation_id
                        description: Conversation ID
                        nullable: false
                      - field: agent_id
                        description: The agent closing the conversation
                        nullable: true
                      - field: queue_id
                        description: >-
                          The queue which the conversation was part of when the
                          conversation was closed
                        nullable: true
                      - field: closed_by
                        description: >-
                          User closing the conversation (Agent, Enduser or
                          Unknown)
                        nullable: false
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Analytics
      summary: Get Metric Records Data
      description: Get data of specific metric records (unaggregated)
      operationId: postAnalyticsRecords
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      requestBody:
        description: The available request filters for fetching the metric records data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetMetricRecordsDataInput'
            examples:
              Example0:
                value:
                  id: closed_conversations
                  periodFilter:
                    value:
                      _type: PreviousWeek
                    _type: Preset
                  filters:
                    - attribute: initial_direction
                      values:
                        - INBOUND
                  timezone: Europe/Copenhagen
              Example1:
                value:
                  id: closed_conversations
                  csidFilter:
                    - 42
                    - 43
                    - 44
                  filters:
                    - attribute: initial_direction
                      values:
                        - INBOUND
                  timezone: Europe/Copenhagen
        required: true
      responses:
        '200':
          description: The metric records data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricRecordsDataOutput'
              examples:
                No Value Metric Records Data Example:
                  value:
                    data:
                      - primaryTimestampField:
                          name: created_at
                          timestamp: '2023-04-21T10:23:14.293Z'
                        fields:
                          - name: csid
                            field:
                              value: 184472
                              _type: LongField
                          - name: initial_direction
                            field:
                              value: INBOUND
                              label: Inbound
                              _type: StringField
                          - name: initial_channel
                            field:
                              value: PSTN_PHONE
                              label: Phone
                              _type: StringField
                          - name: contact_point
                            field:
                              value: '+4511223344'
                              label: '+4511223344'
                              _type: StringField
                      - primaryTimestampField:
                          name: created_at
                          timestamp: '2023-04-21T10:24:04.259Z'
                        fields:
                          - name: csid
                            field:
                              value: 184473
                              _type: LongField
                          - name: initial_direction
                            field:
                              value: INBOUND
                              label: Inbound
                              _type: StringField
                          - name: initial_channel
                            field:
                              value: EMAIL
                              label: Email
                              _type: StringField
                          - name: contact_point
                            field:
                              value: dixa@email.com
                              label: dixa@email.com
                              _type: StringField
                Metric Records Data Example:
                  value:
                    data:
                      - primaryTimestampField:
                          name: created_at
                          timestamp: '2023-04-21T10:23:01.293Z'
                        value:
                          value: 4
                          _type: LongField
                        fields:
                          - name: csid
                            field:
                              value: 184474
                              _type: LongField
                          - name: current_channel
                            field:
                              value: EMAIL
                              label: Email
                              _type: StringField
                          - name: queue
                            field:
                              value: 220ffe6a-3040-4ece-ae3a-c4c6d63ff3cc
                              label: Example queue
                              _type: UUIDField
                      - primaryTimestampField:
                          name: created_at
                          timestamp: '2023-04-21T10:23:04.930Z'
                        value:
                          value: 5
                          _type: LongField
                        fields:
                          - name: csid
                            field:
                              value: 184475
                              _type: LongField
                          - name: current_channel
                            field:
                              value: CONTACT_FORM
                              label: Contact form
                              _type: StringField
                          - name: queue
                            field:
                              value: 57582f31-4fce-4435-b489-e1c7f190a92f
                              label: Example queue 2
                              _type: UUIDField
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/analytics/records/{recordId}:
    get:
      tags:
        - Analytics
      summary: Metric Record Description
      description: >-
        This endpoint lists all available properties of a record to use for
        querying its data
      operationId: getAnalyticsRecordsRecordid
      parameters:
        - name: recordId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The metric record properties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetMetricRecordOutput'
              example:
                data:
                  id: ratings
                  description: Conversation Ratings
                  filters:
                    - filterAttribute: agent_id
                      description: Used to filter by the agent_id
                    - filterAttribute: queue_id
                      description: Used to filter by the queue_id
                    - filterAttribute: channel
                      description: Used to filter by the channel
                    - filterAttribute: initial_direction
                      description: Used to filter by the initial_direction
                    - filterAttribute: tag_id
                      description: Used to filter by the tag_id
                    - filterAttribute: contact_point
                      description: Used to filter by the contact_point
                  relatedMetricIds:
                    - csat
                  fieldsMetadata:
                    - field: conversation_id
                      description: Conversation ID
                      nullable: false
                    - field: agent_id
                      description: The agent assigned to the conversation
                      nullable: true
                    - field: queue_id
                      description: >-
                        The queue which the conversation was part of when the
                        conversation was offered
                      nullable: true
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/presence:
    get:
      tags:
        - Agents
      summary: List presence
      description: List the presence status for all agents/admins in an organization.
      operationId: getAgentsPresence
      responses:
        '200':
          description: The list of presence status for all agents/admins
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UserPresence'
              example:
                - userId: d31a73fc-d67b-49ec-9534-1f36a0c4c906
                  requestTime: '2021-12-01T12:46:35.935'
                  lastSeen: '2021-12-01T12:46:35.935'
                  presenceStatus: Working
                  connectionStatus: Online
                  activeChannels:
                    - Email
                    - FacebookMessenger
                - userId: 8026cb51-184b-424f-8686-c6bc7bcf88eb
                  requestTime: '2021-12-01T12:46:35.935'
                  lastSeen: '2021-12-01T12:46:35.935'
                  presenceStatus: Working
                  connectionStatus: Online
                  activeChannels:
                    - Email
                    - FacebookMessenger
                    - PstnPhone
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents:
    get:
      tags:
        - Agents
      summary: List agents
      description: >-
        Lists all agents/admins in an organization. It is possible to filter by
        one of the mutually exclusive parameters: email or phone number. In case
        both are provided, an error is returned.
      operationId: getAgents
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
        - name: email
          in: query
          description: The agent/admin email filter
          required: false
          schema:
            type: string
        - name: phone
          in: query
          description: The agent/admin phone number filter
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The list of agents/admins
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListAgentsOutput'
              example:
                data:
                  - id: 93b885ad-fe0d-3089-8df6-34904fd59f71
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Agent 0
                    email: agent.0@example.org
                    avatarUrl: https://files.dixa.io/public/image_0_id
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    roles:
                      - Agent
                  - id: 55a54008-ad1b-3589-aa21-0d2629c1df41
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Agent 1
                    email: agent.1@example.org
                    avatarUrl: https://files.dixa.io/public/image_1_id
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    roles:
                      - Agent
                  - id: 9e688c58-a548-3b8e-af69-c9e1005ad0bf
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Agent 2
                    email: agent.2@example.org
                    avatarUrl: https://files.dixa.io/public/image_2_id
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    roles:
                      - Agent
                  - id: 86666835-06aa-3d90-8bbd-5a74ac4edf68
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Agent 3
                    email: agent.3@example.org
                    avatarUrl: https://files.dixa.io/public/image_3_id
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    roles:
                      - Agent
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: query parameter email, Invalid value
            for: query parameter phone, Duplicate phone number, Duplicate email
            address, Invalid filters: Cannot provide both phone number and email
            address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    put:
      tags:
        - Agents
      summary: Update agents
      description: Bulk update agents/admins.
      operationId: putAgents
      requestBody:
        description: The list of agent/admin update actions
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkUpdateAgentInput'
            example:
              - id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                displayName: Alice Brown
                phoneNumber: '+551155256325'
                additionalEmails: []
                additionalPhoneNumbers: []
                firstName: Alice
                lastName: Brown
                middleNames: []
                avatarUrl: http://avatar.url
        required: false
      responses:
        '200':
          description: The list of update action outcomes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateAgentOutput'
              example:
                data:
                  - data:
                      id: 4d2ab456-8510-4a35-b266-e502160d5177
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Alice Brown
                      email: alice@brown.com
                      avatarUrl: https://files.dixa.io/public/image_id
                      phoneNumber: '+551155256325'
                      additionalEmails:
                        - alice@secondary.email
                      additionalPhoneNumbers:
                        - '+5566778899'
                      firstName: Alice
                      lastName: Brown
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Agents
      summary: Create agent
      description: Create an agent.
      operationId: postAgents
      requestBody:
        description: The agent's details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentInput'
            example:
              displayName: Alice Brown
              email: alice@brown.com
              phoneNumber: '+551155256325'
              additionalEmails:
                - alice@secondary.email
              additionalPhoneNumbers:
                - '+5566778899'
              firstName: Alice
              lastName: Brown
              middleNames: []
              avatarUrl: http://avatar.url
        required: true
      responses:
        '201':
          description: The created agent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOutput'
              example:
                data:
                  id: 4d2ab456-8510-4a35-b266-e502160d5177
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  avatarUrl: https://files.dixa.io/public/image_id
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  roles:
                    - Agent
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, Validation failure during agent creation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - Agents
      summary: Patch agents
      description: Bulk patch agents/admins.
      operationId: patchAgents
      requestBody:
        description: List of agent/admin patch actions
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/BulkPatchAgentInput'
            example:
              - id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                displayName: AB
                additionalEmails: []
                additionalPhoneNumbers: []
                middleNames: []
              - id: 434ce9f5-14c8-4be1-a0a8-f755010deb9c
                displayName: JB
                additionalEmails: []
                additionalPhoneNumbers: []
                middleNames: []
        required: false
      responses:
        '200':
          description: The list of patch action outcomes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateAgentOutput'
              example:
                data:
                  - data:
                      id: 4d2ab456-8510-4a35-b266-e502160d5177
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: AB
                      email: jb@example.org
                      avatarUrl: https://files.dixa.io/public/image_id
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
                  - error:
                      id: 434ce9f5-14c8-4be1-a0a8-f755010deb9c
                      message: Agent not found
                      _type: NotFound
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/{agentId}/teams:
    get:
      tags:
        - Agents
      summary: List teams
      description: List the teams in which the agent/admin is a member.
      operationId: getAgentsAgentidTeams
      parameters:
        - name: agentId
          in: path
          description: The agent/admin id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The list of teams in which the agent/admin is a member
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentTeamsOutput'
              example:
                data:
                  - id: e8ecd53b-2f6c-4471-a3a0-34d94caff8c8
                  - id: 4d2ab456-8510-4a35-b266-e502160d5177
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/{agentId}/presence:
    get:
      tags:
        - Agents
      summary: Get presence
      description: Get the presence status for an agent/admin.
      operationId: getAgentsAgentidPresence
      parameters:
        - name: agentId
          in: path
          description: The agent/admin id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The agent/admin presence status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPresenceOutput'
              example:
                data:
                  userId: ec7f7e7b-b437-32ce-8681-45f71d37b53c
                  requestTime: '2021-12-01T12:46:35.935'
                  lastSeen: '2021-12-01T12:46:35.935'
                  presenceStatus: Working
                  connectionStatus: Online
                  activeChannels:
                    - Email
                    - FacebookMessenger
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/bulk:
    post:
      tags:
        - Agents
      summary: Create agents
      description: Create agents in bulk.
      operationId: postAgentsBulk
      requestBody:
        description: The list of agent's details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAgentsInput'
            example:
              data:
                - displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails: []
                  additionalPhoneNumbers: []
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: http://avatar.url
        required: true
      responses:
        '201':
          description: The created agents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAgentsOutput'
              example:
                data:
                  - data:
                      id: 93b885ad-fe0d-3089-8df6-34904fd59f71
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Agent 0
                      email: agent.0@example.org
                      avatarUrl: https://files.dixa.io/public/image_0_id
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
                  - data:
                      id: 55a54008-ad1b-3589-aa21-0d2629c1df41
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Agent 1
                      email: agent.1@example.org
                      avatarUrl: https://files.dixa.io/public/image_1_id
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
                  - data:
                      id: 9e688c58-a548-3b8e-af69-c9e1005ad0bf
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Agent 2
                      email: agent.2@example.org
                      avatarUrl: https://files.dixa.io/public/image_2_id
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
                  - data:
                      id: 86666835-06aa-3d90-8bbd-5a74ac4edf68
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Agent 3
                      email: agent.3@example.org
                      avatarUrl: https://files.dixa.io/public/image_3_id
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      roles:
                        - Agent
                    _type: BulkActionSuccess
                  - error:
                      id: e8ecd53b-2f6c-4471-a3a0-34d94caff8c8
                      message: >-
                        Create Agent [userId=...] in [orgId=...] failed with
                        [errors=...]
                      _type: Validation
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/{agentId}:
    get:
      tags:
        - Agents
      summary: Get agent
      description: Get an agent/admin by id.
      operationId: getAgentsAgentid
      parameters:
        - name: agentId
          in: path
          description: The agent/admin id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOutput'
              example:
                data:
                  id: 4d2ab456-8510-4a35-b266-e502160d5177
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  avatarUrl: https://files.dixa.io/public/image_id
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  roles:
                    - Agent
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    put:
      tags:
        - Agents
      summary: Update agent
      description: Update an agent/admin.
      operationId: putAgentsAgentid
      parameters:
        - name: agentId
          in: path
          description: The agent id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The updated details for an agent/admin
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentInput'
            example:
              displayName: Alice Brown
              phoneNumber: '+551155256325'
              additionalEmails: []
              additionalPhoneNumbers: []
              firstName: Alice
              lastName: Brown
              middleNames:
                - Julia
              avatarUrl: http://avatar.url
        required: true
      responses:
        '200':
          description: The updated agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOutput'
              example:
                data:
                  id: 4d2ab456-8510-4a35-b266-e502160d5177
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  avatarUrl: https://files.dixa.io/public/image_id
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames:
                    - Julia
                  roles:
                    - Agent
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context, Invalid value for: body, Validation failure
            during update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Agents
      summary: Delete agent
      description: Downgrade an agent/admin to become an end user.
      operationId: deleteAgentsAgentid
      parameters:
        - name: agentId
          in: path
          description: The agent/admin id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The agent/admin was successfully downgraded to end user
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context, Validation failure during delete processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
    patch:
      tags:
        - Agents
      summary: Patch agent
      description: Patch an agent/admin.
      operationId: patchAgentsAgentid
      parameters:
        - name: agentId
          in: path
          description: The agent/admin id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The agent/admin patch
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchAgentInput'
            example:
              displayName: Alice Brown
              additionalEmails: []
              additionalPhoneNumbers: []
              firstName: Alice
              lastName: Brown
              middleNames: []
              avatarUrl: http://avatar.url
        required: true
      responses:
        '200':
          description: The patched agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentOutput'
              example:
                data:
                  id: 4d2ab456-8510-4a35-b266-e502160d5177
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  avatarUrl: https://files.dixa.io/public/image_id
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  roles:
                    - Agent
        '400':
          description: >-
            Invalid value for: path parameter agentId, Invalid value extracted
            from request context, Invalid value for: body, Validation failure
            during update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/agents/{agentId}/presence/working-channel:
    put:
      tags:
        - Agents
      summary: Updates the working channel of an agent
      description: Updates the working channel of an agent
      operationId: putAgentsAgentidPresenceWorking-channel
      parameters:
        - name: agentId
          in: path
          description: The agent id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The state of the agent presence channel
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentPresenceChannelInput'
            example:
              channel: Speak
              working: false
        required: true
      responses:
        '204':
          description: The working channel of the agent was successfully updated
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/endusers:
    get:
      tags:
        - End Users
      summary: List end users
      description: >-
        Lists all end users in an organization. It is possible to filter by one
        of the mutually exclusive parameters: email or phone number. In case
        both are provided, an error is returned.<br/> Note: Custom attributes
        are not part of the response at this point. If you need to get custom
        attributes for a user use the [GET
        /endusers/{userId}](../End-Users/#tag/End-Users/operation/getEndusersUserid)
        endpoint
      operationId: getEndusers
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
        - name: email
          in: query
          description: Filter by the contact's email
          required: false
          schema:
            type: string
        - name: phone
          in: query
          description: Filter by the contact's phone number
          required: false
          schema:
            type: string
        - name: externalId
          in: query
          description: Filter by the contact's external id
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The list of end users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEndUsersOutput'
              example:
                data:
                  - id: 93b885ad-fe0d-3089-8df6-34904fd59f71
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Enduser 0
                    email: enduser.0@example.org
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    avatarUrl: https://files.dixa.io/public/image_0_id
                    externalId: '#12345678'
                  - id: 55a54008-ad1b-3589-aa21-0d2629c1df41
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Enduser 1
                    email: enduser.1@example.org
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    avatarUrl: https://files.dixa.io/public/image_1_id
                    externalId: '#12345678'
                  - id: 9e688c58-a548-3b8e-af69-c9e1005ad0bf
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Enduser 2
                    email: enduser.2@example.org
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    avatarUrl: https://files.dixa.io/public/image_2_id
                    externalId: '#12345678'
                  - id: 86666835-06aa-3d90-8bbd-5a74ac4edf68
                    createdAt: '2020-12-16T09:41:43Z'
                    displayName: Enduser 3
                    email: enduser.3@example.org
                    additionalEmails: []
                    additionalPhoneNumbers: []
                    middleNames: []
                    avatarUrl: https://files.dixa.io/public/image_3_id
                    externalId: '#12345678'
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: query parameter email, Invalid value
            for: query parameter phone, Invalid value for: query parameter
            externalId, Duplicate phone number, Duplicate email address, Invalid
            filters: Cannot provide more than one filter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    put:
      tags:
        - End Users
      summary: Update end users
      description: Bulk update end users.
      operationId: putEndusers
      requestBody:
        description: List of end user update actions
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateEndUsersInput'
            example:
              data:
                - id: d4826125-559f-496f-ad71-a0340f0cae06
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames:
                    - J.
                  avatarUrl: http://avatar.url
                  externalId: '#12345678'
        required: true
      responses:
        '200':
          description: The updated end users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateEndUsersOutput'
              example:
                data:
                  - data:
                      id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Alice Brown
                      email: alice@brown.com
                      phoneNumber: '+551155256325'
                      additionalEmails:
                        - alice@secondary.email
                      additionalPhoneNumbers:
                        - '+5566778899'
                      firstName: Alice
                      lastName: Brown
                      middleNames:
                        - J.
                      avatarUrl: https://files.dixa.io/public/image_id
                      externalId: '#12345678'
                      customAttributes:
                        - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                          name: My Attribute
                          identifier: my_attribute
                          value: My Attribute Value
                    _type: BulkActionSuccess
                  - error:
                      id: 8fe8f4c3-7bc6-4767-924a-d9afa7ac7009
                      message: >-
                        Updating EndUser
                        [id:8fe8f4c3-7bc6-4767-924a-d9afa7ac7009] failed with
                        [errors:PhoneNumberExists]
                      _type: Validation
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - End Users
        - Chatbots
      summary: Create end user
      description: Create an end user.
      operationId: postEndusers
      requestBody:
        description: The end user's details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEndUserInput'
            example:
              displayName: Alice Brown
              email: alice@brown.com
              phoneNumber: '+551155256325'
              additionalEmails:
                - alice@secondary.email
              additionalPhoneNumbers:
                - '+5566778899'
              firstName: Alice
              lastName: Brown
              middleNames: []
              avatarUrl: http://avatar.url
              externalId: '#12345678'
        required: true
      responses:
        '201':
          description: The created end user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEndUserOutput'
              example:
                data:
                  id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: https://files.dixa.io/public/image_id
                  externalId: '#12345678'
                  customAttributes:
                    - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                      name: My Attribute
                      identifier: my_attribute
                      value: My Attribute Value
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, Validation failure during enduser creation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - End Users
      summary: Patch end users
      description: Bulk patch end users.
      operationId: patchEndusers
      requestBody:
        description: List of end user patch actions
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkPatchEndUsersInput'
            example:
              data:
                - id: 43b1fe06-a7c4-4f34-8e48-b0559e6acdb9
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: http://avatar.url
                  externalId: '#12345678'
        required: true
      responses:
        '200':
          description: The patched end users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkPatchEndUsersOutput'
              example:
                data:
                  - data:
                      id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Alice Brown
                      email: alice@brown.com
                      phoneNumber: '+551155256325'
                      additionalEmails:
                        - alice@secondary.email
                      additionalPhoneNumbers:
                        - '+5566778899'
                      firstName: Alice
                      lastName: Brown
                      middleNames: []
                      avatarUrl: https://files.dixa.io/public/image_id
                      externalId: '#12345678'
                      customAttributes:
                        - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                          name: My Attribute
                          identifier: my_attribute
                          value: My Attribute Value
                    _type: BulkActionSuccess
                  - error:
                      id: ace11abb-4ed0-42bd-9e3b-4ef6db58e0aa
                      message: >-
                        Updating EndUser
                        [id=ace11abb-4ed0-42bd-9e3b-4ef6db58e0aa] in
                        [org=b86a1842-437c-4c55-ac4b-0a9cd2f44dfb] failed with
                        [errors=PhoneNumberExists]
                      _type: Validation
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/endusers/bulk:
    post:
      tags:
        - End Users
      summary: Create end users
      description: Create multiple end users in a single bulk action
      operationId: postEndusersBulk
      requestBody:
        description: The list of end user details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEndUsersInput'
            example:
              data:
                - displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails: []
                  additionalPhoneNumbers: []
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: http://avatar.url
                  externalId: '#12345678'
        required: true
      responses:
        '201':
          description: The created end users
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateEndUsersOutput'
              example:
                data:
                  - data:
                      id: 93b885ad-fe0d-3089-8df6-34904fd59f71
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Enduser 0
                      email: enduser.0@example.org
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      avatarUrl: https://files.dixa.io/public/image_0_id
                      externalId: '#12345678'
                    _type: BulkActionSuccess
                  - data:
                      id: 55a54008-ad1b-3589-aa21-0d2629c1df41
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Enduser 1
                      email: enduser.1@example.org
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      avatarUrl: https://files.dixa.io/public/image_1_id
                      externalId: '#12345678'
                    _type: BulkActionSuccess
                  - data:
                      id: 9e688c58-a548-3b8e-af69-c9e1005ad0bf
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Enduser 2
                      email: enduser.2@example.org
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      avatarUrl: https://files.dixa.io/public/image_2_id
                      externalId: '#12345678'
                    _type: BulkActionSuccess
                  - data:
                      id: 86666835-06aa-3d90-8bbd-5a74ac4edf68
                      createdAt: '2020-12-16T09:41:43Z'
                      displayName: Enduser 3
                      email: enduser.3@example.org
                      additionalEmails: []
                      additionalPhoneNumbers: []
                      middleNames: []
                      avatarUrl: https://files.dixa.io/public/image_3_id
                      externalId: '#12345678'
                    _type: BulkActionSuccess
                  - error:
                      id: 1b6d1e11-0626-414e-906a-b80a384cfef0
                      message: >-
                        Create EndUser [userId=...] in [orgId=...] failed with
                        [errors=...]
                      _type: Validation
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/endusers/{userId}:
    get:
      tags:
        - End Users
        - Chatbots
      summary: Get end user
      description: Get an end user by id.
      operationId: getEndusersUserid
      parameters:
        - name: userId
          in: path
          description: The end user id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The end user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetEndUserOutput'
              example:
                data:
                  id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: https://files.dixa.io/public/image_id
                  externalId: '#12345678'
                  customAttributes:
                    - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                      name: My Attribute
                      identifier: my_attribute
                      value: My Attribute Value
        '400':
          description: >-
            Invalid value for: path parameter userId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    put:
      tags:
        - End Users
      summary: Update end user
      description: Update an end user.
      operationId: putEndusersUserid
      parameters:
        - name: userId
          in: path
          description: The end user id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The updated details for an end user
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateEndUserInput'
            example:
              displayName: Alice Brown
              email: alice@brown.com
              phoneNumber: '+551155256325'
              additionalEmails:
                - alice@secondary.email
              additionalPhoneNumbers:
                - '+5566778899'
              firstName: Alice
              lastName: Brown
              middleNames:
                - J.
              avatarUrl: http://avatar.url
              externalId: '#12345678'
        required: true
      responses:
        '200':
          description: The updated end user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateEndUserOutput'
              example:
                data:
                  id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames:
                    - J.
                  avatarUrl: https://files.dixa.io/public/image_id
                  externalId: '#12345678'
                  customAttributes:
                    - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                      name: My Attribute
                      identifier: my_attribute
                      value: My Attribute Value
        '400':
          description: >-
            Invalid value for: path parameter userId, Invalid value extracted
            from request context, Invalid value for: body, Validation failure
            during update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - End Users
      summary: Patch end user
      description: Patch an end user.
      operationId: patchEndusersUserid
      parameters:
        - name: userId
          in: path
          description: The end user id to be patched
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The end user patch
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchEndUserInput'
            example:
              displayName: Alice Brown
              email: alice@brown.com
              phoneNumber: '+551155256325'
              additionalEmails:
                - alice@secondary.email
              additionalPhoneNumbers:
                - '+5566778899'
              firstName: Alice
              lastName: Brown
              middleNames: []
              avatarUrl: http://avatar.url
              externalId: '#12345678'
        required: true
      responses:
        '200':
          description: The patched end user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchEndUserOutput'
              example:
                data:
                  id: 434ce9f5-14c8-4be1-a0a8-f755010deb9b
                  createdAt: '2020-12-16T09:41:43Z'
                  displayName: Alice Brown
                  email: alice@brown.com
                  phoneNumber: '+551155256325'
                  additionalEmails:
                    - alice@secondary.email
                  additionalPhoneNumbers:
                    - '+5566778899'
                  firstName: Alice
                  lastName: Brown
                  middleNames: []
                  avatarUrl: https://files.dixa.io/public/image_id
                  externalId: '#12345678'
                  customAttributes:
                    - id: 4baa78bc-4815-4122-9c99-f71cd742d37b
                      name: My Attribute
                      identifier: my_attribute
                      value: My Attribute Value
        '400':
          description: >-
            Invalid value for: path parameter userId, Invalid value extracted
            from request context, Invalid value for: body, Validation failure
            during update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/endusers/{userId}/anonymize:
    patch:
      tags:
        - End Users
        - Anonymization
      summary: Anonymize end user
      description: Request the anonymization of an end user.
      operationId: patchEndusersUseridAnonymize
      parameters:
        - name: userId
          in: path
          description: The id of the end user to anonymize
          required: true
          schema:
            type: string
            format: uuid
        - name: force
          in: query
          description: >-
            Whether to force close all the conversations initiated by the end
            user, if any are found in a non closed state.
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '202':
          description: The end user's anonymization request status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnonymizeEntityOutput'
              example:
                data:
                  id: 6bf55369-a670-4e6b-9f70-ecdb9913549f
                  entityType: UserAnonymizationType
                  _type: User
                  initiatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  targetEntityId: f28fafd6-2e42-4441-943c-388a8e0ef433
                  requestedBy: 2b01e4c9-0c3a-47d4-9462-cd5a1a4687f5
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conflict'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
  /beta/endusers/{userId}/custom-attributes:
    patch:
      tags:
        - End Users
        - Custom Attributes
      summary: Patch end user custom attributes
      description: Patch custom attributes of an end user
      operationId: patchEndusersUseridCustom-attributes
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: >-
          The custom attributes of an end user to be patched. This should map
          the custom attribute id to the desired attribute value. Format:
          Map[UUID, Option[AttributeValue].
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Map_UUID_Option_AttributeValue'
            example:
              274e5a2c-be0d-42c0-b725-3dd533729f68: abcdef
              befae0d9-9679-42b9-af76-e76f64e28429:
                - example1
                - example2
        required: true
      responses:
        '200':
          description: The patched end user attributes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchEndUserCustomAttributesOutput'
              example:
                data:
                  - id: 274e5a2c-be0d-42c0-b725-3dd533729f68
                    name: End user attribute
                    identifier: end_user_attribute
                    value: abcdef
                  - id: befae0d9-9679-42b9-af76-e76f64e28429
                    name: End user attribute 2
                    identifier: end_user_attribute_2
                    value:
                      - example1
                      - example2
        '400':
          description: >-
            Invalid value for: path parameter userId, Invalid value extracted
            from request context, Invalid value for: body, Invalid input for
            patching
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '401':
          description: >-
            The user who issued the access token used in the request is not
            authorized to perform the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
              example:
                message: User is unauthorized to perform an underlying operation
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
  /beta/endusers/{userId}/conversations:
    get:
      tags:
        - End Users
        - Chatbots
      summary: List end user conversations
      description: >-
        Lists conversations requested by an end user. <br/> Note: Custom
        attributes are not part of the response at this point. If you need to
        get custom attributes for a conversation use the [GET
        /conversations/{conversationId}](../Conversations/#tag/Conversations/operation/getConversationsConversationid)
        endpoint
      operationId: getEndusersUseridConversations
      parameters:
        - name: userId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The list of conversations requested by an EndUser
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListEndUserConversationsOutput'
              example:
                data:
                  - id: 1
                    requesterId: 9deb936b-52e5-4c44-828d-4c8d48fe0c7e
                    channel: WidgetChat
                    createdAt: '2020-12-16T09:41:43Z'
                    direction: Outbound
                    state: Open
                    stateUpdatedAt: '2020-12-16T09:41:43Z'
                    assignment:
                      agentId: 0e4d0ead-dc69-470a-9b3a-e7eb16a56453
                      assignedAt: '2020-12-16T11:00:34Z'
                    queue:
                      id: cd87b232-64c8-4ad5-b81a-6f9233352d97
                      queuedAt: '2020-12-16T10:40:40Z'
                    browserInfo:
                      name: Chrome 9
                      version: 91.0.4472.114
                      ipAddress: 127.0.0.1
                      originatingUrl: http://localhost:3000/
                    language: en
                    link:
                      parentId: 1234
                      _type: SideConversation
                    _type: ChatConversation
        '400':
          description: >-
            Invalid value for: path parameter userId, Invalid value extracted
            from request context, Invalid value for: query parameter pageLimit,
            Invalid value for: query parameter pageKey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/teams:
    get:
      tags:
        - Teams
      summary: List teams
      description: Lists all teams in an organization.
      operationId: getTeams
      responses:
        '200':
          description: The list of teams in an organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTeamsOutput'
              example:
                data:
                  - id: 005e7108-c85c-41d1-a945-4a8dc58c4399
                    name: Team A
                  - id: 83cc3c21-9d28-4250-b6ea-b3a6333c5c73
                    name: Team B
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Teams
      summary: Create team
      description: Create a team.
      operationId: postTeams
      requestBody:
        description: The team name
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTeamInput'
            example:
              name: Team A
        required: true
      responses:
        '201':
          description: The created team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTeamOutput'
              example:
                data:
                  id: 005e7108-c85c-41d1-a945-4a8dc58c4399
                  name: Team A
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/teams/{teamId}/agents:
    get:
      tags:
        - Teams
      summary: List members
      description: Lists all agents/admins in a team.
      operationId: getTeamsTeamidAgents
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of agents/admins in the specified team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTeamMembersOutput'
              example:
                data:
                  - id: e8333378-62ed-4062-93b5-fadae6f41175
                    name: Agent A
                    email: aa@example.org
                  - id: 40735745-9fde-4b6d-8941-e82e4e6d5001
                    name: Agent B
                    email: ab@example.org
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Teams
      summary: Remove members
      description: Remove agents/admins from a team.
      operationId: deleteTeamsTeamidAgents
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: List of agent/admin ids to remove from the specified team
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteAgentsFromTeamInput'
            example:
              agentIds:
                - a8080cf3-9d55-41dd-a8ef-b02414399e7a
                - d53dbec1-e79c-4736-b9a1-15f6dce71ed4
        required: true
      responses:
        '204':
          description: The agents/admins were successfully removed from the team
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - Teams
      summary: Add members
      description: Add agents/admins to a team.
      operationId: patchTeamsTeamidAgents
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: List of agent/admin ids to add to the specified team
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentsToTeamInput'
            example:
              agentIds:
                - 912d5148-6918-4420-b23a-8584b896c8ae
                - a8080cf3-9d55-41dd-a8ef-b02414399e7a
        required: true
      responses:
        '200':
          description: ''
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/teams/{teamId}/presence:
    get:
      tags:
        - Teams
      summary: List presence
      description: List the presence status of all agents/admins in a team.
      operationId: getTeamsTeamidPresence
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: List of agents/admins presence status in the specified team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPresenceOutput'
              example:
                data:
                  - userId: d53dbec1-e79c-4736-b9a1-15f6dce71ed4
                    requestTime: '2021-12-01T12:46:35.935'
                    lastSeen: '2021-12-01T12:46:35.935'
                    presenceStatus: Working
                    connectionStatus: Online
                    activeChannels:
                      - Email
                      - FacebookMessenger
                  - userId: e8ecd53b-2f6c-4471-a3a0-34d94caff8c8
                    requestTime: '2021-12-01T12:46:35.935'
                    lastSeen: '2021-12-01T12:46:35.935'
                    presenceStatus: Working
                    connectionStatus: Online
                    activeChannels:
                      - Email
                      - FacebookMessenger
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context, Invalid value for: query parameter pageLimit,
            Invalid value for: query parameter pageKey
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/teams/{teamId}:
    get:
      tags:
        - Teams
      summary: Get team
      description: Get a team by id.
      operationId: getTeamsTeamid
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The team
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTeamOutput'
              example:
                data:
                  id: 005e7108-c85c-41d1-a945-4a8dc58c4399
                  name: Team A
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
    delete:
      tags:
        - Teams
      summary: Delete team
      description: Delete a team.
      operationId: deleteTeamsTeamid
      parameters:
        - name: teamId
          in: path
          description: The team id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The team was successfully deleted
        '400':
          description: >-
            Invalid value for: path parameter teamId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/anonymize:
    patch:
      tags:
        - Conversations
        - Anonymization
      summary: Anonymize conversation
      description: Request the anonymization of a conversation.
      operationId: patchConversationsConversationidAnonymize
      parameters:
        - name: conversationId
          in: path
          description: the id of the conversation to anonymize
          required: true
          schema:
            type: integer
            format: int64
        - name: force
          in: query
          description: >-
            Whether to force close the conversation if it is found in a non
            closed state.
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '202':
          description: The conversation's anonymization request status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnonymizeEntityOutput'
              example:
                data:
                  id: 87bac308-e49f-4134-84cc-96b868f1e1e4
                  entityType: ConversationAnonymizationType
                  _type: Conversation
                  initiatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  targetEntityId: '10749'
                  requestedBy: b165fdaa-51d6-44b0-bfcd-5f431d623fa7
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: query parameter
            force
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conflict'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
  /beta/conversations/{conversationId}/messages/{messageId}/anonymize:
    patch:
      tags:
        - Conversations
        - Messages
        - Anonymization
      summary: Anonymize message
      description: Request the anonymization of a single message in a conversation.
      operationId: patchConversationsConversationidMessagesMessageidAnonymize
      parameters:
        - name: conversationId
          in: path
          description: the id of the conversation in which the message belongs
          required: true
          schema:
            type: integer
            format: int64
        - name: messageId
          in: path
          description: the id of the message to anonymize
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '202':
          description: The message's anonymization request status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnonymizeEntityOutput'
              example:
                data:
                  id: b165fdaa-51d6-44b0-bfcd-5f431d623fa7
                  entityType: MessageAnonymizationType
                  _type: Message
                  initiatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  targetEntityId: 10749_1b9adc49-62f7-4056-a9c0-c18c1f25afdb
                  requestedBy: 4c7af391-b7fd-4560-9d82-b3464eef8776
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value for:
            path parameter messageId, Invalid value extracted from request
            context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
        '409':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conflict'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
  /beta/conversations/{conversationId}/close:
    put:
      tags:
        - Conversations
        - Chatbots
      summary: Close conversation
      description: Mark a conversation as closed by providing its id.
      operationId: putConversationsConversationidClose
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: An optional agent/admin to close the conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloseConversationInput'
            example:
              userId: 5a556159-9c21-4f3e-a44f-d323deb80d16
        required: false
      responses:
        '204':
          description: The conversation was successfully closed
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, User not
            found, User is not agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
  /beta/conversations/{conversationId}/followup:
    put:
      tags:
        - Conversations
        - Chatbots
      summary: Followup conversation
      description: Follow up a conversation by providing its id and expiration timestamp.
      operationId: putConversationsConversationidFollowup
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: A request to followup the conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FollowupConversationInput'
            example:
              timestamp: '2025-01-08T08:31:25Z'
              userId: 5a556159-9c21-4f3e-a44f-d323deb80d16
        required: true
      responses:
        '204':
          description: The conversation was successfully followed up
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, User not
            found, User is not agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
  /beta/conversations/{conversationId}/reopen:
    put:
      tags:
        - Conversations
      summary: Reopen conversation
      description: >-
        Reopen a conversation and offer it in the same queue. Falls back to the
        default organization queue if the conversation has no target queue.
      operationId: putConversationsConversationidReopen
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: An optional agent/admin to reopen the conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReopenConversationInput'
            example:
              userId: a53b25da-f676-4c52-acac-58c9280aa23d
        required: false
      responses:
        '204':
          description: >-
            The conversation was successfully reopened and offered in the same
            queue
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, User not
            found, User is not agent/admin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/transfer/queue:
    put:
      tags:
        - Conversations
        - Chatbots
      summary: Transfer conversation
      description: Transfer a conversation to a target queue.
      operationId: putConversationsConversationidTransferQueue
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: Transfer conversation request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransferConversationInput'
            example:
              queueId: 92f8d193-b26f-4a62-86a3-bb03ee0915e9
              userId: a53b25da-f676-4c52-acac-58c9280aa23d
        required: true
      responses:
        '204':
          description: The conversation was successfully transferred to the target queue
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, User not
            found, User is not agent/admin, Queue does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/notes/bulk:
    post:
      tags:
        - Conversations
        - Internal Notes
      summary: Add internal notes
      description: >-
        Create internal notes in a conversation by providing the conversation
        id.
      operationId: postConversationsConversationidNotesBulk
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The list of internal notes to create for a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkCreateInternalNoteInput'
            examples:
              Input with two internal notes created for the same conversation:
                value:
                  data:
                    - message: A sample note
                      agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                      createdAt: 2021-12-01T12:46:36.581Z[GMT]
                    - message: Another sample note
        required: true
      responses:
        '200':
          description: The created internal notes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkCreateNoteOutput'
              examples:
                A list of internal notes created successfully and error message for others which failed:
                  value:
                    data:
                      - data:
                          id: eb31acbb-13f9-4ce7-abd3-44dd86266741
                          authorId: 5e8a300e-787e-47cd-af53-fc1ccc37933d
                          createdAt: 2021-12-01T12:46:36.581Z[GMT]
                          csid: 9456
                          message: A sample note
                        _type: BulkActionSuccess
                      - error:
                          message: An agent with id:... cannot be found in org.
                        _type: BulkActionFailure
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/notes:
    get:
      tags:
        - Conversations
        - Internal Notes
      summary: List internal notes
      description: >-
        Get all internal notes for a particular conversation by providing the
        conversation id.
      operationId: getConversationsConversationidNotes
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: >-
            List of internal notes for a conversation sorted from oldest to
            newest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListInternalNotesOutput'
              example:
                data:
                  - id: 3346b99c-8128-4276-ac40-5f30c959e5e7
                    authorId: c68f42a5-1453-497a-940f-ff36ed4f1631
                    createdAt: '2021-01-20T09:00:00Z'
                    csid: 7392
                    message: A note to remember
                  - id: 22b8e6b6-4576-4dc0-ab05-60f81e8b0708
                    authorId: 124d54bb-92d6-41c9-a675-788d6a8c821e
                    createdAt: '2021-01-22T12:00:00Z'
                    csid: 7392
                    message: A note to forget
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Conversations
        - Internal Notes
      summary: Add internal note
      description: >-
        Create an internal note in a conversation by providing the conversation
        id.
      operationId: postConversationsConversationidNotes
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The internal note to create for a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateInternalNoteInput'
            examples:
              Input with createdAt:
                value:
                  message: A sample note
                  agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                  createdAt: 2021-12-01T12:46:36.581Z[GMT]
              Input without createdAt:
                value:
                  message: Another sample note
        required: true
      responses:
        '200':
          description: The created internal note
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateNoteOutput'
              examples:
                created internal note:
                  value:
                    data:
                      id: eb31acbb-13f9-4ce7-abd3-44dd86266741
                      authorId: 5e8a300e-787e-47cd-af53-fc1ccc37933d
                      createdAt: 2021-12-01T12:46:36.581Z[GMT]
                      csid: 9456
                      message: A sample note
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, Agent was
            not found, Invalid date format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/ratings/{ratingId}/submit:
    post:
      tags:
        - Conversations
        - Ratings
        - Chatbots
      summary: Create conversation rating result
      description: Create a rating result for a specific conversation.
      operationId: postConversationsConversationidRatingsRatingidSubmit
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: ratingId
          in: path
          description: >-
            The ratingId parameter has to be the ID of the offer created via
            invoking the /conversations/{conversationId}/ratings/offer endpoint.
          required: true
          schema:
            type: string
      requestBody:
        description: The rating result to be created for a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRatingResultInput'
            example:
              userId: d3cf6f15-1497-4e71-92f2-9b3b228352bd
              ratingResult:
                value: 4
                _type: Csat
              comment: Best customer service ever!
              submittedAt: '2024-03-11T16:39:30Z'
        required: true
      responses:
        '201':
          description: The created conversation rating result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRatingResultOutput'
              example:
                data:
                  ratingId: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                  userId: 4c5f7efa-0822-4b75-bdf5-907fa7336e0c
                  ratingResult:
                    value: 5
                    _type: Csat
                  comment: Excellent customer service!
                  submittedAt: '2024-03-11T16:39:30Z'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/ratings/offer:
    post:
      tags:
        - Conversations
        - Ratings
        - Chatbots
      summary: Create conversation rating offer
      description: Create a rating offer for a specific conversation.
      operationId: postConversationsConversationidRatingsOffer
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The rating offer to be created for a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRatingOfferInput'
            example:
              userId: b0323b42-c428-4afa-970e-20bf5bdeeec4
              agentId: eeb3bbe5-0355-4ac1-8af5-20d42a3db24b
              ratingType: Csat
              offeredAt: '2024-03-11T16:39:30Z'
        required: true
      responses:
        '201':
          description: The created conversation rating offer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRatingOfferOutput'
              example:
                data:
                  id: 2f0122db-0824-44d7-b39a-e1f722b8c38c
                  userId: 7a65c963-b3ca-4bd4-996e-bdbcaa620219
                  agentId: db7f0b41-b779-4726-a673-07b2a59a550d
                  ratingType: Csat
                  offeredAt: '2024-03-11T16:39:30Z'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/rating:
    get:
      tags:
        - Conversations
        - Ratings
      summary: List rating
      description: Deprecated rating endpoint. Use '/ratings'.
      operationId: getConversationsConversationidRating
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: List of ratings for a conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConversationRatingsOutput'
              example:
                data:
                  - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                    ratingScore: 4
                    ratingType: Csat
                    ratingComment: Super good!
                    conversationChannel: PstnPhone
                    agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                    userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                    ratingStatus: Offered
                    language: English
                    timestamps: {}
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
      deprecated: true
  /beta/conversations/{conversationId}/ratings:
    get:
      tags:
        - Conversations
        - Ratings
      summary: List ratings for a conversation
      description: >-
        Lists latest ratings statuses for a particular conversation by providing
        the conversation ID. For surveys with multiple questions, rating status
        will be reported for each individual question of the survey. For
        example, a response for a 3 question survey that was answered will be 3
        elements with status "Rated". Additionally, a multiple question survey
        can be partially answered, therefore a response of such case will be a
        mix of "Offered" and "Rated" statuses. Note that the IDs of multiple
        questions response elements will be the same, because they are part of
        the same survey.
      operationId: getConversationsConversationidRatings
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: List of ratings for a conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListConversationRatingsOutput'
              examples:
                Response when a single question (CSAT) survey was offered:
                  value:
                    data:
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 5
                        ratingType: Csat
                        ratingComment: Super good!
                        conversationChannel: PstnPhone
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Offered
                        language: en
                        timestamps:
                          offered_at: '2025-09-25T14:35:53Z'
                          modified_at: '2025-09-25T14:36:27Z'
                          scheduled_for: '2025-09-25T14:35:52Z'
                          created_at: '2025-09-25T14:34:52Z'
                          scheduled_at: '2025-09-25T14:34:52Z'
                Response when a multiple question survey was offered:
                  value:
                    data:
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingType: Nps
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Offered
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingType: Csat
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Offered
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingType: ThumbsUpOrDown
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Offered
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                Response when a multiple question survey was answered:
                  value:
                    data:
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 8
                        ratingType: Nps
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        language: da
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          rated_at: '2025-10-10T10:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 5
                        ratingType: Csat
                        ratingComment: Super good!
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        language: da
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          rated_at: '2025-10-10T10:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 1
                        ratingType: ThumbsUpOrDown
                        ratingComment: Nice!
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        language: da
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          rated_at: '2025-10-10T10:46:40Z'
                Response when a multiple question survey was partially answered:
                  value:
                    data:
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 8
                        ratingType: Nps
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          rated_at: '2025-10-12T12:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 5
                        ratingType: Csat
                        ratingComment: Super good!
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Offered
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 1
                        ratingType: ThumbsUpOrDown
                        ratingComment: Nice!
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        language: en
                        timestamps:
                          offered_at: '2025-10-10T10:46:40Z'
                          modified_at: '2025-10-10T10:46:40Z'
                          created_at: '2025-10-10T10:46:40Z'
                          scheduled_at: '2025-10-10T10:46:40Z'
                          scheduled_for: '2025-10-10T10:46:40Z'
                          rated_at: '2025-10-12T12:46:40Z'
                Response when offer and score was submitted via Dev API:
                  value:
                    data:
                      - id: 33cf4e5e-9ce9-461c-b668-be9b712b717c
                        ratingScore: 1
                        ratingType: ThumbsUpOrDown
                        ratingComment: Nice!
                        conversationChannel: Email
                        agentId: a53b25da-f676-4c52-acac-58c9280aa23d
                        userId: 6d0c5791-e40a-46d4-bba1-1364ce4578ed
                        ratingStatus: Rated
                        timestamps:
                          rated_at: '2025-10-10T10:46:40Z'
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/activitylog:
    get:
      tags:
        - Conversations
      summary: List organization activity log
      description: List all activity logs for an organization.
      operationId: getConversationsActivitylog
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
        - name: fromDatetime
          in: query
          description: >-
            Starting date-time filter with ISO 8601 format:
            yyyy-MM-dd'T'HH:mm:sss'Z'
          required: false
          schema:
            type: string
            format: date-time
        - name: toDatetime
          in: query
          description: >-
            Ending date-time filter with ISO 8601 format:
            yyyy-MM-dd'T'HH:mm:sss'Z'
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: The full list of activity logs for an organization with pagination
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListActivityLogOutput'
              example:
                data:
                  - id: d85a7bd7-79da-4f10-b021-12e4c2c20024
                    conversationId: 1
                    activityTimestamp: 2021-12-01T12:46:36.581Z[GMT]
                    activityType: ConversationAssignedActivityType
                    _type: ConversationAssigned
                    author:
                      id: a53b25da-f676-4c52-acac-58c9280aa23d
                      name: Dale Cooper
                      email: dc@dixa.com
                      phoneNumber: '+4534343434'
                  - id: 324d0108-31b7-4678-8862-c8780a297f8f
                    conversationId: 2
                    activityTimestamp: 2021-12-01T12:46:36.581Z[GMT]
                    activityType: ConversationAssignedActivityType
                    _type: ConversationAssigned
                    author:
                      id: 67ff39b6-b1ee-4d5f-91ee-168d4668c4ba
                      name: Bob Ross
                      email: br@dixa.com
                      phoneNumber: '+4532323232'
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: query parameter fromDatetime, Invalid
            value for: query parameter toDatetime, Validation failure when
            retrieving data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/flows:
    get:
      tags:
        - Conversations
      summary: List flows
      description: List all conversations flows in an organization.
      operationId: getConversationsFlows
      parameters:
        - name: channel
          in: query
          description: >-
            An optional ConversationChannel can be specified to filter the
            flows. If not provided, the default channel is PstnPhone. Possible
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger, Email,
            ContactForm, Callback, PstnPhone, Messenger]
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The list of conversation flows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListFlowsOutput'
              example:
                data:
                  - id: d546e9a8-82c2-409f-b688-e9199ea69f83
                    name: Default call flow
                    channel: PstnPhone
                    contactEndpointId: '+559912443333'
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter channel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/tags/{tagId}:
    put:
      tags:
        - Conversations
        - Tags
      summary: Tag conversation
      description: Tag a conversation. You may only use active tags to tag conversations.
      operationId: putConversationsConversationidTagsTagid
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: tagId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The conversation was successfully tagged
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value for:
            path parameter tagId, Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Conversations
        - Tags
      summary: Untag conversation
      description: >-
        Untag a conversation. You may remove active or inactive tags from a
        conversation.
      operationId: deleteConversationsConversationidTagsTagid
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
        - name: tagId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The conversation was successfully untagged
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value for:
            path parameter tagId, Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/tags/bulk:
    post:
      tags:
        - Conversations
        - Tags
      summary: Bulk tag conversation
      description: >-
        Initiate bulk tag of a conversation and process it asynchronously. If a
        tag with corresponding name does not exist it will be created.
      operationId: postConversationsConversationidTagsBulk
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The list of tags to add to a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkTagConversationInput'
            example:
              data:
                - name: 'Example #1'
                - name: 'Example #2'
        required: true
      responses:
        '202':
          description: The conversation bulk tag was initiated
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/tags:
    get:
      tags:
        - Conversations
        - Tags
      summary: List tags
      description: >-
        Get the tags for a particular conversation by providing the conversation
        id.
      operationId: getConversationsConversationidTags
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: List of tags for a conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationTagsOutput'
              example:
                data:
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/messages:
    get:
      tags:
        - Conversations
        - Messages
      summary: List messages
      description: >-
        Get all messages for a particular conversation by providing the
        conversation id. Note that messages in `ContactForm` conversations can
        have attributes of `"_type": "EmailAttributes"` if they are created
        through a webform, or `"_type": "ContactFormAttributes"` when created
        through a chat widget.
      operationId: getConversationsConversationidMessages
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: List of messages for a conversation sorted from oldest to newest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListMessagesOutput'
              examples:
                Email messages example (Regular and TooLarge content):
                  value:
                    data:
                      - id: 11b95893-0514-4606-a5d8-1880172b3a55
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13244'
                        createdAt: 2021-12-01T12:46:36.581Z[GMT]
                        attributes:
                          emailContent:
                            content:
                              value: Hello, this is a regular email content
                              _type: Text
                            _type: Regular
                          from:
                            email: some-help@email.dixa.io
                            name: Help
                          to:
                            - email: someone@somecompany.com
                              name: Some One
                          cc: []
                          bcc: []
                          isAutoReply: false
                          inlineImages: []
                          attachments:
                            - url: >-
                                https://files.dixa.io/private/something/attachment/attachment-1
                              prettyName: Picture
                          direction: Outbound
                          originalContentUrl:
                            url: >-
                              https://files.dixa.io/private/something/email_original_data/a1b2c3d4
                          _type: EmailAttributes
                      - id: 12c95893-0514-4606-a5d8-1880172b3a56
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13245'
                        createdAt: 2021-12-01T12:47:36.581Z[GMT]
                        attributes:
                          emailContent:
                            file:
                              url: >-
                                https://files.dixa.io/private/something/email_stripped_content/large-email-content
                              prettyName: Large Email Content
                            _type: TooLarge
                          from:
                            email: some-help@email.dixa.io
                            name: Help
                          to:
                            - email: someone@somecompany.com
                              name: Some One
                          cc:
                            - email: manager@somecompany.com
                              name: Manager
                          bcc:
                            - email: archive@somecompany.com
                          isAutoReply: false
                          inlineImages: []
                          attachments:
                            - url: >-
                                https://files.dixa.io/private/something/attachment/attachment-2
                              prettyName: Large Document
                            - url: >-
                                https://files.dixa.io/private/something/attachment/attachment-3
                              prettyName: Spreadsheet
                          direction: Inbound
                          originalContentUrl:
                            url: >-
                              https://files.dixa.io/private/something/email_original_data/b2c3d4e5
                          _type: EmailAttributes
                Chat message example:
                  value:
                    data:
                      - id: 22b95893-0514-4606-a5d8-1880172b3a56
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13245'
                        createdAt: 2021-12-01T12:47:36.581Z[GMT]
                        attributes:
                          content:
                            value: How can I help you?
                            _type: Text
                          direction: Outbound
                          attachments: []
                          isAutomated: false
                          _type: ChatAttributes
                Contact form message example:
                  value:
                    data:
                      - id: 33b95893-0514-4606-a5d8-1880172b3a57
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13246'
                        createdAt: 2021-12-01T12:48:36.581Z[GMT]
                        attributes:
                          emailContent:
                            content:
                              value: Contact form submission
                              _type: Text
                            _type: Regular
                          from:
                            email: contact@example.com
                            name: Contact Form
                          replyDefaultToEmails:
                            - email: support@company.com
                              name: Support
                          to:
                            - email: support@company.com
                              name: Support
                          cc: []
                          bcc: []
                          isAutoReply: false
                          inlineImages: []
                          attachments: []
                          direction: Inbound
                          _type: ContactFormAttributes
                Messenger form message example:
                  value:
                    data:
                      - id: 44b95893-0514-4606-a5d8-1880172b3a58
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13247'
                        createdAt: 2021-12-01T12:49:36.581Z[GMT]
                        attributes:
                          formSubmission:
                            values:
                              Interests:
                                - Product A
                              Name: John Doe
                              Subject: Product Inquiry
                              Email: john.doe@example.com
                              Message: I would like to know more about your services.
                              Preferred Contact:
                                - Email
                          direction: Inbound
                          content:
                            value: >-
                              <form
                              class=\"dixa-custom-form-submission\"><fieldset><legend
                              class=\"dixa-custom-form-title\">Zarina's
                              form</legend> <div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Name<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">John
                              Doe</div></div><div
                              class=\"dixa-custom-form-spacing\"><br/></div><div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Email<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">john.doe@example.com</div></div><div
                              class=\"dixa-custom-form-spacing\"><br/></div><div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Subject<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">Product
                              Inquiry</div></div><div
                              class=\"dixa-custom-form-spacing\"><br/></div><div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Interests<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">Product
                              B</div></div><div
                              class=\"dixa-custom-form-spacing\"><br/></div><div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Message<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">I would
                              like to know more about your
                              services.</div></div><div
                              class=\"dixa-custom-form-spacing\"><br/></div><div
                              class=\"dixa-custom-form-field\"><label
                              class=\"dixa-custom-form-field-label\">Preferred
                              Contact<br/></label>\n<div
                              class=\"dixa-custom-form-field-value\">email</div></div></fieldset></form>
                            _type: Html
                          _type: MessengerFormAttributes
                Phone message example:
                  value:
                    data:
                      - id: 55b95893-0514-4606-a5d8-1880172b3a59
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13248'
                        createdAt: 2021-12-01T12:50:36.581Z[GMT]
                        attributes:
                          from: '+1234567890'
                          to: 987654321
                          direction: Outbound
                          duration: 120
                          _type: PhoneAttributes
                Call recording message example:
                  value:
                    data:
                      - id: 66b95893-0514-4606-a5d8-1880172b3a60
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13249'
                        createdAt: 2021-12-01T12:51:36.581Z[GMT]
                        attributes:
                          duration: 180
                          recording: >-
                            https://files.dixa.io/private/something/recording/call-1
                          _type: CallRecordingAttributes
                SMS message example:
                  value:
                    data:
                      - id: 77b95893-0514-4606-a5d8-1880172b3a61
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13250'
                        createdAt: 2021-12-01T12:52:36.581Z[GMT]
                        attributes:
                          content:
                            value: SMS message content
                            _type: Text
                          direction: Inbound
                          attachments: []
                          _type: SmsAttributes
                Facebook Messenger message example:
                  value:
                    data:
                      - id: 88b95893-0514-4606-a5d8-1880172b3a62
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13251'
                        createdAt: 2021-12-01T12:53:36.581Z[GMT]
                        attributes:
                          content:
                            value: Facebook Messenger message
                            _type: Text
                          direction: Inbound
                          attachments: []
                          _type: FacebookMessengerAttributes
                WhatsApp message example:
                  value:
                    data:
                      - id: 99b95893-0514-4606-a5d8-1880172b3a63
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13252'
                        createdAt: 2021-12-01T12:54:36.581Z[GMT]
                        attributes:
                          content:
                            value: WhatsApp message
                            _type: Text
                          direction: Inbound
                          attachments: []
                          _type: WhatsAppAttributes
                Generic message example:
                  value:
                    data:
                      - id: bbb95893-0514-4606-a5d8-1880172b3a65
                        authorId: 41646d42-edc0-493e-ac7b-814d9ff40a2e
                        externalId: '13254'
                        createdAt: 2021-12-01T12:56:36.581Z[GMT]
                        attributes:
                          content:
                            value: Generic message
                            _type: Text
                          direction: Inbound
                          attachments: []
                          _type: GenericAttributes
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
    post:
      tags:
        - Conversations
        - Messages
      summary: Add message
      description: >-
        Add a message to a conversation. For inbound messages the author is
        assumed to be the requester of the conversation (end user). For outbound
        messages the author is specified using the agentId field. <br>If
        attachments are added to the message, they will be copied and stored in
        Dixa. <br> Supported channels are Chat, Messenger, Contact Form, Email,
        Sms (outbound only), Whatsapp (outbound and Markdown only). <br><br>
        Supported Markdown syntax for Markdown content: bold
        <code>\*\*text\*\*</code>, italic <code>\*text\*</code>, bold & italic
        <code>\*\*\*text\*\*\*</code>, strikethrough <code>\~text\~</code>,
        blockquote <code> \> Quoted text. \n Message about quoted text</code>,
        ordered list <code>List:\n1. Item\n2. Item\n3. Item</code>, unordered
        list <code>List:\n\* Item\n\* Item\n\* Item</code>, inline code
        <code>This is \`code\`</code>. <br><br> Whatsapp channel: <br> Only one
        attachment is allowed per WhatsApp message. <br> Supports the following
        file types for attachments: .jpg, .jpeg, .png, .pdf, .doc, .docx, .pptx,
        .xlsx
      operationId: postConversationsConversationidMessages
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The message to be added to a conversation
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMessageInput'
            examples:
              Example0:
                summary: General inbound example
                value:
                  content:
                    value: I need some help!
                    _type: Html
                  attachments:
                    - url: http://attachment.url
                      prettyName: Filename
                  _type: Inbound
              Example1:
                summary: General outbound example
                value:
                  content:
                    value: Ok, I can help you!
                    _type: Text
                  agentId: bac5a02c-15b3-44da-ae1e-ab7b9db4aa89
                  attachments:
                    - url: http://attachment.url
                      prettyName: Filename
                  cc: []
                  bcc: []
                  _type: Outbound
              Example2:
                summary: Whatsapp outbound
                value:
                  content:
                    value: >-
                      Hello dear **customer**! Here are *your* options:\n* New
                      item\n* Refund\n* Restock
                    _type: Markdown
                  agentId: 359ef707-d77f-4298-a101-43da2d0c5770
                  attachments: []
                  cc: []
                  bcc: []
                  _type: Outbound
              Example3:
                summary: Whatsapp outbound with attachments
                value:
                  content:
                    value: >-
                      Hello dear **customer**! Here are *your* options:\n* New
                      item\n* Refund\n* Restock
                    _type: Markdown
                  agentId: 359ef707-d77f-4298-a101-43da2d0c5770
                  attachments:
                    - url: https://file.hosting.service/file1234.jpg
                  cc: []
                  bcc: []
                  _type: Outbound
        required: true
      responses:
        '200':
          description: The added message
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateMessageOutput'
              example:
                data:
                  content:
                    value: An amazing message
                    _type: Html
                  direction: Outbound
                  authorId: bac5a02c-15b3-44da-ae1e-ab7b9db4aa89
                  messageId: 87bac308-e49f-4134-84cc-96b868f1e1e4
                  createdAt: '2021-06-09T08:18:37.284Z'
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, Invalid
            input for Message, Failure to download attachment, Duplicate
            externalId, Unsupported ConversationChannel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations:
    post:
      tags:
        - Conversations
        - Chatbots
      summary: Create conversation
      description: >-
        Create a conversation. For inbound messages the author is assumed to be
        the requester of the conversation (end user). For outbound messages the
        author is specified using the agentId field.
      operationId: postConversations
      requestBody:
        description: The conversation to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationInput'
            example:
              requesterId: 9c2a2cce-699f-4a72-89d9-fda5bc8dec8b
              emailIntegrationId: my-integration@email.dixa.io
              subject: 'order #123'
              message:
                content:
                  value: My order hasn't shipped
                  _type: Text
                attachments: []
                _type: Inbound
              language: en
              _type: Email
        required: true
      responses:
        '201':
          description: The id of the created conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateConversationOutput'
              example:
                data:
                  id: 100
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, Invalid input for Message, Failure to download attachment,
            Duplicate externalId, Unsupported ConversationChannel
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/import:
    post:
      tags:
        - Conversations
        - Chatbots
      summary: Import conversation
      description: >-
        Import a previously created conversation into Dixa. For inbound messages
        the author is assumed to be the requester of the conversation (end
        user), unless the specific channel supports overriding the message
        author through its attributes. For outbound messages the author is
        specified using the agentId field.
      operationId: postConversationsImport
      requestBody:
        description: The type of conversation to import
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImportConversationInput'
            examples:
              Example0:
                summary: Generic conversation example
                value:
                  genericChannelName: MyCustomChat
                  requesterId: 9c2a2cce-699f-4a72-89d9-fda5bc8dec8b
                  requesterConnectionStatus: Connected
                  direction: Inbound
                  messages:
                    - content:
                        value: My order hasn't shipped
                        _type: Text
                      attachments: []
                      createdAt: '2021-12-01T13:00:00.003Z'
                      _type: InboundImport
                    - content:
                        value: Our bad, sorry
                        _type: Text
                      agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                      attachments:
                        - url: >-
                            https://en.wikipedia.org/wiki/Shipwreck#/media/File:Titanic_wreck_bow.jpg
                          prettyName: shipwreck
                      createdAt: '2021-12-01T14:00:00.004Z'
                      _type: OutboundImport
                  createdAt: '2021-12-01T11:00:00.001Z'
                  assignment:
                    agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                    assignedAt: '2021-12-01T12:00:00.002Z'
                  closing:
                    closedAt: '2021-12-01T15:00:00.005Z'
                    closedBy: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                  _type: GenericConversationImport
              Example1:
                summary: Email conversation example
                description: >-
                  The following example demonstrates how to import an email
                  conversation. The key parts is the **genericChannelName** and
                  the **attributes** fields. Please note that the **cc**,
                  **bcc** and **requesterId** fields are optional. **cc** and
                  **bcc** are only relevant for outbound messages, while
                  **requesterId** message attribute is only relevant for inbound
                  messages.
                value:
                  genericChannelName: email
                  requesterId: 9c2a2cce-699f-4a72-89d9-fda5bc8dec8b
                  requesterConnectionStatus: Connected
                  direction: Inbound
                  messages:
                    - content:
                        value: My order hasn't shipped
                        _type: Text
                      attachments: []
                      createdAt: '2021-12-01T13:00:00.003Z'
                      attributes:
                        emailIntegrationId: sample-integration@email.dixa.io
                      _type: InboundImport
                    - content:
                        value: Our bad, sorry
                        _type: Text
                      agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                      attachments:
                        - url: >-
                            https://en.wikipedia.org/wiki/Shipwreck#/media/File:Titanic_wreck_bow.jpg
                          prettyName: shipwreck
                      createdAt: '2021-12-01T14:00:00.004Z'
                      attributes:
                        emailIntegrationId: sample-integration@email.dixa.io
                        cc:
                          - a@b.com
                          - b@c.com
                        bcc: []
                      _type: OutboundImport
                    - content:
                        value: Thank you!
                        _type: Text
                      attachments: []
                      createdAt: '2021-12-01T15:00:00.005Z'
                      attributes:
                        emailIntegrationId: sample-integration@email.dixa.io
                        requesterId: 4f1f3a86-6b90-411a-9a3b-cf2e4c4cd7cd
                      _type: InboundImport
                  createdAt: '2021-12-01T11:00:00.001Z'
                  assignment:
                    agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                    assignedAt: '2021-12-01T12:00:00.002Z'
                  closing:
                    closedAt: '2021-12-01T15:00:00.005Z'
                    closedBy: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                  attributes:
                    emailIntegrationId: sample-integration@email.dixa.io
                    subject: email subject
                  _type: GenericConversationImport
              Example2:
                summary: Chat conversation example
                description: >-
                  The following example demonstrates how to import a chat
                  conversation. The key parts is the **genericChannelName** and
                  the **attributes** fields. Please note that the **widgetId**
                  is an optional field and could be omitted.
                value:
                  genericChannelName: widgetchat
                  requesterId: 9c2a2cce-699f-4a72-89d9-fda5bc8dec8b
                  requesterConnectionStatus: Connected
                  direction: Inbound
                  messages:
                    - content:
                        value: My order hasn't shipped
                        _type: Text
                      attachments: []
                      createdAt: '2021-12-01T13:00:00.003Z'
                      _type: InboundImport
                    - content:
                        value: Our bad, sorry
                        _type: Text
                      agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                      attachments:
                        - url: >-
                            https://en.wikipedia.org/wiki/Shipwreck#/media/File:Titanic_wreck_bow.jpg
                          prettyName: shipwreck
                      createdAt: '2021-12-01T14:00:00.004Z'
                      _type: OutboundImport
                  createdAt: '2021-12-01T11:00:00.001Z'
                  assignment:
                    agentId: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                    assignedAt: '2021-12-01T12:00:00.002Z'
                  closing:
                    closedAt: '2021-12-01T15:00:00.005Z'
                    closedBy: cd4ceb58-bb3a-443c-9cd8-4f088feafe5b
                  attributes:
                    widgetId: b70d8521-5575-4023-a30b-5cefff393f24
                    browserInfo:
                      name: Chrome 9
                      version: 91.0.4472.114
                      ipAddress: 127.0.0.1
                      originatingUrl: http://localhost:3000/
                    language: en
                  _type: GenericConversationImport
        required: true
      responses:
        '201':
          description: The id of the imported conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportConversationOutput'
              example:
                data:
                  id: 100
                  partialErrors:
                    - message: The conversation could not be assigned
                    - message: 'Invalid attachment url in message. externalId: 42'
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, Invalid input for Message, Failure to download attachment,
            Unsupported ConversationChannel, Requester does not exist, Agent
            does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/custom-attributes:
    patch:
      tags:
        - Conversations
        - Custom Attributes
      summary: Patch conversation custom attributes
      description: Patch custom attributes of a conversation
      operationId: patchConversationsConversationidCustom-attributes
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: >-
          The custom attributes of an conversation to be patched. This should
          map the custom attribute id to the desired attribute value. Format:
          Map[UUID, Option[AttributeValue].
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Map_UUID_Option_AttributeValue'
            example:
              2f5515b6-7e98-4f4d-9010-bfd2a27d4f35: '012345'
              e14708a6-eed9-495c-9d88-c72331e9e247:
                - str1
                - str2
        required: true
      responses:
        '200':
          description: The patched conversation attributes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchConversationCustomAttributesOutput'
              example:
                data:
                  - id: 2f5515b6-7e98-4f4d-9010-bfd2a27d4f35
                    name: Conversation attribute
                    identifier: conversation_attribute
                    value: '012345'
                  - id: e14708a6-eed9-495c-9d88-c72331e9e247
                    name: Conversation attribute 2
                    identifier: conversation_attribute_2
                    value:
                      - str1
                      - str2
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body, Invalid
            input for patching
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '401':
          description: >-
            The user who issued the access token used in the request is not
            authorized to perform the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
              example:
                message: User is unauthorized to perform an underlying operation
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
  /beta/conversations/{conversationId}/claim:
    put:
      tags:
        - Conversations
        - Chatbots
      summary: Claim conversation
      description: >-
        Claim a conversation for a given agent. To avoid taking over assigned
        conversations, set the `force` paremeter to false
      operationId: putConversationsConversationidClaim
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimConversationInput'
            example:
              agentId: 5a556159-9c21-4f3e-a44f-d323deb80d16
              force: false
        required: true
      responses:
        '204':
          description: The conversation was successfully claimed
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/activitylog:
    get:
      tags:
        - Conversations
      summary: List activity log
      description: >-
        Get the activity log for a conversation by providing the conversation
        id.
      operationId: getConversationsConversationidActivitylog
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Activity log entries for a conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetActivityLogOutput'
              example:
                data:
                  - id: fca291e5-8670-41bd-b502-842fd9542e27
                    conversationId: 1
                    activityTimestamp: 2021-12-01T12:46:36.581Z[GMT]
                    activityType: ConversationAssignedActivityType
                    _type: ConversationAssigned
                    author:
                      id: a53b25da-f676-4c52-acac-58c9280aa23d
                      name: Dale Cooper
                      email: dc@dixa.com
                      phoneNumber: '+4534343434'
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}:
    get:
      tags:
        - Conversations
      summary: Get conversation
      description: Get a conversation by id.
      operationId: getConversationsConversationid
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: The conversation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetConversationOutput'
              example:
                data:
                  id: 1
                  requesterId: d58c8b1c-85ad-4678-a6c8-7442945f3836
                  channel: WidgetChat
                  createdAt: '2020-12-16T09:41:43Z'
                  direction: Outbound
                  state: Open
                  stateUpdatedAt: '2020-12-16T09:41:43Z'
                  assignment:
                    agentId: 0e4d0ead-dc69-470a-9b3a-e7eb16a56453
                    assignedAt: '2020-12-16T11:00:34Z'
                  queue:
                    id: cd87b232-64c8-4ad5-b81a-6f9233352d97
                    queuedAt: '2020-12-16T10:40:40Z'
                  browserInfo:
                    name: Chrome 9
                    version: 91.0.4472.114
                    ipAddress: 127.0.0.1
                    originatingUrl: http://localhost:3000/
                  language: en
                  link:
                    parentId: 1234
                    _type: SideConversation
                  customAttributes:
                    - id: e14708a6-eed9-495c-9d88-c72331e9e247
                      name: My Attribute
                      identifier: my_attribute
                      value: My Attribute Value
                  _type: ChatConversation
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/link:
    put:
      tags:
        - Conversations
      summary: Link a conversation to a parent conversation
      description: >-
        Links the specified conversation to a parent conversation with the
        specified link type.


        Limitations:

        * Maximum of 100 child conversations per parent

        * Only 1 parent per child conversation

        * A child conversation cannot have its own child conversations
      operationId: putConversationsConversationidLink
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      requestBody:
        description: The parent conversation ID and link type
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkConversationInput'
            example:
              parentId: 12345
              linkType: SideConversation
        required: true
      responses:
        '204':
          description: ''
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/conversations/{conversationId}/linked:
    get:
      tags:
        - Conversations
      summary: List linked conversations
      description: >-
        Lists all linked child conversations for the given conversation ID, such
        as transcripts and side conversations.
      operationId: getConversationsConversationidLinked
      parameters:
        - name: conversationId
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: The list of conversations requested by an EndUser
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLinkedConversationsOutput'
              example:
                data:
                  - id: 12341
                    requesterId: 7bcf1f2d-70c0-4f87-8c5b-bed2c8b247e9
                    channel: WidgetChat
                    createdAt: '2022-07-26T12:09:21Z'
                    direction: Inbound
                    state: Open
                    stateUpdatedAt: '2022-07-26T12:12:53Z'
                    assignment:
                      agentId: 01107a2e-4ff0-4a87-bb48-a19af298394d
                      assignedAt: '2022-07-26T12:12:53Z'
                    queue:
                      id: 6b9087b3-9ab7-4af4-936d-3290996faedb
                      queuedAt: '2022-07-26T12:09:54Z'
                    toEmail: something@email.dixa.com
                    fromEmail: some.one@somewhere.com
                    integrationEmail: something@email.dixa.com
                    language: en
                    subject: Important Request
                    link:
                      parentId: 1234
                      _type: SideConversation
                    _type: EmailConversation
        '400':
          description: >-
            Invalid value for: path parameter conversationId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/queues:
    get:
      tags:
        - Queues
      summary: List queues
      description: List all queues in an organization.
      operationId: getQueues
      responses:
        '200':
          description: The list of queues in an organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQueuesOutput'
              example:
                data:
                  - id: 497d2cb4-6b48-4fa2-99d2-21c2a5bad79f
                    name: MyCorp main queue
                    isDefault: true
                    organizationId: 927d4b48-966b-45a3-8d7c-c6ad64f877b0
                    queueThresholds:
                      SlaPercentage: 10
                    slaCalculationMethod: AbandonedIgnored
                    offerTimeout: 10
                    offeringAlgorithm: OneAtATimeRandom
                    memberListType: SkillBased
                    usages:
                      queueId: 497d2cb4-6b48-4fa2-99d2-21c2a5bad79f
                      usages:
                        WidgetChat:
                          - c6f50127-7f0a-418f-943e-c62b96d8a742
                          - b2ac94ac-379a-4f24-995a-6473809eef6b
                        PstnPhone:
                          - '+4589977790'
                        Email:
                          - info@mycorp.dixa.io
                    wrapupTimeout: 10
                    priority: 1
                    offerAbandonedConversations: false
                    doNotOfferTimeouts:
                      WidgetChat: 1
                    isDoNotOfferEnabled: true
                    isPreferredAgentEnabled: false
                    preferredAgentTimeouts:
                      WhatsApp: 300
                      Voicemail: 300
                      WidgetChat: 300
                      FacebookMessenger: 300
                      Email: 43200
                      ContactForm: 43200
                      Callback: 300
                      PstnPhone: 300
                    preferredAgentOfflineTimeout: 500
                    personalAgentOfflineTimeout: 500
                    isRestricted: false
                  - id: 921a6e00-0845-417e-9c67-f7cb872d45f0
                    name: MyCorp email queue
                    isDefault: true
                    organizationId: 927d4b48-966b-45a3-8d7c-c6ad64f877b0
                    queueThresholds:
                      SlaPercentage: 10
                    slaCalculationMethod: AbandonedIgnored
                    offerTimeout: 10
                    offeringAlgorithm: OneAtATimeRandom
                    memberListType: SkillBased
                    usages:
                      queueId: 921a6e00-0845-417e-9c67-f7cb872d45f0
                      usages:
                        Email:
                          - info@mycorp.dixa.io
                    wrapupTimeout: 10
                    priority: 1
                    offerAbandonedConversations: false
                    doNotOfferTimeouts:
                      WidgetChat: 1
                    isDoNotOfferEnabled: true
                    isPreferredAgentEnabled: false
                    preferredAgentOfflineTimeout: 500
                    personalAgentOfflineTimeout: 500
                    isRestricted: false
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Queues
      summary: Create queue
      description: Create a queue.
      operationId: postQueues
      requestBody:
        description: The details for creating a queue
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateQueueInput'
            example:
              request:
                name: MyCorp main queue
                callFunctionality: false
                isDefault: true
                queueThresholds:
                  WaitingConversations: 10
                offerTimeout: 10
                offerAlgorithm: AllAtOnce
                wrapupTimeout: 10
                priority: 1
                offerAbandonedConversations: false
                doNotOfferTimeouts:
                  WidgetChat: 1
                isDoNotOfferEnabled: true
                preferredAgentTimeouts:
                  WhatsApp: 300
                  Voicemail: 300
                  WidgetChat: 300
                  FacebookMessenger: 300
                  Email: 43200
                  ContactForm: 43200
                  Callback: 300
                  PstnPhone: 300
                isPreferredAgentEnabled: false
                preferredAgentOfflineTimeout: 500
                personalAgentOfflineTimeout: 500
                isRestricted: false
        required: true
      responses:
        '201':
          description: The created queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateQueueOutput'
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/queues/{queueId}/members:
    get:
      tags:
        - Queues
      summary: List agents
      description: >-
        List all agents/admins that are members of a queue by providing the
        queue id.
      operationId: getQueuesQueueidMembers
      parameters:
        - name: queueId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: List of the agents/admins that are members of a queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueMembersOutput'
              example:
                data:
                  - agentId: e96647c1-f697-4328-868a-19f828a6ee46
                    priority: 1
                  - agentId: 95dfa97e-dbf5-4bfc-be64-1f834baebd4e
                    priority: 2
        '400':
          description: >-
            Invalid value for: path parameter queueId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Queues
      summary: Remove agents
      description: Bulk remove agents/admins from the specified queue.
      operationId: deleteQueuesQueueidMembers
      parameters:
        - name: queueId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: >-
          The list of agents/admins to be removed from the queue. Up to 10
          members can be specified.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkQueueEndpointInput'
            example:
              agentIds:
                - 743c3781-c882-4352-a1fa-fe5d7a673cfd
                - cad2f234-8cec-4cd8-96e9-a6491a0176da
        required: true
      responses:
        '204':
          description: The bulk operation succeeded
        '400':
          description: >-
            Invalid value for: path parameter queueId, Invalid value extracted
            from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - Queues
      summary: Assign agents
      description: Assign one or more agents/admins to a given queue.
      operationId: patchQueuesQueueidMembers
      parameters:
        - name: queueId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The list of agents/admins to be added to the queue
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkQueueEndpointInput'
            example:
              agentIds:
                - c31e5e3f-1d5f-4442-83df-fd7bddd59da4
                - 26ae145b-8644-4fa5-aa56-7b3dcacbe2d4
        required: true
      responses:
        '200':
          description: The list of patch action outcomes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkQueueEndpointOutput'
              example:
                data:
                  - data: b41558f2-3807-44ef-8abf-a73d5ef68ff6
                    _type: BulkActionSuccess
                  - error:
                      id: 914a6e19-cab7-41a7-b41b-517e0ed56161
                      message: User not found
                      _type: NotFound
                    _type: BulkActionFailure
                  - error:
                      id: 7fecdb7e-9e37-45ef-be5e-0c14d6687aa0
                      message: Member is neither Agent or Admin
                      _type: Validation
                    _type: BulkActionFailure
        '400':
          description: >-
            Invalid value for: path parameter queueId, Invalid value extracted
            from request context, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/queues/{queueId}/availability:
    get:
      tags:
        - Queues
        - Chatbots
      summary: Get queue availability
      description: >-
        Get availability of supported channels for a given queue. Currently
        supported channels are adachat, kindlychat, digitalgeniuschat.
      operationId: getQueuesQueueidAvailability
      parameters:
        - name: queueId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The availability of supported channels for a given queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueAvailabilityOutput'
              example:
                data:
                  - channelAvailability:
                      genericChannelName: adachat
                      availability: NotAvailable
                      queueSize: 10
                      _type: GenericChannel
                    _type: Success
                  - error:
                      channel: kindlychat
                      message: Could not get availability for channel
                      _type: UnexpectedError
                    _type: Failure
        '400':
          description: >-
            Invalid value for: path parameter queueId, Invalid value extracted
            from request context ,queue does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '409':
          description: >-
            The request could not be completed due to no supported channels
            configured for this organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Conflict'
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/queues/{queueId}:
    get:
      tags:
        - Queues
      summary: Get queue
      description: Get a queue by id.
      operationId: getQueuesQueueid
      parameters:
        - name: queueId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetQueueByIdOutput'
              example:
                data:
                  id: 0bf82493-ae46-4c49-aa29-0422136269be
                  name: MyCorp main queue
                  isDefault: true
                  organizationId: 3de6c0f1-5e84-4d29-9ce9-84033983d4e6
                  queueThresholds:
                    SlaPercentage: 10
                  slaCalculationMethod: AbandonedIgnored
                  offerTimeout: 10
                  offeringAlgorithm: OneAtATimeRandom
                  memberListType: SkillBased
                  usages:
                    queueId: 0bf82493-ae46-4c49-aa29-0422136269be
                    usages:
                      WidgetChat:
                        - c6f50127-7f0a-418f-943e-c62b96d8a742
                        - b2ac94ac-379a-4f24-995a-6473809eef6b
                      PstnPhone:
                        - '+4589977790'
                      Email:
                        - info@mycorp.dixa.io
                  wrapupTimeout: 10
                  priority: 1
                  offerAbandonedConversations: false
                  doNotOfferTimeouts:
                    WidgetChat: 1
                  isDoNotOfferEnabled: true
                  isPreferredAgentEnabled: false
                  preferredAgentTimeouts:
                    WhatsApp: 300
                    Voicemail: 300
                    WidgetChat: 300
                    FacebookMessenger: 300
                    Email: 43200
                    ContactForm: 43200
                    Callback: 300
                    PstnPhone: 300
                  preferredAgentOfflineTimeout: 500
                  personalAgentOfflineTimeout: 500
                  isRestricted: true
        '400':
          description: >-
            Invalid value for: path parameter queueId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/queues/conversation-position/{csid}:
    get:
      tags:
        - Queues
        - Chatbots
      summary: Get the position of the conversation in its current queue
      description: >-
        Get the approximate position of a given conversation in its current
        queue.
      operationId: getQueuesConversation-positionCsid
      parameters:
        - name: csid
          in: path
          required: true
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: The position of the conversation in the queue
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetQueuedConversationPositionOutput'
              example:
                data:
                  position: 10
                  queuedAt: '2021-12-01T13:00:00.003Z'
        '400':
          description: >-
            Invalid value for: path parameter csid, Invalid value extracted from
            request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/tags:
    get:
      tags:
        - Tags
      summary: List tags
      description: >-
        List all tags in an organization. Only active tags are returned by
        default. To include deactivated tags use `?includeDeactivated=true`.
      operationId: getTags
      parameters:
        - name: includeDeactivated
          in: query
          description: >-
            Whether to include deactivated tags in the response. If not
            provided, only active tags are listed.
          required: false
          schema:
            default: false
            type: boolean
      responses:
        '200':
          description: The list of all tags in an organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTagsOutput'
              example:
                data:
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
                  - id: b794a74a-625b-4303-8237-9b11668a9605
                    name: example
                    state: Active
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter includeDeactivated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Tags
      summary: Create tag
      description: Create a tag.
      operationId: postTags
      requestBody:
        description: The tag details
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagInput'
            example:
              name: test
              color: '#000000'
        required: true
      responses:
        '200':
          description: >-
            The created tag or an existing tag with the same name. Note that the
            tag is not updated to match the input in case it already exists.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTagOutput'
              example:
                data:
                  id: b794a74a-625b-4303-8237-9b11668a9605
                  name: example
                  state: Active
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/tags/{tagId}:
    get:
      tags:
        - Tags
      summary: Get tag
      description: Get a tag by id.
      operationId: getTagsTagid
      parameters:
        - name: tagId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The tag
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTagOutput'
              example:
                data:
                  id: b794a74a-625b-4303-8237-9b11668a9605
                  name: example
                  state: Active
        '400':
          description: >-
            Invalid value for: path parameter tagId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Tags
      summary: Delete tag
      description: >-
        Deletes the tag and all its associations. Note that this operation is
        irreversible.
      operationId: deleteTagsTagid
      parameters:
        - name: tagId
          in: path
          description: The tag id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The tag was successfully deleted
        '400':
          description: >-
            Invalid value for: path parameter tagId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/tags/{tagId}/deactivate:
    patch:
      tags:
        - Tags
      summary: Deactivate tag
      description: Deactivate a tag.
      operationId: patchTagsTagidDeactivate
      parameters:
        - name: tagId
          in: path
          description: The tag id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The tag was successfully deactivated
        '400':
          description: >-
            Invalid value for: path parameter tagId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/tags/{tagId}/activate:
    patch:
      tags:
        - Tags
      summary: Activate tag
      description: Activate a tag.
      operationId: patchTagsTagidActivate
      parameters:
        - name: tagId
          in: path
          description: The tag id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The tag was successfully activated
        '400':
          description: >-
            Invalid value for: path parameter tagId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/anonymization/request/{requestId}:
    get:
      tags:
        - Anonymization
      summary: Get anonymization status
      description: >-
        Retrieve an anonymization request submitted earlier (user or
        conversation).
      operationId: getAnonymizationRequestRequestid
      parameters:
        - name: requestId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The anonymization request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnonymizeEntityOutput'
              example:
                data:
                  id: 062f0b37-4de0-40f2-95a4-641435cb2869
                  entityType: UserAnonymizationType
                  _type: User
                  initiatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  targetEntityId: da9db703-4a7a-4f44-8a6a-c03b179b8ae2
                  requestedBy: bac5a02c-15b3-44da-ae1e-ab7b9db4aa89
        '400':
          description: >-
            Invalid value for: path parameter requestId, Invalid value extracted
            from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '401':
          description: >-
            The user who issued the access token used in the request is not
            authorized to perform the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
              example:
                message: User is unauthorized to perform an underlying operation
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/anonymization:
    post:
      tags:
        - Anonymization
      summary: Anonymize entity
      description: >-
        Anonymize the requested entity (user or conversation). For a
        conversation to be successfully anonymized, it should be in the status
        `closed`. Otherwise, it requires `forceAnonymization` parameter set to
        `true` in the input body. NOTE: This endpoint is deprecated. Prefer
        using the anonymization endpoints of specific resources instead.
      operationId: postAnonymization
      requestBody:
        description: A request to anonymize an entity in the system (user or conversation).
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AnonymizeEntityInput'
            example:
              entityId: a53b25da-f676-4c52-acac-58c9280aa23d
              _type: User
        required: true
      responses:
        '200':
          description: The anonymization request status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnonymizeEntityOutput'
              example:
                data:
                  id: a53b25da-f676-4c52-acac-58c9280aa23d
                  entityType: UserAnonymizationType
                  _type: User
                  initiatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  targetEntityId: 6292b720-9dbd-4ff7-8942-f4e917cc1520
                  requestedBy: 062f0b37-4de0-40f2-95a4-641435cb2869
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, The entityId doesn't match the expected format for the
            specified type, The entity type is missing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
      deprecated: true
  /beta/contact-endpoints/{contactEndpointId}:
    get:
      tags:
        - Contact Endpoints
      summary: Get contact endpoint
      description: Get contact endpoint by id (email or phone number).
      operationId: getContact-endpointsContactendpointid
      parameters:
        - name: contactEndpointId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The requested contact endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetContactPointByIdOutput'
              example:
                data:
                  address: some@email.com
                  senderOverride: otheremail@mail.dk
                  name: Special email flow
                  _type: EmailEndpoint
        '400':
          description: >-
            Invalid value extracted from request context, The contactEndpointId
            is neither a valid email nor a valid E.164 phone number
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
  /beta/contact-endpoints:
    get:
      tags:
        - Contact Endpoints
      summary: List contact endpoints
      description: List all available contact endpoints in an organization.
      operationId: getContact-endpoints
      parameters:
        - name: _type
          in: query
          description: >-
            An optional contact type can be specified to filter the contact
            endpoints. If not provided, all types are listed. Possible values:
            [EmailEndpoint, TelephonyEndpoint]
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The list of available contact endpoints
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListContactPointsOutput'
              example:
                data:
                  - number: '+4531434343'
                    functionality:
                      - VoiceInbound
                      - VoiceOutbound
                    name: DK Sms
                    _type: TelephonyEndpoint
                  - address: some@email.com
                    senderOverride: otheremail@mail.dk
                    name: Special email flow
                    _type: EmailEndpoint
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter _type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/custom-attributes/{customAttributeId}:
    get:
      tags:
        - Custom Attributes
      summary: Get custom attribute definition by id
      description: Get custom attribute in an organization by id.
      operationId: getCustom-attributesCustomattributeid
      parameters:
        - name: customAttributeId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The configured custom attribute
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCustomAttributesDefinitionsOutput'
              example:
                data:
                  id: db5f673b-1c40-41e7-b71f-caab342f0607
                  entityType: Conversation
                  identifier: contact_reason
                  label: Contact Reason
                  inputDefinition:
                    options:
                      - id: 5e2be744-cc2b-4bda-8c76-feb7b28f2970
                        label: Payment
                        value: payment
                        nestedOptions:
                          - id: 666de4d5-0c6e-421c-a25e-d53073070af4
                            label: Card
                            value: card
                            nestedOptions: []
                            isDeactivated: false
                            orderIndex: 2
                          - id: db26964a-5a88-4689-ad34-8a5f21cd9cd6
                            label: Bank Transfer
                            value: bank_transfer
                            nestedOptions: []
                            isDeactivated: false
                            orderIndex: 3
                        isDeactivated: false
                        orderIndex: 1
                      - id: 05d43b25-32a4-49e2-97c0-8723dc73f7bb
                        label: Access
                        value: access
                        nestedOptions: []
                        isDeactivated: false
                        orderIndex: 4
                    _type: Select
                  description: Reason for contacting
                  createdAt: 2023-01-05T06:42:31.532Z[GMT]
                  isRequired: true
                  isArchived: false
                  isDeactivated: false
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/custom-attributes:
    get:
      tags:
        - Custom Attributes
      summary: List custom attributes definitions
      description: List all custom attributes in an organization.
      operationId: getCustom-attributes
      responses:
        '200':
          description: The list of configured custom attributes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomAttributesDefinitionsOutput'
              example:
                data:
                  - id: c43fc767-f89b-443a-9c98-90f53f940bd7
                    entityType: Conversation
                    identifier: parcel_id
                    label: Parcel ID
                    inputDefinition:
                      placeholder: '1234'
                      _type: Text
                    description: Id of the parcel
                    createdAt: 2023-01-01T08:23:54.246Z[GMT]
                    updatedAt: 2023-01-11T12:25:23.837Z[GMT]
                    isRequired: false
                    isArchived: false
                    isDeactivated: false
                  - id: db5f673b-1c40-41e7-b71f-caab342f0607
                    entityType: Conversation
                    identifier: contact_reason
                    label: Contact Reason
                    inputDefinition:
                      options:
                        - id: 5e2be744-cc2b-4bda-8c76-feb7b28f2970
                          label: Payment
                          value: payment
                          nestedOptions:
                            - id: 666de4d5-0c6e-421c-a25e-d53073070af4
                              label: Card
                              value: card
                              nestedOptions: []
                              isDeactivated: false
                              orderIndex: 2
                            - id: db26964a-5a88-4689-ad34-8a5f21cd9cd6
                              label: Bank Transfer
                              value: bank_transfer
                              nestedOptions: []
                              isDeactivated: false
                              orderIndex: 3
                          isDeactivated: false
                          orderIndex: 1
                        - id: 05d43b25-32a4-49e2-97c0-8723dc73f7bb
                          label: Access
                          value: access
                          nestedOptions: []
                          isDeactivated: false
                          orderIndex: 4
                      _type: Select
                    description: Reason for contacting
                    createdAt: 2023-01-05T06:42:31.532Z[GMT]
                    isRequired: true
                    isArchived: false
                    isDeactivated: false
                  - id: 66121f54-98ee-4727-a4e7-1a373d411ccf
                    entityType: Contact
                    identifier: location
                    label: Location
                    inputDefinition:
                      options:
                        - id: 6c5efa22-8b49-4205-bb7c-52e86af3a369
                          label: Denmark
                          value: denmark
                          nestedOptions:
                            - id: ac4e65ea-7b84-4889-a3b5-b957926178c6
                              label: Copenhagen
                              value: copenhagen
                              nestedOptions: []
                              isDeactivated: false
                              orderIndex: 6
                            - id: 35fa047e-c1f2-4d8d-be54-2adb7d326781
                              label: Aarhus
                              value: aarhus
                              nestedOptions: []
                              isDeactivated: false
                              orderIndex: 7
                          isDeactivated: false
                          orderIndex: 5
                      _type: Select
                    description: End user's known city
                    createdAt: 2023-01-01T08:25:50.246Z[GMT]
                    updatedAt: 2023-02-01T09:01:52.2Z[GMT]
                    isRequired: false
                    isArchived: false
                    isDeactivated: false
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/search/conversations:
    get:
      tags:
        - Search
        - Conversations
      summary: Search conversations
      description: >-
        NOTE: This endpoint is deprecated and is replaced with POST
        /search/conversations. Search for conversations containing a particular
        text.
      operationId: getSearchConversations
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
        - name: query
          in: query
          description: The text by which to search conversations
          required: true
          schema:
            type: string
            minLength: 1
          example: cancel my order
        - name: exactMatch
          in: query
          description: Return only exact matches. This value is false by default.
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: The search results for the searched parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchOutput'
              example:
                data:
                  - id: 1234
                    highlights:
                      subject:
                        - <em class="highlight">Cancel my order</em>
                    innerHits:
                      - id: dadcaea0-4135-4e8a-a5bf-05d4658facba
                        highlight:
                          text: >-
                            I want to <em class="highlight">cancel my order</em>
                            as soon as possible
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: query parameter query, Invalid value
            for: query parameter exactMatch
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '401':
          description: >-
            The user who issued the access token used in the request is not
            authorized to perform the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
              example:
                message: User is unauthorized to perform an underlying operation
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
      deprecated: true
    post:
      tags:
        - Search
        - Conversations
      summary: Search conversations with filters
      description: >-
        Search for conversations containing a particular text or by filter or
        combine them both
      operationId: postSearchConversations
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      requestBody:
        description: The filters to apply to the search
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchParametersInput'
            examples:
              Find conversations that include one of two tags:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - 177e7564-6434-4177-a25a-8530089196ad
                              - 7729e7564-9876-a637-b46b-8530038196b3
                            _type: IncludesOne
                          _type: TagId
              Find conversations that contain any tags:
                value:
                  query:
                    value: order 12345
                    exactMatch: true
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            _type: IsNotEmpty
                          _type: TagId
              Find conversations that contain all specified tags and contains specific text:
                value:
                  query:
                    value: order 12345
                    exactMatch: true
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - 177e7564-6434-4177-a25a-8530089196ad
                              - 7729e7564-9876-a637-b46b-8530038196b3
                            _type: IncludesAll
                          _type: TagId
              Find conversations with custom attribute of type Text:
                value:
                  query:
                    value: delivery
                    exactMatch: true
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - - PK461926232
                              - - PK461926233
                              - - PK461926234
                            _type: IsOneOf
                          attributeId: 1fba54c0-3ef6-48c8-bf00-912c5c9890fd
                          _type: CustomAttribute
              Find conversations with custom attribute of type Select:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - - cookies
                              - - chocolate
                                - chocolate_bar
                                - with_nuts
                                - peanuts
                              - - tart
                                - nut_tart
                                - hazelnuts
                            _type: IsOneOf
                          attributeId: 30cd8aa4-3b58-4d70-a716-887dd6f348b4
                          _type: CustomAttribute
              Find conversations where custom attribute is not set:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            _type: IsEmpty
                          attributeId: 1fba54c0-3ef6-48c8-bf00-912c5c9890fd
                          _type: CustomAttribute
              Find conversations with duration between 10 and 20 seconds:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            min: 10000
                            max: 20000
                            _type: Between
                          _type: Duration
              Find conversations with last message since specified time:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            timestamp: '2023-02-11T22:59:59.999Z'
                            _type: Since
                          _type: LastMessage
              Find conversations in a specific queue and with last activity until certain date:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - 6f2e0d7f-d7e2-408e-93df-3c43f0a070c3
                            _type: IsOneOf
                          _type: QueueId
                      - field:
                          operator:
                            timestamp: '2023-02-11T22:59:59.999Z'
                            _type: Until
                          _type: LastActivity
              Find conversations with creation date between two timestamps or closed date between two timestamps:
                value:
                  filters:
                    strategy: Any
                    conditions:
                      - field:
                          operator:
                            timestampFrom: '2023-02-11T22:59:59.999Z'
                            timestampTo: '2023-02-11T23:59:59.999Z'
                            _type: Between
                          _type: CreationDate
                      - field:
                          operator:
                            timestampFrom: '2023-02-11T22:59:59.999Z'
                            timestampTo: '2023-02-11T23:59:59.999Z'
                            _type: Between
                          _type: ClosedDate
              Find conversations with direction Inbound and channel Phone or SMS:
                value:
                  filters:
                    strategy: All
                    conditions:
                      - field:
                          operator:
                            values:
                              - inbound
                            _type: IsOneOf
                          _type: Direction
                      - field:
                          operator:
                            values:
                              - phone
                              - sms
                            _type: IsOneOf
                          _type: Channel
        required: false
      responses:
        '200':
          description: The search results for the searched parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchConversationsWithFiltersOutput'
              examples:
                Results when query was not provided and next page is available:
                  value:
                    data:
                      - id: 1234
                        highlights: {}
                      - id: 2345
                        highlights: {}
                      - id: 3456
                        highlights: {}
                    meta:
                      next: >-
                        /<api-version>/search/conversations/?pageKey=cGFnZUxpbWl0PTUwJnBhZ2U9MQ%3D%3D:
                Results when query was provided and no more pages are available:
                  value:
                    data:
                      - id: 1212
                        highlights:
                          subject:
                            - <em class="highlight">Cancel my order</em>
                      - id: 1234
                        highlights:
                          subject:
                            - <em class="highlight">Cancel my order</em>
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '401':
          description: >-
            The user who issued the access token used in the request is not
            authorized to perform the operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Unauthorized'
              example:
                message: User is unauthorized to perform an underlying operation
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/webhooks/{webhookSubscriptionId}:
    get:
      tags:
        - Webhooks
      summary: Webhook Subscription
      description: Get a Webhook Subscription by ID.
      operationId: getWebhooksWebhooksubscriptionid
      parameters:
        - name: webhookSubscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The Webhook Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWebhookSubscriptionOutput'
              example:
                data:
                  id: cb452b81-6748-40ab-af85-6559b371bc5d
                  name: Dashboard Integration
                  subscribedEvents:
                    - ConversationCreated
                    - ConversationClosed
                  url: https://example.webhook/dashboard_integration
                  headers:
                    Authorization: Basic d2ViaG9va191c2VyOndlYmhvb2tfcGFzc3dvcmQ=
                  secretKey: >-
                    4g4h988p468g785965b780684bde5546c52gge658d76b4q33fb69c526ea4bdbc
                  enabled: true
                  createdAt: '2023-08-01T09:30:15Z'
                  createdBy: e979cc3b-17b2-4850-b049-13c758763d1c
                  updatedAt: '2023-08-02T15:09:30Z'
                  updatedBy: 64b777c3-eb82-49fb-bb3e-294afb5d840c
                  filters:
                    Conversation:
                      strategy: All
                      conditions:
                        - field: InitialChannel
                          values:
                            - email
                            - pstn_phone
                          _type: IsOneOf
                        - field: QueueId
                          values:
                            - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                          _type: IsNotOneOf
                      _type: CombinedFilters
        '400':
          description: >-
            Invalid value for: path parameter webhookSubscriptionId, Invalid
            value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    delete:
      tags:
        - Webhooks
      summary: Delete Webhook Subscription
      description: Delete a Webhook Subscription.
      operationId: deleteWebhooksWebhooksubscriptionid
      parameters:
        - name: webhookSubscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The Webhook Subscription was successfully deleted
        '400':
          description: >-
            Invalid value for: path parameter webhookSubscriptionId, Invalid
            value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    patch:
      tags:
        - Webhooks
      summary: Patch Webhook Subscription
      description: Patch a Webhook Subscription.
      operationId: patchWebhooksWebhooksubscriptionid
      parameters:
        - name: webhookSubscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: The Webhook Subscription fields to be patched
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchWebhookSubscriptionInput'
            example:
              name: New name
              events:
                - ConversationNoteAdded
              authorization:
                value: >-
                  eyDoiGciOqGYUzI1NiJ4.eyJ0eQJRUapoYXBpIiwib4JxA5lkIjoiNTVmMmE6MmItYjU4NF33MDMxLTk2NTktOTE2M.qPoOZoQYDn4rn-akaLmVFka15JAV7TF6QT8UHOUTIy0
                _type: TokenAuth
              customHeaders:
                X-Automation-Webhook-Token: <TOKEN>
                X-Example-Header: ExampleValue
              filters:
                Conversation:
                  strategy: All
                  conditions:
                    - field: InitialChannel
                      values:
                        - email
                        - pstn_phone
                      _type: IsOneOf
                    - field: QueueId
                      values:
                        - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                      _type: IsNotOneOf
                  _type: CombinedFilters
        required: true
      responses:
        '200':
          description: The patched Webhook Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatchWebhookSubscriptionOutput'
              example:
                data:
                  id: cb452b81-6748-40ab-af85-6559b371bc5d
                  name: New name
                  subscribedEvents:
                    - ConversationNoteAdded
                  url: https://example.webhook/dashboard_integration
                  headers:
                    Authorization: >-
                      Bearer
                      eyDoiGciOqGYUzI1NiJ4.eyJ0eQJRUapoYXBpIiwib4JxA5lkIjoiNTVmMmE6MmItYjU4NF33MDMxLTk2NTktOTE2M.qPoOZoQYDn4rn-akaLmVFka15JAV7TF6QT8UHOUTIy0
                  secretKey: >-
                    4g4h988p468g785965b780684bde5546c52gge658d76b4q33fb69c526ea4bdbc
                  enabled: true
                  createdAt: '2023-08-01T09:30:15Z'
                  createdBy: e979cc3b-17b2-4850-b049-13c758763d1c
                  updatedAt: '2023-08-02T15:09:30Z'
                  updatedBy: 64b777c3-eb82-49fb-bb3e-294afb5d840c
                  filters:
                    Conversation:
                      strategy: All
                      conditions:
                        - field: InitialChannel
                          values:
                            - email
                            - pstn_phone
                          _type: IsOneOf
                        - field: QueueId
                          values:
                            - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                          _type: IsNotOneOf
                      _type: CombinedFilters
        '400':
          description: >-
            Invalid value for: path parameter webhookSubscriptionId, Invalid
            value extracted from request context, Invalid value for: body,
            Validation failure during Webhook Subscription patching
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/webhooks:
    get:
      tags:
        - Webhooks
      summary: List all Webhook Subscriptions
      description: List of all Webhook Subscriptions in an organization.
      operationId: getWebhooks
      responses:
        '200':
          description: The List of Webhook Subscriptions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListWebhookSubscriptionsEndpointOutput'
              example:
                data:
                  - id: cb452b81-6748-40ab-af85-6559b371bc5d
                    name: Dashboard Integration
                    subscribedEvents:
                      - ConversationCreated
                      - ConversationClosed
                    url: https://example.webhook/dashboard_integration
                    headers:
                      Authorization: Basic d2ViaG9va191c2VyOndlYmhvb2tfcGFzc3dvcmQ=
                    secretKey: >-
                      4g4h988p468g785965b780684bde5546c52gge658d76b4q33fb69c526ea4bdbc
                    enabled: true
                    createdAt: '2023-08-01T09:30:15Z'
                    createdBy: e979cc3b-17b2-4850-b049-13c758763d1c
                    updatedAt: '2023-08-02T15:09:30Z'
                    updatedBy: 64b777c3-eb82-49fb-bb3e-294afb5d840c
                    filters:
                      Conversation:
                        strategy: All
                        conditions:
                          - field: InitialChannel
                            values:
                              - email
                              - pstn_phone
                            _type: IsOneOf
                          - field: QueueId
                            values:
                              - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                            _type: IsNotOneOf
                        _type: CombinedFilters
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
    post:
      tags:
        - Webhooks
      summary: Create Webhook Subscription
      description: Create a Webhook Subscription.
      operationId: postWebhooks
      requestBody:
        description: The Webhook Subscription to be created
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookSubscriptionInput'
            example:
              name: Dashboard Integration
              events:
                - ConversationCreated
                - ConversationClosed
              url: https://example.webhook/dashboard_integration
              authorization:
                username: webhook_user
                password: webhook_password
                _type: BasicAuth
              customHeaders:
                X-Automation-Webhook-Token: <TOKEN>
                X-Example-Header: ExampleValue
              enabled: true
              filters:
                Conversation:
                  strategy: All
                  conditions:
                    - field: InitialChannel
                      values:
                        - email
                        - pstn_phone
                      _type: IsOneOf
                    - field: QueueId
                      values:
                        - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                      _type: IsNotOneOf
                  _type: CombinedFilters
        required: true
      responses:
        '201':
          description: The created Webhook Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateWebhookSubscriptionOutput'
              example:
                data:
                  id: cb452b81-6748-40ab-af85-6559b371bc5d
                  name: Dashboard Integration
                  subscribedEvents:
                    - ConversationCreated
                    - ConversationClosed
                  url: https://example.webhook/dashboard_integration
                  headers:
                    Authorization: Basic d2ViaG9va191c2VyOndlYmhvb2tfcGFzc3dvcmQ=
                  secretKey: >-
                    4g4h988p468g785965b780684bde5546c52gge658d76b4q33fb69c526ea4bdbc
                  enabled: true
                  createdAt: '2023-08-01T09:30:15Z'
                  createdBy: e979cc3b-17b2-4850-b049-13c758763d1c
                  updatedAt: '2023-08-02T15:09:30Z'
                  updatedBy: 64b777c3-eb82-49fb-bb3e-294afb5d840c
                  filters:
                    Conversation:
                      strategy: All
                      conditions:
                        - field: InitialChannel
                          values:
                            - email
                            - pstn_phone
                          _type: IsOneOf
                        - field: QueueId
                          values:
                            - f0475e4c-64ae-4c8e-8644-4ed10dc8d752
                          _type: IsNotOneOf
                      _type: CombinedFilters
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            body, Validation failure during Webhook Subscription creation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/webhooks/{webhookSubscriptionId}/delivery-status:
    get:
      tags:
        - Webhooks
      summary: Webhook Subscription Last Delivery Statuses
      description: Get the latest delivery statuses of a Webhook Subscription.
      operationId: getWebhooksWebhooksubscriptionidDelivery-status
      parameters:
        - name: webhookSubscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The Latest Delivery Statuses of a Webhook Subscription
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWebhookLastDeliveryStatusOutput'
              example:
                data:
                  - event: ConversationCreated
                    deliveryStatus:
                      deliveryTimestamp: '2023-09-15T12:00:00.000Z'
                      success: true
                      responseCode: 200
                      responseText: OK
                      _type: DeliveryDetail
                  - event: ConversationClosed
                    deliveryStatus:
                      _type: NoRecentDelivery
        '400':
          description: >-
            Invalid value for: path parameter webhookSubscriptionId, Invalid
            value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/webhooks/{webhookSubscriptionId}/delivery-status/logs/{event}:
    get:
      tags:
        - Webhooks
      summary: Webhook Subscription Event Logs
      description: Get the latest Webhook Subscription Event logs.
      operationId: getWebhooksWebhooksubscriptionidDelivery-statusLogsEvent
      parameters:
        - name: webhookSubscriptionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: event
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: The Webhook Subscription Event Logs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetWebhookEventDeliveryLogsOutput'
              example:
                data:
                  - deliveryDetail:
                      deliveryTimestamp: '2023-09-15T12:00:00.000Z'
                      success: true
                      responseCode: 200
                      responseText: OK
                    payload: >-
                      { "event_id": "8967e0c6-fe64-4105-bf71-14ae0c256gg4",
                      "event_fqn": "CONVERSATION_NOTE_ADDED", "event_version":
                      "1", "event_timestamp": "2023-09-15T12:00:00.000Z",
                      "organization": { "id":
                      "g1b15dq2-bba8-48a8-a92e-852014a166r9", "name": "Your Org
                      Name" }, "data": { "conversation": { "csid": 1234,
                      "channel": "WIDGET_CHAT", "status": "OPEN", "direction":
                      "INBOUND", "queue": { "id":
                      "b5b10483-7d28-4dea-bf8d-0d88cc3bd7cc", "name": "Your
                      Queue" }, "contact_point": "Your Contact Point",
                      "requester": { "id":
                      "ec4a2b65-0403-42b3-b054-8998325fd8ac", "name": "Test
                      Requester", "email": "test@example.com", "phone": null,
                      "roles": [ "Enduser" ] }, "assignee": { "id":
                      "cccb8520-e24f-43bf-8344-49d07665d854", "name": "An
                      Agent", "email": "agent@yourcompany.com", "phone":
                      "+4511223344", "roles": [ "Admin", "TeamLead",
                      "SystemAdmin", "Agent" ] }, "subject": null, "tags": [],
                      "created_at": "2023-09-01T12:00:00.000Z" }, "note_id":
                      "ac951357-5189-4707-add7-616af55698q7", "text": "Some Note
                      Added", "created_at": "2023-09-15T12:00:00.000Z",
                      "author": { "id": "cccb8520-e24f-43bf-8344-49d07665d854",
                      "name": "An Agent", "email": "agent@yourcompany.com",
                      "phone": "+4511223344", "roles": [ "Admin", "TeamLead",
                      "SystemAdmin", "Agent" ] } } }
                  - deliveryDetail:
                      deliveryTimestamp: '2023-09-15T08:00:00.000Z'
                      success: true
                      responseCode: 200
                      responseText: OK
                    payload: >-
                      { "event_id": "9963e0c6-fe64-4105-bf71-14ae0c123hh5",
                      "event_fqn": "CONVERSATION_NOTE_ADDED", "event_version":
                      "1", "event_timestamp": "2023-09-15T08:00:00.000Z",
                      "organization": { "id":
                      "g1b15dq2-bba8-48a8-a92e-852014a166r9", "name": "Your Org
                      Name" }, "data": { "conversation": { "csid": 1234,
                      "channel": "WIDGET_CHAT", "status": "OPEN", "direction":
                      "INBOUND", "queue": { "id":
                      "b5b10483-7d28-4dea-bf8d-0d88cc3bd7cc", "name": "Your
                      Queue" }, "contact_point": "Your Contact Point",
                      "requester": { "id":
                      "ec4a2b65-0403-42b3-b054-8998325fd8ac", "name": "Test
                      Requester", "email": "test@example.com", "phone": null,
                      "roles": [ "Enduser" ] }, "assignee": { "id":
                      "cccb8520-e24f-43bf-8344-49d07665d854", "name": "An
                      Agent", "email": "agent@yourcompany.com", "phone":
                      "+4511223344", "roles": [ "Admin", "TeamLead",
                      "SystemAdmin", "Agent" ] }, "subject": null, "tags": [],
                      "created_at": "2023-09-01T12:00:00.000Z" }, "note_id":
                      "ac951357-5189-4707-add7-616af55698q7", "text": "First
                      Note", "created_at": "2023-09-15T08:00:00.000Z", "author":
                      { "id": "cccb8520-e24f-43bf-8344-49d07665d854", "name":
                      "An Agent", "email": "agent@yourcompany.com", "phone":
                      "+4511223344", "roles": [ "Admin", "TeamLead",
                      "SystemAdmin", "Agent" ] } } }
        '400':
          description: >-
            Invalid value for: path parameter webhookSubscriptionId, Invalid
            value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/templates:
    get:
      tags:
        - Templates
      summary: List templates
      description: Lists all templates belonging to an organization.
      operationId: getTemplates
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
        - name: type
          in: query
          description: Filter by template type
          required: false
          schema:
            type: string
            enum:
              - EmailAutoReply
              - QuickResponse
          example: QuickResponse
      responses:
        '200':
          description: The list of templates in an organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTemplatesOutput'
              example:
                data:
                  - id: f8e20c27-c63c-4877-b95a-09a367660578
                    name: 30-days return policyy
                    content: >-
                      Hi {{requester_firstname}},


                      When you shop at Company Name we offer a 30 day no-hassle
                      return policy


                      You're welcome!!!!


                      {{csid}}


                      regards,

                      {{agent_firstname}}
                    createdBy: 80466b45-2de8-4693-a62e-6ebacaac58d0
                    createdAt: '2017-09-27T14:27:54.371+00:00'
                    lastEditedBy: 5e8e95e3-60d3-4350-b6d7-b750728af080
                    lastEditedAt: '2024-06-21T11:43:29.877+00:00'
                    translations:
                      - locale: da
                        content: >-
                          Hej {{requester_firstname}},


                          Når du handler hos Company Name, tilbyder vi en 30
                          dages returpolitik uden besvær


                          Du er velkommen!!!!


                          {{csid}}


                          venlig hilsen,

                          {{agent_firstname}}
                        isDeactivated: false
                        subject: >-
                          30-dages returpolitik hos Company Name csid:{{csid}}
                          agent_firstname:{{agent_firstname}}
                          requester_firstname:{{requester_firstname}}
                      - locale: de-AT
                        content: >-
                          Hallo {{requester_firstname}},


                          Wenn Sie bei Company Name einkaufen, bieten wir Ihnen
                          ein 30-tägiges Rückgaberecht ohne Aufwand


                          Willkommen!!!!


                          {{csid}}


                          mit freundlichen Grüßen,

                          {{agent_firstname}}
                        isDeactivated: false
                        subject: >-
                          30-Tage-Rückgaberecht bei Company Name csid:{{csid}}
                          agent_firstname:{{agent_firstname}}
                          requester_firstname:{{requester_firstname}}
                      - locale: uz-Arab-AF
                        content: >-
                          ياخشى {{requester_firstname}},\n\nسزنىڭ دوكانىمىزدا
                          سودا قلگانىڭىز ئۈچۈن، 30 كۇنلىك قىينىقسىز قايتارىش
                          سىياسىتى تەقدىم قىلامىز\n\nخۇش
                          كەپسىز!!!!\n\n{{csid}}\n\nھۆرمەت
                          بىلەن,\n{{agent_firstname}}
                        isDeactivated: false
                        subject: >-
                          30-روزه قايتارىش سىياسىتى بۇلادى Company Name
                          csid:{{csid}} agent_firstname:{{agent_firstname}}
                          requester_firstname:{{requester_firstname}}
                    subject: >-
                      30-days return policy at Company Name csid:{{csid}}
                      agent_firstname:{{agent_firstname}}
                      requester_firstname:{{requester_firstname}}
                    _type: QuickResponse
                  - id: 08ee5fe1-11c8-4365-87c8-70da0ffd6fb4
                    name: Welcome message
                    content: >-
                      Hi {{requester_firstname}},


                      Welcome to Company Name! We're excited to have you as a
                      customer


                      {{csid}}


                      Best,

                      {{agent_firstname}}
                    createdBy: 80466b45-2de8-4693-a62e-6ebacaac58d0
                    createdAt: '2017-09-27T14:27:54.371+00:00'
                    _type: EmailAutoReply
        '400':
          description: >-
            Invalid value extracted from request context, Invalid value for:
            query parameter pageLimit, Invalid value for: query parameter
            pageKey, Invalid value for: query parameter type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/templates/{templateId}:
    delete:
      tags:
        - Templates
      summary: Delete template
      description: >-
        Deletes the template. Please make sure the template is not used in flows
        and automations as this operation is irreversible.
      operationId: deleteTemplatesTemplateid
      parameters:
        - name: templateId
          in: path
          description: The template id
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: The template was successfully deleted
        '400':
          description: >-
            Invalid value for: path parameter templateId, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/business-hours/schedules:
    get:
      tags:
        - Business Hours
      summary: List business hours schedules
      description: List business hours schedules in an organization with pagination.
      operationId: getBusiness-hoursSchedules
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBusinessHoursSchedulesOutput'
              example:
                data:
                  schedules:
                    - name: Schedule 1
                      id: b462107a-0a67-19f6-bfc0-207012e0190f
                    - name: Schedule 2
                      id: f462107a-0a57-66f6-dac0-207012e01255
                    - name: Schedule 3
                      id: e462107a-0f23-44f6-48b3-207012e0184e
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/business-hours/schedules/{scheduleId}/status:
    get:
      tags:
        - Business Hours
      summary: Check if a business is open
      description: >-
        Check if a business is open either right now or at the specified
        timestamp.
      operationId: getBusiness-hoursSchedulesScheduleidStatus
      parameters:
        - name: scheduleId
          in: path
          required: true
          schema:
            type: string
        - name: timestamp
          in: query
          description: >-
            An optional timestamp in ISO-8601 format: yyyy-MM-dd'T'HH:mm:ss'Z'
            to check if the business is open at a specific time. If not
            specified, the current time is used.
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: The business hours status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetBusinessOpenStatusOutput'
              example:
                data:
                  isOpen: true
                  timestamp: '2025-01-08T08:31:25Z'
        '400':
          description: >-
            Invalid value for: query parameter timestamp, Invalid value
            extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/collections/{collectionId}:
    get:
      tags:
        - Knowledge
      summary: Get collection
      description: Get a knowledge collection by id
      operationId: getKnowledgeCollectionsCollectionid
      parameters:
        - name: collectionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The knowledge collection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeCollectionOutput'
              example:
                data:
                  id: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
                  title: Test Collection
                  description: This is a test collection
                  internalKbEnabled: true
                  restrictions:
                    isRestricted: true
                    inheritedRestrictions:
                      - fromCollection: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/collections/{collectionId}/catalog:
    get:
      tags:
        - Knowledge
      summary: Get collection catalog
      description: Get collection catalog, including all categories and articles
      operationId: getKnowledgeCollectionsCollectionidCatalog
      parameters:
        - name: collectionId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: language
          in: query
          description: >-
            Language in which the article translations will be returned. If not
            provided, the default language will be used.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The knowledge collection catalog
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeCollectionCatalogOutput'
              example:
                data:
                  categories:
                    - id: 123e4567-e89b-12d3-a456-426614174000
                      title:
                        languageId: en
                        title: Getting Started
                      categories:
                        - id: 123e4567-e89b-12d3-a456-426614174000
                          title:
                            languageId: en
                            title: Getting Started
                          categories: []
                          articles:
                            - id: 5f2640d8-631c-4472-8d48-3de0cfd21cd0
                              title:
                                languageId: en
                                title: Getting Started
                      articles:
                        - id: 5f2640d8-631c-4472-8d48-3de0cfd21cd0
                          title:
                            languageId: en
                            title: Getting Started
                  articles:
                    - id: 5f2640d8-631c-4472-8d48-3de0cfd21cd0
                      title:
                        languageId: en
                        title: Getting Started
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/categories/{categoryId}:
    get:
      tags:
        - Knowledge
      summary: Get category
      description: Get a knowledge category by id
      operationId: getKnowledgeCategoriesCategoryid
      parameters:
        - name: categoryId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: language
          in: query
          description: >-
            Language in which the article translations will be returned. If not
            provided, the default language will be used.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The category
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeCategoryOutput'
              example:
                data:
                  id: 123e4567-e89b-12d3-a456-426614174000
                  title:
                    languageId: en
                    title: Getting Started
                  isDefaultLocation: true
                  isLocked: false
                  restrictions:
                    isRestricted: true
                    inheritedRestrictions:
                      - fromCollection: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
                  parentCategory: 222e4567-e89b-12d3-a456-426614174111
                  parentCollections:
                    - 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/categories/{categoryId}/translations:
    get:
      tags:
        - Knowledge
      summary: Get category translations
      description: Get the knowledge category translations
      operationId: getKnowledgeCategoriesCategoryidTranslations
      parameters:
        - name: categoryId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The category translations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeCategoryTranslationsOutput'
              example:
                data:
                  titles:
                    - languageId: en
                      title: Getting Started
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/articles/{articleId}:
    get:
      tags:
        - Knowledge
      summary: Get article
      description: Get a knowledge article by id
      operationId: getKnowledgeArticlesArticleid
      parameters:
        - name: articleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: language
          in: query
          description: >-
            Language in which the article translations will be returned. If not
            provided, the default language will be used.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: The knowledge article
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeArticleOutput'
              example:
                data:
                  id: 123e4567-e89b-12d3-a456-426614174000
                  isDefaultLocation: true
                  translation:
                    draft:
                      language: en
                      title: Getting Started
                      isIndexedVersion: true
                      contents:
                        html: <p>HTML content</p>
                        plaintext: plaintext content
                      availableAt:
                        helpCenterLinks:
                          - id: 112b5b9c-926a-4338-8963-0dc73d29dec7
                            name: Dixa Help Center
                            url: https://help.dixa.com
                      createdAt: 2021-12-01T12:46:36.581Z[GMT]
                      updatedAt: 2021-12-01T12:46:36.581Z[GMT]
                      createdBy: 123e4567-e89b-12d3-a456-426614174000
                      updatedBy: 123e4567-e89b-12d3-a456-426614174000
                    published:
                      language: en
                      title: Getting Started
                      isIndexedVersion: true
                      contents:
                        html: <p>HTML content</p>
                        plaintext: plaintext content
                      availableAt:
                        helpCenterLinks:
                          - id: 112b5b9c-926a-4338-8963-0dc73d29dec7
                            name: Dixa Help Center
                            url: https://help.dixa.com
                      createdAt: 2021-12-01T12:46:36.581Z[GMT]
                      updatedAt: 2021-12-01T12:46:36.581Z[GMT]
                      createdBy: 123e4567-e89b-12d3-a456-426614174000
                      updatedBy: 123e4567-e89b-12d3-a456-426614174000
                  tags:
                    - f6020a03-5a7a-4d9e-81e6-f1b76a855a5e
                  createdAt: 2021-12-01T12:46:36.581Z[GMT]
                  updatedAt: 2021-12-01T12:46:36.581Z[GMT]
                  indexedAt: 2021-12-01T12:46:36.581Z[GMT]
                  createdBy: 123e4567-e89b-12d3-a456-426614174000
                  updatedBy: 123e4567-e89b-12d3-a456-426614174000
                  ownedBy: 123e4567-e89b-12d3-a456-426614174000
                  indexedBy: 123e4567-e89b-12d3-a456-426614174000
                  restrictions:
                    isRestricted: true
                    inheritedRestrictions:
                      - fromCollection: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
                  parentCategory: 123e4567-e89b-12d3-a456-426614174000
                  parentCollections:
                    - 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/articles/{articleId}/translations:
    get:
      tags:
        - Knowledge
      summary: Get article translations
      description: Get a knowledge article translations
      operationId: getKnowledgeArticlesArticleidTranslations
      parameters:
        - name: articleId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The article translations
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeArticleTranslationsOutput'
              example:
                data:
                  translations:
                    draft:
                      - language: en
                        title: Getting Started
                        isIndexedVersion: true
                        contents:
                          html: <p>HTML content</p>
                          plaintext: plaintext content
                        availableAt:
                          helpCenterLinks:
                            - id: 112b5b9c-926a-4338-8963-0dc73d29dec7
                              name: Dixa Help Center
                              url: https://help.dixa.com
                        createdAt: 2021-12-01T12:46:36.581Z[GMT]
                        updatedAt: 2021-12-01T12:46:36.581Z[GMT]
                        createdBy: 123e4567-e89b-12d3-a456-426614174000
                        updatedBy: 123e4567-e89b-12d3-a456-426614174000
                    published:
                      - language: en
                        title: Getting Started
                        isIndexedVersion: true
                        contents:
                          html: <p>HTML content</p>
                          plaintext: plaintext content
                        availableAt:
                          helpCenterLinks:
                            - id: 112b5b9c-926a-4338-8963-0dc73d29dec7
                              name: Dixa Help Center
                              url: https://help.dixa.com
                        createdAt: 2021-12-01T12:46:36.581Z[GMT]
                        updatedAt: 2021-12-01T12:46:36.581Z[GMT]
                        createdBy: 123e4567-e89b-12d3-a456-426614174000
                        updatedBy: 123e4567-e89b-12d3-a456-426614174000
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/knowledge/collections:
    get:
      tags:
        - Knowledge
      summary: List collections
      description: Paginated list knowledge collections
      operationId: getKnowledgeCollections
      parameters:
        - name: pageLimit
          in: query
          description: >-
            Maximum number of results per page. May be used in combination with
            pageKey to change the number of results in between page requests.
          required: false
          schema:
            type: integer
            format: int32
        - name: pageKey
          in: query
          description: >-
            Base64 encoded form of pagination query parameters. Do not try to
            construct or change programmatically as the internal structure may
            change without notice.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: A list of knowledge collections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListKnowledgeCollectionsOutput'
              example:
                data:
                  - id: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
                    title: Test Collection
                    description: This is a test collection
                    internalKbEnabled: true
                    restrictions:
                      isRestricted: true
                      inheritedRestrictions:
                        - fromCollection: 78dfb531-2e1e-4ffc-bd18-fdad68cd2419
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Decoding failure in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
  /beta/organization:
    get:
      tags:
        - Organization
      summary: Get organization details
      description: >-
        Retrieves information about the organization associated with the
        provided API token
      operationId: getOrganization
      responses:
        '200':
          description: The organization details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetOrganizationOutput'
              example:
                data:
                  id: e9609fa9-efff-4fdc-a7ef-dd335f33c5f6
                  name: Example Organization
                  subdomain: example-org
                  status: Active
        '400':
          description: Invalid value extracted from request context
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              example:
                message: Invalid value in request
        '404':
          description: An entity in this request could not be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              example:
                message: The requested resource could not be found
        '500':
          description: Internal failure during request processing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerError'
              example:
                message: >-
                  There was an internal server error while processing the
                  request
components:
  schemas:
    ActivityLogAttribute:
      title: ActivityLogAttribute
      oneOf:
        - $ref: '#/components/schemas/ConversationAssignedAttribute'
        - $ref: '#/components/schemas/ConversationAutoReplySentAttribute'
        - $ref: '#/components/schemas/ConversationChannelChangedAttribute'
        - $ref: '#/components/schemas/ConversationClaimedAttribute'
        - $ref: '#/components/schemas/ConversationCreatedAttribute'
        - $ref: '#/components/schemas/ConversationCustomAttributesUpdatedAttribute'
        - $ref: '#/components/schemas/ConversationEndUserReplacedAttribute'
        - $ref: '#/components/schemas/ConversationLanguageUpdatedAttribute'
        - $ref: '#/components/schemas/ConversationLinkedAttribute'
        - $ref: '#/components/schemas/ConversationOfferedAttribute'
        - $ref: '#/components/schemas/ConversationRatedAttribute'
        - $ref: '#/components/schemas/ConversationRatingNotOfferedAttribute'
        - $ref: '#/components/schemas/ConversationRatingOfferedAttribute'
        - $ref: '#/components/schemas/ConversationRatingScheduledAttribute'
        - $ref: '#/components/schemas/ConversationReservedAttribute'
        - $ref: '#/components/schemas/ConversationResolvedStateToggledAttribute'
        - $ref: '#/components/schemas/ConversationSubjectUpdatedAttribute'
        - $ref: '#/components/schemas/ConversationTranscriptionEndedAttribute'
        - $ref: '#/components/schemas/ConversationTransferredAttribute'
        - $ref: '#/components/schemas/ConversationUnassignedAttribute'
        - $ref: '#/components/schemas/MessageAddedAttribute'
        - $ref: '#/components/schemas/MessageRedactedAttribute'
        - $ref: '#/components/schemas/NoteAddedAttribute'
        - $ref: '#/components/schemas/TagAddedAttribute'
        - $ref: '#/components/schemas/TagRemovedAttribute'
    ActivityLogEntry:
      title: ActivityLogEntry
      type: object
      required:
        - id
        - conversationId
        - activityTimestamp
        - activityType
        - _type
      properties:
        id:
          type: string
          format: uuid
        conversationId:
          type: integer
          format: int32
        activityTimestamp:
          type: string
          format: date-time
        activityType:
          $ref: '#/components/schemas/DeprecatedActivityLogType'
        _type:
          description: >-
            values: [ConversationRatingScheduled, ConversationPending,
            ConversationRatingUnscheduled, ConversationOfferRejected,
            ConversationEndUserReplaced, NoteAdded, FollowupExpired,
            ConversationRated, TagAdded, ConversationRatingNotOffered,
            ConversationOfferTimeout, ConversationChannelChanged,
            ConversationOfferAccepted, MessageAddedByCustomer,
            ConversationCreatedByCustomer, ConversationCreatedByAgent,
            ConversationUnlinkedToParent, TransferFailed, TransferSuccessful,
            ConversationTranscriptionEnded, ConversationOffered,
            ConversationUnassigned, ConversationMessageRedacted, TagRemoved,
            TransferInitiated, ConversationResolvedStateToggled,
            ConversationClaimed, ConversationReopened, ConversationClosed,
            ConversationLanguageUpdated, FollowupAdded,
            ConversationCustomAttributesUpdated, ConversationLinkedToParent,
            ConversationLinkedFromChild, ConversationAutoreplySent,
            ConversationReserved, ConversationAssigned,
            ConversationRatingOffered, ConversationUnlinkedFromChild,
            ConversationTranscriptionStarted, ConversationRatingCancelled,
            MessageAddedByAgent, FollowupRemoved]
          type: string
        author:
          $ref: '#/components/schemas/ActivityLogUser'
        attributes:
          $ref: '#/components/schemas/ActivityLogAttribute'
    ActivityLogUser:
      title: ActivityLogUser
      type: object
      required:
        - id
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
    Agent:
      title: Agent
      type: object
      required:
        - id
        - createdAt
        - displayName
        - email
      properties:
        id:
          description: Unique identifier for the agent
          type: string
          format: uuid
        createdAt:
          description: Time when the agent was created
          type: string
          format: date-time
        displayName:
          description: The agent's display name
          type: string
        email:
          description: The agent's primary email address
          type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        roles:
          description: The agent's roles
          type: array
          uniqueItems: true
          items:
            type: string
    AgentId:
      title: AgentId
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/FieldCanHaveSingleValueOrBeEmptyOperator'
    AgentOutput:
      title: AgentOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Agent'
    AgentPresenceDurationValue:
      title: AgentPresenceDurationValue
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/PresenceDuration'
        description:
          type: string
    AgentTeamsOutput:
      title: AgentTeamsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Team'
    AgentsToTeamInput:
      title: AgentsToTeamInput
      type: object
      properties:
        agentIds:
          type: array
          items:
            type: string
            format: uuid
    AggregateMetadata:
      title: AggregateMetadata
      type: object
      required:
        - measure
      properties:
        measure:
          description: >-
            values: [Min, Max, Sum, Count, Percentage, AgentPresenceDuration,
            StdDev, Average]
          type: string
        description:
          type: string
    AggregateValue:
      title: AggregateValue
      oneOf:
        - $ref: '#/components/schemas/AgentPresenceDurationValue'
        - $ref: '#/components/schemas/DoubleAggregateValue'
        - $ref: '#/components/schemas/LongAggregateValue'
    AnonymizationRequestStatus:
      title: AnonymizationRequestStatus
      type: object
      required:
        - id
        - entityType
        - _type
        - initiatedAt
        - targetEntityId
        - requestedBy
      properties:
        id:
          type: string
          format: uuid
        entityType:
          $ref: '#/components/schemas/DeprecatedAnonymizationType'
        _type:
          description: 'values: [Conversation, Message, User]'
          type: string
        initiatedAt:
          type: string
          format: date-time
        targetEntityId:
          type: string
        requestedBy:
          type: string
          format: uuid
        processedAt:
          type: string
          format: date-time
    AnonymizeEntityInput:
      title: AnonymizeEntityInput
      type: object
      required:
        - entityId
      properties:
        entityId:
          type: string
        entityType:
          $ref: '#/components/schemas/DeprecatedAnonymizationType'
        forceAnonymization:
          type: boolean
        _type:
          description: 'values: [Conversation, Message, User]'
          type: string
    AnonymizeEntityOutput:
      title: AnonymizeEntityOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/AnonymizationRequestStatus'
    AnonymizedConversation:
      title: AnonymizedConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
        - anonymizedAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        anonymizedAt:
          type: string
          format: date-time
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    Article:
      title: Article
      type: object
      required:
        - id
        - createdAt
        - updatedAt
        - restrictions
      properties:
        id:
          type: string
        isDefaultLocation:
          type: boolean
        translation:
          $ref: '#/components/schemas/Translation1'
        tags:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        indexedAt:
          type: string
          format: date-time
        createdBy:
          type: string
        updatedBy:
          type: string
        ownedBy:
          type: string
        indexedBy:
          type: string
        restrictions:
          $ref: '#/components/schemas/Restrictions'
        parentCategory:
          type: string
        parentCollections:
          type: array
          items:
            type: string
    ArticleCatalogItem:
      title: ArticleCatalogItem
      type: object
      required:
        - id
      properties:
        id:
          type: string
        title:
          $ref: '#/components/schemas/TranslationTitle'
    ArticleContent:
      title: ArticleContent
      type: object
      required:
        - html
        - plaintext
      properties:
        html:
          type: string
        plaintext:
          type: string
    ArticleTranslation:
      title: ArticleTranslation
      type: object
      required:
        - language
        - title
        - isIndexedVersion
        - contents
        - availableAt
        - createdAt
        - updatedAt
      properties:
        language:
          type: string
        title:
          type: string
        isIndexedVersion:
          type: boolean
        contents:
          $ref: '#/components/schemas/ArticleContent'
        availableAt:
          $ref: '#/components/schemas/AvailableAt'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        createdBy:
          type: string
        updatedBy:
          type: string
    ArticleTranslations:
      title: ArticleTranslations
      type: object
      required:
        - translations
      properties:
        translations:
          $ref: '#/components/schemas/TranslationList'
    AssignedDate:
      title: AssignedDate
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/TimestampOperator'
    Assignment:
      title: Assignment
      type: object
      required:
        - agentId
        - assignedAt
      properties:
        agentId:
          type: string
          format: uuid
        assignedAt:
          type: string
          format: date-time
    Attachments:
      title: Attachments
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/FileMeta'
    Attributes:
      title: Attributes
      oneOf:
        - $ref: '#/components/schemas/CallRecordingAttributes'
        - $ref: '#/components/schemas/ChatAttributes'
        - $ref: '#/components/schemas/ContactFormAttributes'
        - $ref: '#/components/schemas/EmailAttributes'
        - $ref: '#/components/schemas/FacebookMessengerAttributes'
        - $ref: '#/components/schemas/GenericAttributes'
        - $ref: '#/components/schemas/MessengerFormAttributes'
        - $ref: '#/components/schemas/PhoneAttributes'
        - $ref: '#/components/schemas/SmsAttributes'
        - $ref: '#/components/schemas/TranscriptAttributes'
        - $ref: '#/components/schemas/TwitterAttributes'
        - $ref: '#/components/schemas/WhatsAppAttributes'
    AvailableAt:
      title: AvailableAt
      type: object
      properties:
        helpCenterLinks:
          type: array
          items:
            $ref: '#/components/schemas/HelpCenterLink'
    BadRequest:
      title: BadRequest
      type: object
      required:
        - message
      properties:
        message:
          type: string
    BasicAuth:
      title: BasicAuth
      type: object
      required:
        - username
        - password
      properties:
        username:
          type: string
        password:
          type: string
    Between:
      title: Between
      description: 'Timestamps in ISO-8601 format: yyyy-MM-dd''T''HH:mm:ss''Z'' '
      type: object
      required:
        - timestampFrom
        - timestampTo
      properties:
        timestampFrom:
          type: string
          format: date-time
        timestampTo:
          type: string
          format: date-time
    Between1:
      title: Between
      description: 'min and max in milliseconds; for example: ''10800000'' (3 hours)'
      type: object
      required:
        - min
        - max
      properties:
        min:
          type: integer
          format: int64
        max:
          type: integer
          format: int64
    BooleanField:
      title: BooleanField
      type: object
      required:
        - value
      properties:
        value:
          type: boolean
    BrowserInfo:
      title: BrowserInfo
      type: object
      required:
        - name
      properties:
        name:
          type: string
        version:
          type: string
        ipAddress:
          type: string
        originatingUrl:
          type: string
    BulkActionFailure_BulkError_Agent:
      title: BulkActionFailure_BulkError_Agent
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/BulkError'
    BulkActionFailure_BulkError_EndUser:
      title: BulkActionFailure_BulkError_EndUser
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/BulkError'
    BulkActionFailure_BulkError_UUID:
      title: BulkActionFailure_BulkError_UUID
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/BulkError'
    BulkActionFailure_ErrorResponse_InternalNoteData:
      title: BulkActionFailure_ErrorResponse_InternalNoteData
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ErrorResponse'
    BulkActionOutcome_BulkError_Agent:
      title: BulkActionOutcome_BulkError_Agent
      oneOf:
        - $ref: '#/components/schemas/BulkActionFailure_BulkError_Agent'
        - $ref: '#/components/schemas/BulkActionSuccess_BulkError_Agent'
    BulkActionOutcome_BulkError_EndUser:
      title: BulkActionOutcome_BulkError_EndUser
      oneOf:
        - $ref: '#/components/schemas/BulkActionFailure_BulkError_EndUser'
        - $ref: '#/components/schemas/BulkActionSuccess_BulkError_EndUser'
    BulkActionOutcome_BulkError_UUID:
      title: BulkActionOutcome_BulkError_UUID
      oneOf:
        - $ref: '#/components/schemas/BulkActionFailure_BulkError_UUID'
        - $ref: '#/components/schemas/BulkActionSuccess_BulkError_UUID'
    BulkActionOutcome_ErrorResponse_InternalNoteData:
      title: BulkActionOutcome_ErrorResponse_InternalNoteData
      oneOf:
        - $ref: >-
            #/components/schemas/BulkActionFailure_ErrorResponse_InternalNoteData
        - $ref: >-
            #/components/schemas/BulkActionSuccess_ErrorResponse_InternalNoteData
    BulkActionSuccess_BulkError_Agent:
      title: BulkActionSuccess_BulkError_Agent
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Agent'
    BulkActionSuccess_BulkError_EndUser:
      title: BulkActionSuccess_BulkError_EndUser
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    BulkActionSuccess_BulkError_UUID:
      title: BulkActionSuccess_BulkError_UUID
      type: object
      required:
        - data
      properties:
        data:
          type: string
          format: uuid
    BulkActionSuccess_ErrorResponse_InternalNoteData:
      title: BulkActionSuccess_ErrorResponse_InternalNoteData
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/InternalNoteData'
    BulkCreateInternalNoteInput:
      title: BulkCreateInternalNoteInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CreateInternalNoteInput'
    BulkCreateNoteOutput:
      title: BulkCreateNoteOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/BulkActionOutcome_ErrorResponse_InternalNoteData
    BulkError:
      title: BulkError
      oneOf:
        - $ref: '#/components/schemas/EmptyPatchSet'
        - $ref: '#/components/schemas/ErrorResponse'
        - $ref: '#/components/schemas/Infrastructure'
        - $ref: '#/components/schemas/Integrity'
        - $ref: '#/components/schemas/NotFound1'
        - $ref: '#/components/schemas/Validation'
    BulkPatchAgentInput:
      title: BulkPatchAgentInput
      type: object
      required:
        - id
      properties:
        id:
          description: Unique identifier for the agent
          type: string
        displayName:
          description: The agent's display name
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
    BulkPatchEndUserInput:
      title: BulkPatchEndUserInput
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
        displayName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        additionalEmails:
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          type: string
        lastName:
          type: string
        middleNames:
          type: array
          items:
            type: string
        avatarUrl:
          type: string
        externalId:
          type: string
    BulkPatchEndUsersInput:
      title: BulkPatchEndUsersInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkPatchEndUserInput'
    BulkPatchEndUsersOutput:
      title: BulkPatchEndUsersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_EndUser'
    BulkQueueEndpointInput:
      title: BulkQueueEndpointInput
      type: object
      properties:
        agentIds:
          type: array
          uniqueItems: true
          items:
            type: string
            format: uuid
    BulkQueueEndpointOutput:
      title: BulkQueueEndpointOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_UUID'
    BulkTagConversationInput:
      title: BulkTagConversationInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TagConversationInput'
    BulkUpdateAgentInput:
      title: BulkUpdateAgentInput
      type: object
      required:
        - id
        - displayName
      properties:
        id:
          description: Unique identifier for the agent
          type: string
        displayName:
          description: The agent's display name
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
    BulkUpdateAgentOutput:
      title: BulkUpdateAgentOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_Agent'
    BulkUpdateEndUserInput:
      title: BulkUpdateEndUserInput
      type: object
      required:
        - id
        - displayName
      properties:
        id:
          type: string
          format: uuid
        displayName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        additionalEmails:
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          type: string
        lastName:
          type: string
        middleNames:
          type: array
          items:
            type: string
        avatarUrl:
          type: string
        externalId:
          type: string
    BulkUpdateEndUsersInput:
      title: BulkUpdateEndUsersInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkUpdateEndUserInput'
    BulkUpdateEndUsersOutput:
      title: BulkUpdateEndUsersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_EndUser'
    BusinessHoursSchedule:
      title: BusinessHoursSchedule
      type: object
      required:
        - name
        - id
      properties:
        name:
          type: string
        id:
          type: string
    CallRecordingAttributes:
      title: CallRecordingAttributes
      type: object
      required:
        - recording
      properties:
        duration:
          type: integer
          format: int32
        recording:
          type: string
    Callback:
      title: Callback
      type: object
      required:
        - requesterId
        - direction
        - contactEndpointId
        - queueId
      properties:
        requesterId:
          type: string
          format: uuid
        direction:
          description: 'values: [Inbound, Outbound]'
          type: string
        contactEndpointId:
          type: string
        queueId:
          type: string
          format: uuid
    Category:
      title: Category
      type: object
      required:
        - id
        - isLocked
        - restrictions
      properties:
        id:
          type: string
        title:
          $ref: '#/components/schemas/TranslationTitle'
        isDefaultLocation:
          type: boolean
        isLocked:
          type: boolean
        restrictions:
          $ref: '#/components/schemas/Restrictions'
        parentCategory:
          type: string
        parentCollections:
          type: array
          items:
            type: string
    CategoryCatalogItem:
      title: CategoryCatalogItem
      type: object
      required:
        - id
      properties:
        id:
          type: string
        title:
          $ref: '#/components/schemas/TranslationTitle'
        categories:
          type: array
          items:
            $ref: '#/components/schemas/CategoryCatalogItem'
        articles:
          type: array
          items:
            $ref: '#/components/schemas/ArticleCatalogItem'
    CategoryTranslations:
      title: CategoryTranslations
      type: object
      properties:
        titles:
          type: array
          items:
            $ref: '#/components/schemas/TranslationTitle'
    Channel:
      title: Channel
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/ChannelOperator'
    ChannelAvailability:
      title: ChannelAvailability
      oneOf:
        - $ref: '#/components/schemas/GenericChannel'
    ChannelAvailabilityError:
      title: ChannelAvailabilityError
      oneOf:
        - $ref: '#/components/schemas/UnexpectedError'
    ChannelAvailabilityOutcome:
      title: ChannelAvailabilityOutcome
      oneOf:
        - $ref: '#/components/schemas/Failure'
        - $ref: '#/components/schemas/Success'
    ChannelOperator:
      title: ChannelOperator
      oneOf:
        - $ref: '#/components/schemas/IsNotOneOf1'
        - $ref: '#/components/schemas/IsOneOf1'
    Chat:
      title: Chat
      type: object
      required:
        - requesterId
        - widgetId
        - message
      properties:
        requesterId:
          type: string
          format: uuid
        widgetId:
          type: string
          format: uuid
        message:
          $ref: '#/components/schemas/CreateMessageInput'
        browserInfo:
          $ref: '#/components/schemas/BrowserInfo'
        language:
          type: string
    ChatAttributes:
      title: ChatAttributes
      type: object
      required:
        - isAutomated
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        isAutomated:
          type: boolean
    ChatConversation:
      title: ChatConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        browserInfo:
          $ref: '#/components/schemas/BrowserInfo'
        language:
          type: string
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    Checksum:
      title: Checksum
      type: object
      required:
        - algorithm
        - hex
      properties:
        algorithm:
          type: string
        hex:
          type: string
    ClaimConversationInput:
      title: ClaimConversationInput
      type: object
      required:
        - agentId
      properties:
        agentId:
          description: The id of the agent who is claiming the conversation
          type: string
          format: uuid
        force:
          description: >-
            Set as false to avoid taking over the conversation if it is already
            assigned to an agent
          type: boolean
    CloseConversationInput:
      title: CloseConversationInput
      type: object
      properties:
        userId:
          type: string
          format: uuid
    ClosedDate:
      title: ClosedDate
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/TimestampOperator'
    Closing:
      title: Closing
      description: Triggers the closing of the conversation
      type: object
      required:
        - closedAt
        - closedBy
      properties:
        closedAt:
          type: string
          format: date-time
        closedBy:
          type: string
          format: uuid
    Collection:
      title: Collection
      type: object
      required:
        - id
        - title
        - internalKbEnabled
        - restrictions
      properties:
        id:
          type: string
        title:
          type: string
        description:
          type: string
        internalKbEnabled:
          type: boolean
        restrictions:
          $ref: '#/components/schemas/Restrictions'
    CollectionCatalogItem:
      title: CollectionCatalogItem
      type: object
      properties:
        categories:
          type: array
          items:
            $ref: '#/components/schemas/CategoryCatalogItem'
        articles:
          type: array
          items:
            $ref: '#/components/schemas/ArticleCatalogItem'
    CombinedFilters:
      title: CombinedFilters
      type: object
      required:
        - strategy
        - conditions
      properties:
        strategy:
          description: 'values: [All, Any]'
          type: string
        conditions:
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/Condition1'
    Condition:
      title: Condition
      type: object
      required:
        - field
      properties:
        field:
          $ref: '#/components/schemas/SearchField'
    Condition1:
      title: Condition
      oneOf:
        - $ref: '#/components/schemas/IsNotOneOf5'
        - $ref: '#/components/schemas/IsOneOf5'
    Conflict:
      title: Conflict
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ContactEndpoint:
      title: ContactEndpoint
      oneOf:
        - $ref: '#/components/schemas/EmailEndpoint'
        - $ref: '#/components/schemas/TelephonyEndpoint'
    ContactForm:
      title: ContactForm
      type: object
      required:
        - requesterId
        - emailIntegrationId
        - subject
        - message
      properties:
        requesterId:
          type: string
          format: uuid
        emailIntegrationId:
          type: string
        subject:
          type: string
        message:
          $ref: '#/components/schemas/CreateMessageInput'
        language:
          type: string
    ContactFormAttributes:
      title: ContactFormAttributes
      type: object
      required:
        - isAutoReply
      properties:
        emailContent:
          $ref: '#/components/schemas/EmailContent'
        from:
          $ref: '#/components/schemas/EmailContact'
        replyDefaultToEmails:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        to:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        isAutoReply:
          type: boolean
        inlineImages:
          type: array
          items:
            $ref: '#/components/schemas/File'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        deliveryFailureReason:
          type: string
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        originalContentUrl:
          $ref: '#/components/schemas/File'
    ContactFormConversation:
      title: ContactFormConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
        - fromEmail
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        fromEmail:
          type: string
        toEmail:
          type: string
        integrationEmail:
          type: string
        language:
          type: string
        subject:
          type: string
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    ContactId:
      title: ContactId
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/FieldHasSingleValueOperator'
    Content:
      title: Content
      oneOf:
        - $ref: '#/components/schemas/Html'
        - $ref: '#/components/schemas/Markdown'
        - $ref: '#/components/schemas/Text'
    Conversation:
      title: Conversation
      oneOf:
        - $ref: '#/components/schemas/AnonymizedConversation'
        - $ref: '#/components/schemas/ChatConversation'
        - $ref: '#/components/schemas/ContactFormConversation'
        - $ref: '#/components/schemas/EmailConversation'
        - $ref: '#/components/schemas/FacebookMessengerConversation'
        - $ref: '#/components/schemas/GenericConversation'
        - $ref: '#/components/schemas/MessengerConversation'
        - $ref: '#/components/schemas/PstnPhoneConversation'
        - $ref: '#/components/schemas/SmsConversation'
        - $ref: '#/components/schemas/TwitterConversation'
        - $ref: '#/components/schemas/WhatsAppConversation'
    ConversationAnonymizationType:
      title: ConversationAnonymizationType
      type: object
    ConversationAssignedActivityType:
      title: ConversationAssignedActivityType
      type: object
    ConversationAssignedAttribute:
      title: ConversationAssignedAttribute
      type: object
      required:
        - agentId
      properties:
        agentId:
          type: string
        agentName:
          type: string
    ConversationAutoReplySentAttribute:
      title: ConversationAutoReplySentAttribute
      type: object
      required:
        - templateName
      properties:
        templateName:
          type: string
    ConversationAutoreplySentActivityType:
      title: ConversationAutoreplySentActivityType
      type: object
    ConversationChannelChangedAttribute:
      title: ConversationChannelChangedAttribute
      type: object
      required:
        - channelReference
      properties:
        channelReference:
          type: string
    ConversationClaimedActivityType:
      title: ConversationClaimedActivityType
      type: object
    ConversationClaimedAttribute:
      title: ConversationClaimedAttribute
      type: object
      properties:
        claimedFromLabel:
          type: string
        claimedFromType:
          type: string
    ConversationClosedActivityType:
      title: ConversationClosedActivityType
      type: object
    ConversationCreatedAttribute:
      title: ConversationCreatedAttribute
      type: object
      properties:
        subject:
          type: string
    ConversationCreatedByAgentActivityType:
      title: ConversationCreatedByAgentActivityType
      type: object
    ConversationCreatedByCustomerActivityType:
      title: ConversationCreatedByCustomerActivityType
      type: object
    ConversationCustomAttributesUpdatedAttribute:
      title: ConversationCustomAttributesUpdatedAttribute
      type: object
      required:
        - updatedAttributeValues
      properties:
        updatedAttributeIds:
          type: array
          uniqueItems: true
          items:
            type: string
        updatedAttributeValues:
          $ref: '#/components/schemas/Map_AttributeValue'
    ConversationEndUserReplacedActivityType:
      title: ConversationEndUserReplacedActivityType
      type: object
    ConversationEndUserReplacedAttribute:
      title: ConversationEndUserReplacedAttribute
      type: object
      required:
        - oldUser
        - newUser
      properties:
        oldUser:
          $ref: '#/components/schemas/ActivityLogUser'
        newUser:
          $ref: '#/components/schemas/ActivityLogUser'
    ConversationFlow:
      title: ConversationFlow
      type: object
      required:
        - id
        - name
        - channel
        - contactEndpointId
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        contactEndpointId:
          type: string
    ConversationId:
      title: ConversationId
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/FieldHasSingleValueOperator'
    ConversationLanguageUpdatedActivityType:
      title: ConversationLanguageUpdatedActivityType
      type: object
    ConversationLanguageUpdatedAttribute:
      title: ConversationLanguageUpdatedAttribute
      type: object
      required:
        - language
      properties:
        language:
          type: string
    ConversationLink:
      title: ConversationLink
      oneOf:
        - $ref: '#/components/schemas/EmailForward'
        - $ref: '#/components/schemas/FollowUp'
        - $ref: '#/components/schemas/SideConversation'
    ConversationLinkedAttribute:
      title: ConversationLinkedAttribute
      type: object
      required:
        - child
        - parent
        - linkType
      properties:
        child:
          type: integer
          format: int64
        parent:
          type: integer
          format: int64
        linkType:
          type: string
    ConversationOfferAcceptedActivityType:
      title: ConversationOfferAcceptedActivityType
      type: object
    ConversationOfferRejectedActivityType:
      title: ConversationOfferRejectedActivityType
      type: object
    ConversationOfferTimeoutActivityType:
      title: ConversationOfferTimeoutActivityType
      type: object
    ConversationOfferedActivityType:
      title: ConversationOfferedActivityType
      type: object
    ConversationOfferedAttribute:
      title: ConversationOfferedAttribute
      type: object
      properties:
        agentNames:
          type: array
          items:
            type: string
        queueLabel:
          type: string
    ConversationPendingActivityType:
      title: ConversationPendingActivityType
      type: object
    ConversationRatedActivityType:
      title: ConversationRatedActivityType
      type: object
    ConversationRatedAttribute:
      title: ConversationRatedAttribute
      type: object
      properties:
        agent:
          $ref: '#/components/schemas/ActivityLogUser'
        score:
          type: integer
          format: int32
        message:
          type: string
    ConversationRating:
      title: ConversationRating
      type: object
      required:
        - id
        - ratingType
        - conversationChannel
        - userId
        - ratingStatus
        - timestamps
      properties:
        id:
          type: string
        ratingScore:
          type: integer
          format: int32
        ratingType:
          description: 'values: [Csat, Nps, ThumbsUpOrDown]'
          type: string
        ratingComment:
          type: string
        conversationChannel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        agentId:
          type: string
        userId:
          type: string
        ratingStatus:
          description: 'values: [Unscheduled, Offered, Rated, Scheduled, Cancelled]'
          type: string
        language:
          type: string
        timestamps:
          $ref: '#/components/schemas/Map_String'
    ConversationRatingCancelledActivityType:
      title: ConversationRatingCancelledActivityType
      type: object
    ConversationRatingNotOfferedAttribute:
      title: ConversationRatingNotOfferedAttribute
      type: object
      properties:
        evaluationFilters:
          type: string
    ConversationRatingOfferedActivityType:
      title: ConversationRatingOfferedActivityType
      type: object
    ConversationRatingOfferedAttribute:
      title: ConversationRatingOfferedAttribute
      type: object
      required:
        - agent
        - user
      properties:
        agent:
          $ref: '#/components/schemas/ActivityLogUser'
        user:
          $ref: '#/components/schemas/ActivityLogUser'
    ConversationRatingScheduledActivityType:
      title: ConversationRatingScheduledActivityType
      type: object
    ConversationRatingScheduledAttribute:
      title: ConversationRatingScheduledAttribute
      type: object
      required:
        - ratingScheduledTime
      properties:
        ratingScheduledTime:
          type: string
    ConversationRatingUnscheduledActivityType:
      title: ConversationRatingUnscheduledActivityType
      type: object
    ConversationReopenedActivityType:
      title: ConversationReopenedActivityType
      type: object
    ConversationReservedAttribute:
      title: ConversationReservedAttribute
      type: object
      required:
        - agent
        - queueId
        - queueName
        - reservationType
        - validUntil
      properties:
        agent:
          $ref: '#/components/schemas/ActivityLogUser'
        queueId:
          type: string
        queueName:
          type: string
        reservationType:
          type: string
        validUntil:
          type: string
    ConversationReservedType:
      title: ConversationReservedType
      type: object
    ConversationResolvedStateToggledAttribute:
      title: ConversationResolvedStateToggledAttribute
      type: object
      required:
        - isResolved
      properties:
        isResolved:
          type: boolean
    ConversationResponse:
      title: ConversationResponse
      type: object
      required:
        - id
      properties:
        id:
          type: integer
          format: int64
    ConversationSearchHit:
      title: ConversationSearchHit
      type: object
      required:
        - id
        - highlights
      properties:
        id:
          description: Identifier of a Conversation where a match was found
          type: integer
          format: int64
        highlights:
          $ref: '#/components/schemas/Map_Vector_String'
        innerHits:
          description: List of sub-entities (such as Messages) where a match was found
          deprecated: true
          type: array
          items:
            $ref: '#/components/schemas/ConversationSearchInnerHit'
    ConversationSearchInnerHit:
      title: ConversationSearchInnerHit
      type: object
      required:
        - id
        - highlight
      properties:
        id:
          description: >-
            Identifier of a sub-entity (such as a Message) where a match was
            found
          type: string
        highlight:
          $ref: '#/components/schemas/Map_String'
          description: >-
            Snippet of text where a match was found. Matched text will be
            wrapped in \<em\> tags
    ConversationSearchWithFiltersHit:
      title: ConversationSearchWithFiltersHit
      type: object
      required:
        - id
        - highlights
      properties:
        id:
          description: Identifier of a Conversation where a match was found
          type: integer
          format: int64
        highlights:
          $ref: '#/components/schemas/Map_Vector_String'
    ConversationSubjectUpdatedAttribute:
      title: ConversationSubjectUpdatedAttribute
      type: object
      required:
        - oldSubject
        - newSubject
      properties:
        oldSubject:
          type: string
        newSubject:
          type: string
    ConversationTagsOutput:
      title: ConversationTagsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
    ConversationTranscriptionEndedActivityType:
      title: ConversationTranscriptionEndedActivityType
      type: object
    ConversationTranscriptionEndedAttribute:
      title: ConversationTranscriptionEndedAttribute
      type: object
      required:
        - isSuccessful
      properties:
        isSuccessful:
          type: boolean
        failureReason:
          type: string
    ConversationTranscriptionStartedActivityType:
      title: ConversationTranscriptionStartedActivityType
      type: object
    ConversationTransferredAttribute:
      title: ConversationTransferredAttribute
      type: object
      required:
        - transferType
        - destinationType
        - destinationId
      properties:
        transferType:
          type: string
        destinationType:
          type: string
        destinationId:
          type: string
        destinationLabel:
          type: string
        reason:
          type: string
    ConversationUnassignedActivityType:
      title: ConversationUnassignedActivityType
      type: object
    ConversationUnassignedAttribute:
      title: ConversationUnassignedAttribute
      type: object
      required:
        - agent
      properties:
        agent:
          $ref: '#/components/schemas/ActivityLogUser'
    CreateAgentInput:
      title: CreateAgentInput
      type: object
      required:
        - displayName
        - email
      properties:
        displayName:
          description: The agent's display name
          type: string
        email:
          description: The agent's primary email address
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
    CreateAgentsInput:
      title: CreateAgentsInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CreateAgentInput'
    CreateAgentsOutput:
      title: CreateAgentsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_Agent'
    CreateConversationInput:
      title: CreateConversationInput
      oneOf:
        - $ref: '#/components/schemas/Callback'
        - $ref: '#/components/schemas/Chat'
        - $ref: '#/components/schemas/ContactForm'
        - $ref: '#/components/schemas/Email'
        - $ref: '#/components/schemas/Sms'
    CreateConversationOutput:
      title: CreateConversationOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ConversationResponse'
    CreateEndUserInput:
      title: CreateEndUserInput
      type: object
      properties:
        displayName:
          description: The contact's display name
          type: string
        email:
          description: The contact's primary email address
          type: string
        phoneNumber:
          description: The contact's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the contact
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the contact
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The contact's first name
          type: string
        lastName:
          description: The contact's last name
          type: string
        middleNames:
          description: The contact's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the contact's avatar
          type: string
        externalId:
          description: Custom external identifier for the contact
          type: string
    CreateEndUserOutput:
      title: CreateEndUserOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    CreateEndUsersInput:
      title: CreateEndUsersInput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CreateEndUserInput'
    CreateEndUsersOutput:
      title: CreateEndUsersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionOutcome_BulkError_EndUser'
    CreateInternalNoteInput:
      title: CreateInternalNoteInput
      type: object
      required:
        - message
      properties:
        message:
          type: string
        agentId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
    CreateMessageInput:
      title: CreateMessageInput
      description: Only Outbound messages are supported for Sms and Whatsapp.
      oneOf:
        - $ref: '#/components/schemas/Inbound'
        - $ref: '#/components/schemas/Outbound'
    CreateMessageOutput:
      title: CreateMessageOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CreateMessageOutputData'
    CreateMessageOutputData:
      title: CreateMessageOutputData
      type: object
      required:
        - content
        - direction
        - authorId
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        authorId:
          type: string
          format: uuid
        externalId:
          type: string
        messageId:
          type: string
          format: uuid
        createdAt:
          type: string
    CreateNoteOutput:
      title: CreateNoteOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/InternalNoteData'
    CreateOrUpdateQueueRequest:
      title: CreateOrUpdateQueueRequest
      type: object
      required:
        - name
        - callFunctionality
        - isDefault
        - isDoNotOfferEnabled
      properties:
        name:
          type: string
        callFunctionality:
          type: boolean
        isDefault:
          type: boolean
        queueThresholds:
          $ref: '#/components/schemas/Map_QueueThreshold_Int'
        offerTimeout:
          type: integer
          format: int32
        offerAlgorithm:
          description: >-
            values: [AgentPriorityOneAtATimeRandom, AllAtOnce,
            AgentPriorityLongestIdle, AgentPriorityAllAtOnce, LongestIdle,
            OneAtATimeRandom]
          type: string
        wrapupTimeout:
          type: integer
          format: int32
        priority:
          type: integer
          format: int32
        offerAbandonedConversations:
          type: boolean
        doNotOfferTimeouts:
          $ref: '#/components/schemas/Map_ConversationChannel_Int'
        isDoNotOfferEnabled:
          type: boolean
        preferredAgentTimeouts:
          $ref: '#/components/schemas/Map_ConversationChannel_Int'
        isPreferredAgentEnabled:
          type: boolean
        preferredAgentOfflineTimeout:
          type: integer
          format: int32
        personalAgentOfflineTimeout:
          type: integer
          format: int32
        isRestricted:
          type: boolean
    CreateQueueInput:
      title: CreateQueueInput
      type: object
      required:
        - request
      properties:
        request:
          $ref: '#/components/schemas/CreateOrUpdateQueueRequest'
    CreateQueueOutput:
      title: CreateQueueOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Queue1'
    CreateRatingOfferInput:
      title: CreateRatingOfferInput
      type: object
      required:
        - userId
        - agentId
        - ratingType
      properties:
        userId:
          type: string
        agentId:
          description: >-
            Please note that providing agentId that is not part of the
            conversation may skew metrics in Intelligence
          type: string
        ratingType:
          description: 'The type of numeric rating. E.g.: ''Csat'', ''ThumbsUpOrDown'', ''Nps''.'
          type: string
        offeredAt:
          type: string
          format: date-time
    CreateRatingOfferOutput:
      title: CreateRatingOfferOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/RatingOffer'
    CreateRatingResultInput:
      title: CreateRatingResultInput
      type: object
      required:
        - ratingResult
      properties:
        userId:
          description: >-
            The userId property is no longer used so it's made optional to keep
            backwards compatibility. A null value can be provided instead of an
            actual ID.
          deprecated: true
          type: string
        ratingResult:
          $ref: '#/components/schemas/SubmittedRatingResult'
        comment:
          type: string
        submittedAt:
          type: string
          format: date-time
    CreateRatingResultOutput:
      title: CreateRatingResultOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/RatingResult'
    CreateTagInput:
      title: CreateTagInput
      type: object
      required:
        - name
      properties:
        name:
          type: string
        color:
          type: string
    CreateTagOutput:
      title: CreateTagOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Tag'
    CreateTeamInput:
      title: CreateTeamInput
      type: object
      required:
        - name
      properties:
        name:
          type: string
    CreateTeamOutput:
      title: CreateTeamOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Team1'
    CreateWebhookSubscriptionInput:
      title: CreateWebhookSubscriptionInput
      type: object
      required:
        - name
        - url
        - authorization
        - customHeaders
      properties:
        name:
          description: The Webhook Subscription name
          type: string
        events:
          description: >-
            The set of events this Webhook Subscription subscribes to. Allowed
            values: [ConversationPending, AgentUnbannedEnduser,
            ConversationMessageAdded, ConversationAssigned,
            ConversationMessageDeliveryDelivered,
            ConversationMessageDeliveryInfo, ConversationTransferred,
            ConversationEnqueued, ConversationCreated, ConversationUnassigned,
            ConversationOpen, ConversationAbandoned, ConversationClosed,
            ConversationMessageDeliveryFailed, ConversationTagAdded,
            ConversationNoteAdded, AgentBannedEnduser,
            ConversationEndUserReplaced, ConversationMessageDeliverySeen,
            AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
            ConversationTagRemoved, ConversationRated,
            ConversationMessageDeliverySpamComplaint,
            ConversationPendingExpired]
          type: array
          uniqueItems: true
          items:
            description: >-
              values: [ConversationPending, AgentUnbannedEnduser,
              ConversationMessageAdded, ConversationAssigned,
              ConversationMessageDeliveryDelivered,
              ConversationMessageDeliveryInfo, ConversationTransferred,
              ConversationEnqueued, ConversationCreated, ConversationUnassigned,
              ConversationOpen, ConversationAbandoned, ConversationClosed,
              ConversationMessageDeliveryFailed, ConversationTagAdded,
              ConversationNoteAdded, AgentBannedEnduser,
              ConversationEndUserReplaced, ConversationMessageDeliverySeen,
              AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
              ConversationTagRemoved, ConversationRated,
              ConversationMessageDeliverySpamComplaint,
              ConversationPendingExpired]
            type: string
        url:
          description: URL of the server that the webhook request should be sent to
          type: string
        authorization:
          $ref: '#/components/schemas/WebhookAuthorization'
        customHeaders:
          $ref: '#/components/schemas/Map_String'
          description: Custom headers that will be added to the webhook request
        enabled:
          description: >-
            Defines whether this Webhook Subscription is enabled or disabled.
            Default is `true`
          type: boolean
        filters:
          $ref: '#/components/schemas/Map_WebhookEventType_Filters'
          description: >-
            Filters to be applied to the events of the Webhook Subscription,
            only filtered events will be sent out. Filters can target a
            conversation channel, queue...
    CreateWebhookSubscriptionOutput:
      title: CreateWebhookSubscriptionOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WebhookSubscription'
    CreationDate:
      title: CreationDate
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/TimestampOperator'
    Csat:
      title: Csat
      type: object
      required:
        - value
      properties:
        value:
          description: >-
            Numeric value between 1 and 5 representing the customer's
            satisfaction level.
          type: integer
          format: int32
    CustomAttribute:
      title: CustomAttribute
      type: object
      required:
        - id
        - name
        - identifier
        - value
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        identifier:
          type: string
        value:
          description: >-
            AttributeValue values: String[] if the type of the custom attribute
            is Select or String if the type of the custom attribute is Text
          oneOf:
            - type: array
              items:
                type: string
            - type: string
    CustomAttribute1:
      title: CustomAttribute
      type: object
      required:
        - operator
        - attributeId
      properties:
        operator:
          $ref: '#/components/schemas/CustomAttributeOperator'
        attributeId:
          type: string
    CustomAttributeDefinition:
      title: CustomAttributeDefinition
      type: object
      required:
        - id
        - entityType
        - identifier
        - label
        - inputDefinition
        - createdAt
        - isRequired
        - isArchived
        - isDeactivated
      properties:
        id:
          type: string
          format: uuid
        entityType:
          description: 'values: [Contact, Conversation]'
          type: string
        identifier:
          type: string
        label:
          type: string
        inputDefinition:
          $ref: '#/components/schemas/CustomAttributeInputDefinition'
        description:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        isRequired:
          type: boolean
        isArchived:
          type: boolean
        isDeactivated:
          type: boolean
    CustomAttributeInputDefinition:
      title: CustomAttributeInputDefinition
      oneOf:
        - $ref: '#/components/schemas/Select1'
        - $ref: '#/components/schemas/Text2'
    CustomAttributeOperator:
      title: CustomAttributeOperator
      oneOf:
        - $ref: '#/components/schemas/IsEmpty'
        - $ref: '#/components/schemas/IsNotEmpty'
        - $ref: '#/components/schemas/IsNotOneOf2'
        - $ref: '#/components/schemas/IsOneOf2'
    DeleteAgentsFromTeamInput:
      title: DeleteAgentsFromTeamInput
      type: object
      properties:
        agentIds:
          type: array
          items:
            type: string
            format: uuid
    DeliveryDetail:
      title: DeliveryDetail
      type: object
      required:
        - deliveryTimestamp
        - success
        - responseCode
        - responseText
      properties:
        deliveryTimestamp:
          type: string
        success:
          type: boolean
        responseCode:
          type: integer
          format: int32
        responseText:
          type: string
    DeliveryStatus:
      title: DeliveryStatus
      oneOf:
        - $ref: '#/components/schemas/DeliveryDetail'
        - $ref: '#/components/schemas/NoRecentDelivery'
    DeprecatedActivityLogType:
      title: DeprecatedActivityLogType
      description: Replaced by _type field
      deprecated: true
      oneOf:
        - $ref: '#/components/schemas/ConversationAssignedActivityType'
        - $ref: '#/components/schemas/ConversationAutoreplySentActivityType'
        - $ref: '#/components/schemas/ConversationClaimedActivityType'
        - $ref: '#/components/schemas/ConversationClosedActivityType'
        - $ref: '#/components/schemas/ConversationCreatedByAgentActivityType'
        - $ref: '#/components/schemas/ConversationCreatedByCustomerActivityType'
        - $ref: '#/components/schemas/ConversationEndUserReplacedActivityType'
        - $ref: '#/components/schemas/ConversationLanguageUpdatedActivityType'
        - $ref: '#/components/schemas/ConversationOfferAcceptedActivityType'
        - $ref: '#/components/schemas/ConversationOfferRejectedActivityType'
        - $ref: '#/components/schemas/ConversationOfferTimeoutActivityType'
        - $ref: '#/components/schemas/ConversationOfferedActivityType'
        - $ref: '#/components/schemas/ConversationPendingActivityType'
        - $ref: '#/components/schemas/ConversationRatedActivityType'
        - $ref: '#/components/schemas/ConversationRatingCancelledActivityType'
        - $ref: '#/components/schemas/ConversationRatingOfferedActivityType'
        - $ref: '#/components/schemas/ConversationRatingScheduledActivityType'
        - $ref: '#/components/schemas/ConversationRatingUnscheduledActivityType'
        - $ref: '#/components/schemas/ConversationReopenedActivityType'
        - $ref: '#/components/schemas/ConversationReservedType'
        - $ref: '#/components/schemas/ConversationTranscriptionEndedActivityType'
        - $ref: '#/components/schemas/ConversationTranscriptionStartedActivityType'
        - $ref: '#/components/schemas/ConversationUnassignedActivityType'
        - $ref: '#/components/schemas/FollowupAddedActivityType'
        - $ref: '#/components/schemas/FollowupExpiredActivityType'
        - $ref: '#/components/schemas/FollowupRemovedActivityType'
        - $ref: '#/components/schemas/MessageAddedByAgentActivityType'
        - $ref: '#/components/schemas/MessageAddedByCustomerActivityType'
        - $ref: '#/components/schemas/NoteAddedActivityType'
        - $ref: '#/components/schemas/TagAddedActivityType'
        - $ref: '#/components/schemas/TagRemovedActivityType'
        - $ref: '#/components/schemas/TransferFailedActivityType'
        - $ref: '#/components/schemas/TransferInitiatedActivityType'
        - $ref: '#/components/schemas/TransferSuccessfulActivityType'
        - $ref: '#/components/schemas/UnknownActivityType'
    DeprecatedAnonymizationType:
      title: DeprecatedAnonymizationType
      description: Replaced by _type field
      deprecated: true
      oneOf:
        - $ref: '#/components/schemas/ConversationAnonymizationType'
        - $ref: '#/components/schemas/MessageAnonymizationType'
        - $ref: '#/components/schemas/UnknownAnonymizationType'
        - $ref: '#/components/schemas/UserAnonymizationType'
    Direction:
      title: Direction
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/DirectionOperator'
    DirectionOperator:
      title: DirectionOperator
      oneOf:
        - $ref: '#/components/schemas/IsNotOneOf3'
        - $ref: '#/components/schemas/IsOneOf3'
    DoubleAggregateValue:
      title: DoubleAggregateValue
      type: object
      required:
        - value
        - measure
      properties:
        value:
          type: number
          format: double
        measure:
          description: >-
            values: [Min, Max, Sum, Percentage, AgentPresenceDuration, StdDev,
            Average]
          type: string
    DoubleField:
      title: DoubleField
      type: object
      required:
        - value
      properties:
        value:
          type: number
          format: double
    Duration:
      title: Duration
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/DurationOperator'
    DurationOperator:
      title: DurationOperator
      oneOf:
        - $ref: '#/components/schemas/Between1'
        - $ref: '#/components/schemas/LongerThanOrEqualTo'
        - $ref: '#/components/schemas/ShorterThanOrEqualTo'
    Email:
      title: Email
      type: object
      required:
        - requesterId
        - emailIntegrationId
        - subject
        - message
      properties:
        requesterId:
          type: string
          format: uuid
        emailIntegrationId:
          type: string
        subject:
          type: string
        message:
          $ref: '#/components/schemas/CreateMessageInput'
        language:
          type: string
    EmailAttributes:
      title: EmailAttributes
      type: object
      required:
        - from
        - isAutoReply
      properties:
        emailContent:
          $ref: '#/components/schemas/EmailContent'
        from:
          $ref: '#/components/schemas/EmailContact'
        to:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/EmailContact'
        isAutoReply:
          type: boolean
        inlineImages:
          type: array
          items:
            $ref: '#/components/schemas/File'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        deliveryFailureReason:
          type: string
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        originalContentUrl:
          $ref: '#/components/schemas/File'
    EmailAutoReply:
      title: EmailAutoReply
      type: object
      required:
        - id
        - name
        - content
        - createdBy
        - createdAt
      properties:
        id:
          type: string
        name:
          type: string
        content:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
        lastEditedBy:
          type: string
        lastEditedAt:
          type: string
        translations:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Translation'
        subject:
          type: string
    EmailContact:
      title: EmailContact
      type: object
      required:
        - email
      properties:
        email:
          type: string
        name:
          type: string
    EmailContent:
      title: EmailContent
      oneOf:
        - $ref: '#/components/schemas/Regular'
        - $ref: '#/components/schemas/TooLarge'
    EmailConversation:
      title: EmailConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
        - toEmail
        - fromEmail
        - integrationEmail
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        toEmail:
          type: string
        fromEmail:
          type: string
        integrationEmail:
          type: string
        language:
          type: string
        subject:
          type: string
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    EmailEndpoint:
      title: EmailEndpoint
      type: object
      required:
        - address
      properties:
        address:
          type: string
        senderOverride:
          type: string
        name:
          type: string
    EmailForward:
      title: EmailForward
      type: object
      required:
        - parentId
      properties:
        parentId:
          type: integer
          format: int64
    EmptyPatchSet:
      title: EmptyPatchSet
      type: object
      required:
        - id
        - message
      properties:
        id:
          type: string
        message:
          type: string
    EndUser:
      title: EndUser
      type: object
      required:
        - id
        - createdAt
      properties:
        id:
          description: Unique identifier for the contact
          type: string
          format: uuid
        createdAt:
          description: Time when the contact was created
          type: string
          format: date-time
        displayName:
          description: The contact's display name
          type: string
        email:
          description: The contact's primary email address
          type: string
        phoneNumber:
          description: The contact's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the contact
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the contact
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The contact's first name
          type: string
        lastName:
          description: The contact's last name
          type: string
        middleNames:
          description: The contact's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the contact's avatar
          type: string
        externalId:
          description: Custom external identifier for the contact
          type: string
        customAttributes:
          description: Custom attributes for the contact
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
    ErrorResponse:
      title: ErrorResponse
      type: object
      required:
        - message
      properties:
        message:
          type: string
    EventDeliveryLog:
      title: EventDeliveryLog
      type: object
      required:
        - deliveryDetail
        - payload
      properties:
        deliveryDetail:
          $ref: '#/components/schemas/DeliveryDetail'
        payload:
          type: string
    EventDeliveryStatus:
      title: EventDeliveryStatus
      type: object
      required:
        - event
        - deliveryStatus
      properties:
        event:
          description: >-
            values: [ConversationPending, AgentUnbannedEnduser,
            ConversationMessageAdded, ConversationAssigned,
            ConversationMessageDeliveryDelivered,
            ConversationMessageDeliveryInfo, ConversationTransferred,
            ConversationEnqueued, ConversationCreated, ConversationUnassigned,
            ConversationOpen, ConversationAbandoned, ConversationClosed,
            ConversationMessageDeliveryFailed, ConversationTagAdded,
            ConversationNoteAdded, AgentBannedEnduser,
            ConversationEndUserReplaced, ConversationMessageDeliverySeen,
            AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
            ConversationTagRemoved, ConversationRated,
            ConversationMessageDeliverySpamComplaint,
            ConversationPendingExpired]
          type: string
        deliveryStatus:
          $ref: '#/components/schemas/DeliveryStatus'
    ExcludesAll:
      title: ExcludesAll
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    ExcludesOne:
      title: ExcludesOne
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    FacebookMessengerAttributes:
      title: FacebookMessengerAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
    FacebookMessengerConversation:
      title: FacebookMessengerConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    Failure:
      title: Failure
      type: object
      required:
        - error
      properties:
        error:
          $ref: '#/components/schemas/ChannelAvailabilityError'
    Field:
      title: Field
      type: object
      required:
        - name
      properties:
        name:
          type: string
        field:
          $ref: '#/components/schemas/FieldType'
    FieldCanHaveMultipleValuesOrBeEmptyOperator:
      title: FieldCanHaveMultipleValuesOrBeEmptyOperator
      oneOf:
        - $ref: '#/components/schemas/ExcludesAll'
        - $ref: '#/components/schemas/ExcludesOne'
        - $ref: '#/components/schemas/IncludesAll'
        - $ref: '#/components/schemas/IncludesOne'
        - $ref: '#/components/schemas/IsEmpty'
        - $ref: '#/components/schemas/IsNotEmpty'
    FieldCanHaveSingleValueOrBeEmptyOperator:
      title: FieldCanHaveSingleValueOrBeEmptyOperator
      oneOf:
        - $ref: '#/components/schemas/IsEmpty'
        - $ref: '#/components/schemas/IsNotEmpty'
        - $ref: '#/components/schemas/IsNotOneOf'
        - $ref: '#/components/schemas/IsOneOf'
    FieldHasSingleValueOperator:
      title: FieldHasSingleValueOperator
      oneOf:
        - $ref: '#/components/schemas/IsNotOneOf'
        - $ref: '#/components/schemas/IsOneOf'
    FieldMetadata:
      title: FieldMetadata
      type: object
      required:
        - field
        - description
        - nullable
      properties:
        field:
          type: string
        description:
          type: string
        nullable:
          type: boolean
    FieldType:
      title: FieldType
      oneOf:
        - $ref: '#/components/schemas/BooleanField'
        - $ref: '#/components/schemas/DoubleField'
        - $ref: '#/components/schemas/InstantField'
        - $ref: '#/components/schemas/IntField'
        - $ref: '#/components/schemas/ListField'
        - $ref: '#/components/schemas/LongField'
        - $ref: '#/components/schemas/StringField'
        - $ref: '#/components/schemas/TimestampField'
        - $ref: '#/components/schemas/UUIDField'
    File:
      title: File
      type: object
      required:
        - url
      properties:
        url:
          description: url
          type: string
        prettyName:
          type: string
    FileMeta:
      title: FileMeta
      type: object
      required:
        - url
        - name
        - mediaType
        - bytesLength
        - checksum
      properties:
        url:
          type: string
        name:
          type: string
        mediaType:
          $ref: '#/components/schemas/MimeType'
        bytesLength:
          type: integer
          format: int64
        checksum:
          $ref: '#/components/schemas/Checksum'
    Filter:
      title: Filter
      type: object
      required:
        - attribute
      properties:
        attribute:
          type: string
        values:
          type: array
          items:
            type: string
    FilterMetadata:
      title: FilterMetadata
      type: object
      required:
        - filterAttribute
      properties:
        filterAttribute:
          type: string
        description:
          type: string
    FilterValue:
      title: FilterValue
      type: object
      required:
        - value
      properties:
        value:
          type: string
        label:
          type: string
    Filters:
      title: Filters
      type: object
      required:
        - strategy
      properties:
        strategy:
          description: 'values: [All, Any]'
          type: string
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/Condition'
    Filters1:
      title: Filters
      oneOf:
        - $ref: '#/components/schemas/CombinedFilters'
    FollowUp:
      title: FollowUp
      type: object
      required:
        - parentId
      properties:
        parentId:
          type: integer
          format: int64
    FollowupAddedActivityType:
      title: FollowupAddedActivityType
      type: object
    FollowupConversationInput:
      title: FollowupConversationInput
      type: object
      required:
        - timestamp
      properties:
        timestamp:
          description: A timestamp for when the followup should expire
          type: string
          format: date-time
        userId:
          description: An optional agent/admin to followup the conversation
          type: string
          format: uuid
    FollowupExpiredActivityType:
      title: FollowupExpiredActivityType
      type: object
    FollowupRemovedActivityType:
      title: FollowupRemovedActivityType
      type: object
    FormAttributeValue:
      title: FormAttributeValue
      oneOf:
        - $ref: '#/components/schemas/Attachments'
        - $ref: '#/components/schemas/Select'
        - $ref: '#/components/schemas/Text1'
    FormSubmission:
      title: FormSubmission
      type: object
      required:
        - values
      properties:
        values:
          $ref: '#/components/schemas/Map_FormAttributeValue'
    GenericAttributes:
      title: GenericAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
    GenericChannel:
      title: GenericChannel
      type: object
      required:
        - genericChannelName
        - availability
      properties:
        genericChannelName:
          type: string
        availability:
          description: 'values: [Available, NotAvailable]'
          type: string
        queueSize:
          description: >-
            The number of conversations currently waiting in the queue. This
            field will only be present if the queue availability is
            NotAvailable.
          type: integer
          format: int32
    GenericConversation:
      title: GenericConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        fromContactPointId:
          type: string
        toContactPointId:
          type: string
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    GenericConversationImport:
      title: GenericConversationImport
      type: object
      required:
        - genericChannelName
        - requesterId
        - direction
        - createdAt
      properties:
        genericChannelName:
          description: >-
            The conversation channel. Currently supported values are 'email' and
            'widgetchat'. See payload examples for each case.
          type: string
        requesterId:
          type: string
          format: uuid
        requesterConnectionStatus:
          description: 'values: [Connected, Disconnected]'
          type: string
        direction:
          description: 'values: [Inbound, Outbound]'
          type: string
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ImportMessageInput'
        createdAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        externalId:
          type: string
        closing:
          $ref: '#/components/schemas/Closing'
        attributes:
          description: >-
            A set of dynamic attributes that are specific to the conversation
            channel, but not limited to it. See channel specific examples for
            your use case.
    GetActivityLogOutput:
      title: GetActivityLogOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActivityLogEntry'
    GetBusinessOpenStatusOutput:
      title: GetBusinessOpenStatusOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/GetBusinessOpenStatusResult'
    GetBusinessOpenStatusResult:
      title: GetBusinessOpenStatusResult
      type: object
      required:
        - isOpen
        - timestamp
      properties:
        isOpen:
          type: boolean
        timestamp:
          type: string
          format: date-time
    GetContactPointByIdOutput:
      title: GetContactPointByIdOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ContactEndpoint'
    GetConversationOutput:
      title: GetConversationOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Conversation'
    GetCustomAttributesDefinitionsOutput:
      title: GetCustomAttributesDefinitionsOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CustomAttributeDefinition'
    GetEndUserOutput:
      title: GetEndUserOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    GetFilterValuesOutput:
      title: GetFilterValuesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/FilterValue'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    GetKnowledgeArticleOutput:
      title: GetKnowledgeArticleOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Article'
    GetKnowledgeArticleTranslationsOutput:
      title: GetKnowledgeArticleTranslationsOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ArticleTranslations'
    GetKnowledgeCategoryOutput:
      title: GetKnowledgeCategoryOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Category'
    GetKnowledgeCategoryTranslationsOutput:
      title: GetKnowledgeCategoryTranslationsOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CategoryTranslations'
    GetKnowledgeCollectionCatalogOutput:
      title: GetKnowledgeCollectionCatalogOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/CollectionCatalogItem'
    GetKnowledgeCollectionOutput:
      title: GetKnowledgeCollectionOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Collection'
    GetMetricDataInput:
      title: GetMetricDataInput
      oneOf:
        - $ref: '#/components/schemas/GetMetricDataInputCsidFilter'
        - $ref: '#/components/schemas/GetMetricDataInputPeriodFilter'
    GetMetricDataInputCsidFilter:
      title: GetMetricDataInputCsidFilter
      type: object
      required:
        - id
        - timezone
      properties:
        id:
          type: string
        csidFilter:
          type: array
          minItems: 1
          items:
            type: integer
            format: int64
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
        aggregations:
          type: array
          items:
            description: >-
              values: [Min, Max, Sum, Count, Percentage, AgentPresenceDuration,
              StdDev, Average]
            type: string
        timezone:
          type: string
    GetMetricDataInputPeriodFilter:
      title: GetMetricDataInputPeriodFilter
      type: object
      required:
        - id
        - periodFilter
        - timezone
      properties:
        id:
          type: string
        periodFilter:
          $ref: '#/components/schemas/PeriodFilter'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
        aggregations:
          type: array
          items:
            description: >-
              values: [Min, Max, Sum, Count, Percentage, AgentPresenceDuration,
              StdDev, Average]
            type: string
        timezone:
          type: string
    GetMetricDataOutput:
      title: GetMetricDataOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/MetricData'
    GetMetricOutput:
      title: GetMetricOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/MetricMetadata'
    GetMetricRecordOutput:
      title: GetMetricRecordOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/MetricRecordMetadata'
    GetMetricRecordsDataInput:
      title: GetMetricRecordsDataInput
      oneOf:
        - $ref: '#/components/schemas/GetMetricRecordsDataInputCsidFilter'
        - $ref: '#/components/schemas/GetMetricRecordsDataInputPeriodFilter'
    GetMetricRecordsDataInputCsidFilter:
      title: GetMetricRecordsDataInputCsidFilter
      type: object
      required:
        - id
        - timezone
      properties:
        id:
          type: string
        csidFilter:
          type: array
          minItems: 1
          items:
            type: integer
            format: int64
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
        timezone:
          type: string
    GetMetricRecordsDataInputPeriodFilter:
      title: GetMetricRecordsDataInputPeriodFilter
      type: object
      required:
        - id
        - periodFilter
        - timezone
      properties:
        id:
          type: string
        periodFilter:
          $ref: '#/components/schemas/PeriodFilter'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/Filter'
        timezone:
          type: string
    GetMetricRecordsDataOutput:
      title: GetMetricRecordsDataOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MetricRecord'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    GetMetricRecordsOutput:
      title: GetMetricRecordsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MetricRecordMetadata'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    GetMetricsOutput:
      title: GetMetricsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/MetricMetadata'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    GetOrganizationOutput:
      title: GetOrganizationOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/OrganizationDetails'
    GetQueueByIdOutput:
      title: GetQueueByIdOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Queue1'
    GetQueuedConversationPositionOutput:
      title: GetQueuedConversationPositionOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/QueuedConversation'
    GetTagOutput:
      title: GetTagOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/Tag'
    GetWebhookEventDeliveryLogsOutput:
      title: GetWebhookEventDeliveryLogsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventDeliveryLog'
    GetWebhookLastDeliveryStatusOutput:
      title: GetWebhookLastDeliveryStatusOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventDeliveryStatus'
    GetWebhookSubscriptionOutput:
      title: GetWebhookSubscriptionOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WebhookSubscription'
    HelpCenterLink:
      title: HelpCenterLink
      type: object
      required:
        - id
        - name
        - url
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
    Html:
      title: Html
      type: object
      required:
        - value
      properties:
        value:
          type: string
    ImportConversationInput:
      title: ImportConversationInput
      oneOf:
        - $ref: '#/components/schemas/GenericConversationImport'
    ImportConversationOutput:
      title: ImportConversationOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ImportConversationResponse'
    ImportConversationResponse:
      title: ImportConversationResponse
      type: object
      required:
        - id
      properties:
        id:
          description: The id of the newly imported conversation
          type: integer
          format: int64
        partialErrors:
          description: >-
            List of errors that do not prevent the conversation from being
            created
          type: array
          items:
            $ref: '#/components/schemas/PartialError'
    ImportMessageInput:
      title: ImportMessageInput
      oneOf:
        - $ref: '#/components/schemas/InboundImport'
        - $ref: '#/components/schemas/OutboundImport'
    Inbound:
      title: Inbound
      type: object
      required:
        - content
      properties:
        content:
          $ref: '#/components/schemas/Content'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        integrationEmail:
          description: >-
            Internal email address registered for the integration with format:
            \<email-address\>@email.dixa.io
          type: string
        externalId:
          description: Client generated identifier for external reference
          type: string
    InboundImport:
      title: InboundImport
      type: object
      required:
        - content
        - createdAt
      properties:
        content:
          $ref: '#/components/schemas/Content'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        externalId:
          type: string
        createdAt:
          type: string
          format: date-time
        attributes:
          description: >-
            A set of dynamic attributes that are specific to the conversation
            channel, but not limited to it. See channel specific examples for
            your use case.
    IncludesAll:
      title: IncludesAll
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    IncludesOne:
      title: IncludesOne
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    Infrastructure:
      title: Infrastructure
      type: object
      required:
        - id
        - message
      properties:
        id:
          type: string
        message:
          type: string
    InheritedRestriction:
      title: InheritedRestriction
      type: object
      properties:
        fromCollection:
          type: string
        fromCategory:
          type: string
    InstantField:
      title: InstantField
      type: object
      required:
        - value
      properties:
        value:
          type: string
          format: date-time
    IntField:
      title: IntField
      type: object
      required:
        - value
      properties:
        value:
          type: integer
          format: int32
    Integrity:
      title: Integrity
      type: object
      required:
        - id
        - message
      properties:
        id:
          type: string
        message:
          type: string
    InternalNoteData:
      title: InternalNoteData
      type: object
      required:
        - id
        - authorId
        - createdAt
        - csid
        - message
      properties:
        id:
          type: string
          format: uuid
        authorId:
          type: string
          format: uuid
        createdAt:
          type: string
          format: date-time
        csid:
          type: integer
          format: int64
        message:
          type: string
    Interval:
      title: Interval
      type: object
      required:
        - start
        - end
      properties:
        start:
          type: string
          format: date-time
        end:
          type: string
          format: date-time
    IsEmpty:
      title: IsEmpty
      type: object
    IsNotEmpty:
      title: IsNotEmpty
      type: object
    IsNotOneOf:
      title: IsNotOneOf
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    IsNotOneOf1:
      title: IsNotOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: >-
            values: [email, contactform, chat, dixamessenger, phone, voicemail,
            callback, sms, facebookmessenger, whatsapp, adachat,
            digitalgeniuschat, kindlychat, trustpilot]
          type: array
          items:
            type: string
    IsNotOneOf2:
      title: IsNotOneOf
      type: object
      properties:
        values:
          description: >-
            Array of arrays of strings. Each inner array represents a possible
            custom attribute value.<br>If custom attribute is of type Select,
            either a parent value can be provided or a child value, but with a
            whole path to its parent value. Example: [["parent"], ["parent",
            "child1", "child2", "child3"], ["parent", "child1"]].<br>If custom
            attribute is of type Text, each search value must be wrapped in an
            array too. Example: [["value1"]]
          type: array
          items:
            type: array
            items:
              type: string
    IsNotOneOf3:
      title: IsNotOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: 'values: [inbound, outbound, internal]'
          type: array
          items:
            type: string
    IsNotOneOf4:
      title: IsNotOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: 'values: [open, closed, pending]'
          type: array
          items:
            type: string
    IsNotOneOf5:
      title: IsNotOneOf
      type: object
      required:
        - field
        - values
      properties:
        field:
          description: 'values: [InitialChannel, QueueId]'
          type: string
        values:
          type: array
          minItems: 1
          items:
            type: string
    IsOneOf:
      title: IsOneOf
      type: object
      properties:
        values:
          type: array
          items:
            type: string
    IsOneOf1:
      title: IsOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: >-
            values: [email, contactform, chat, dixamessenger, phone, voicemail,
            callback, sms, facebookmessenger, whatsapp, adachat,
            digitalgeniuschat, kindlychat, trustpilot]
          type: array
          items:
            type: string
    IsOneOf2:
      title: IsOneOf
      type: object
      properties:
        values:
          description: >-
            Array of arrays of strings. Each inner array represents a possible
            custom attribute value.<br>If custom attribute is of type Select,
            either a parent value can be provided or a child value, but with a
            whole path to its parent value. Example: [["parent"], ["parent",
            "child1", "child2", "child3"], ["parent", "child1"]].<br>If custom
            attribute is of type Text, each search value must be wrapped in an
            array too. Example: [["value1"]]
          type: array
          items:
            type: array
            items:
              type: string
    IsOneOf3:
      title: IsOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: 'values: [inbound, outbound, internal]'
          type: array
          items:
            type: string
    IsOneOf4:
      title: IsOneOf
      type: object
      required:
        - values
      properties:
        values:
          description: 'values: [open, closed, pending]'
          type: array
          items:
            type: string
    IsOneOf5:
      title: IsOneOf
      type: object
      required:
        - field
        - values
      properties:
        field:
          description: 'values: [InitialChannel, QueueId]'
          type: string
        values:
          type: array
          minItems: 1
          items:
            type: string
    LastActivity:
      title: LastActivity
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/TimestampOperator'
    LastMessage:
      title: LastMessage
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/TimestampOperator'
    LinkConversationInput:
      title: LinkConversationInput
      type: object
      required:
        - parentId
        - linkType
      properties:
        parentId:
          type: integer
          format: int64
        linkType:
          description: 'values: [Related, SideConversation]'
          type: string
    ListActivityLogOutput:
      title: ListActivityLogOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ActivityLogEntry'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListAgentsOutput:
      title: ListAgentsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Agent'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListBusinessHoursSchedulesOutput:
      title: ListBusinessHoursSchedulesOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/ListBusinessHoursSchedulesResult'
    ListBusinessHoursSchedulesResult:
      title: ListBusinessHoursSchedulesResult
      type: object
      properties:
        schedules:
          type: array
          items:
            $ref: '#/components/schemas/BusinessHoursSchedule'
    ListContactPointsOutput:
      title: ListContactPointsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ContactEndpoint'
    ListConversationRatingsOutput:
      title: ListConversationRatingsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConversationRating'
    ListCustomAttributesDefinitionsOutput:
      title: ListCustomAttributesDefinitionsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttributeDefinition'
    ListEndUserConversationsOutput:
      title: ListEndUserConversationsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Conversation'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListEndUsersOutput:
      title: ListEndUsersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EndUser'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListField:
      title: ListField
      type: object
      properties:
        values:
          type: array
          items:
            $ref: '#/components/schemas/PrimitiveField'
    ListFlowsOutput:
      title: ListFlowsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConversationFlow'
    ListInternalNotesOutput:
      title: ListInternalNotesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/InternalNoteData'
    ListKnowledgeCollectionsOutput:
      title: ListKnowledgeCollectionsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Collection'
    ListLinkedConversationsOutput:
      title: ListLinkedConversationsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Conversation'
    ListMessagesOutput:
      title: ListMessagesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Message'
    ListPresenceOutput:
      title: ListPresenceOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/UserPresence'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListQueuesOutput:
      title: ListQueuesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Queue1'
    ListTagsOutput:
      title: ListTagsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
    ListTeamMembersOutput:
      title: ListTeamMembersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TeamMember'
    ListTeamsOutput:
      title: ListTeamsOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Team1'
    ListTemplatesOutput:
      title: ListTemplatesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Template'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    ListWebhookSubscriptionsEndpointOutput:
      title: ListWebhookSubscriptionsEndpointOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/WebhookSubscription'
    LongAggregateValue:
      title: LongAggregateValue
      type: object
      required:
        - value
        - measure
      properties:
        value:
          type: integer
          format: int64
        measure:
          description: 'values: [Count]'
          type: string
    LongField:
      title: LongField
      type: object
      required:
        - value
      properties:
        value:
          type: integer
          format: int64
    LongerThanOrEqualTo:
      title: LongerThanOrEqualTo
      description: 'In milliseconds; for example: ''10800000'' (3 hours)'
      type: object
      required:
        - duration
      properties:
        duration:
          type: integer
          format: int64
    Map_AttributeValue:
      title: Map_AttributeValue
      type: object
      additionalProperties:
        description: >-
          AttributeValue values: String[] if the type of the custom attribute is
          Select or String if the type of the custom attribute is Text
        oneOf:
          - type: array
            items:
              type: string
          - type: string
    Map_ConversationChannel_Int:
      title: Map_ConversationChannel_Int
      description: >-
        values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger, Twitter,
        Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
      type: object
      additionalProperties:
        type: integer
        format: int32
    Map_ConversationChannel_Set_String:
      title: Map_ConversationChannel_Set_String
      description: >-
        values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger, Twitter,
        Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
      type: object
      additionalProperties:
        type: array
        uniqueItems: true
        items:
          type: string
    Map_FormAttributeValue:
      title: Map_FormAttributeValue
      type: object
      additionalProperties:
        $ref: '#/components/schemas/FormAttributeValue'
    Map_QueueThreshold_Int:
      title: Map_QueueThreshold_Int
      description: >-
        values: [SlaTimeLimit, AvailableAgents, LongestWait, SlaPercentage,
        WaitingConversations]
      type: object
      additionalProperties:
        type: integer
        format: int32
    Map_String:
      title: Map_String
      type: object
      additionalProperties:
        type: string
    Map_UUID_Option_AttributeValue:
      title: Map_UUID_Option_AttributeValue
      type: object
      additionalProperties:
        description: >-
          AttributeValue values: String[] if the type of the custom attribute is
          Select or String if the type of the custom attribute is Text
        oneOf:
          - type: array
            items:
              type: string
          - type: string
    Map_Vector_String:
      title: Map_Vector_String
      description: >-
        Snippet of text where a match was found. Matched text will be wrapped in
        \<em\> tags.
      type: object
      additionalProperties:
        type: array
        items:
          type: string
    Map_WebhookEventType_Filters:
      title: Map_WebhookEventType_Filters
      type: object
      additionalProperties:
        $ref: '#/components/schemas/Filters1'
    Markdown:
      title: Markdown
      type: object
      required:
        - value
      properties:
        value:
          type: string
    Message:
      title: Message
      type: object
      required:
        - id
        - authorId
        - createdAt
        - attributes
      properties:
        id:
          type: string
          format: uuid
        authorId:
          type: string
          format: uuid
        externalId:
          type: string
        createdAt:
          type: string
          format: date-time
        attributes:
          $ref: '#/components/schemas/Attributes'
    MessageAddedAttribute:
      title: MessageAddedAttribute
      type: object
      required:
        - messageId
      properties:
        messageId:
          type: string
        fromEndpoint:
          type: string
        avatarUrl:
          type: string
    MessageAddedByAgentActivityType:
      title: MessageAddedByAgentActivityType
      type: object
    MessageAddedByCustomerActivityType:
      title: MessageAddedByCustomerActivityType
      type: object
    MessageAnonymizationType:
      title: MessageAnonymizationType
      type: object
    MessageRedactedAttribute:
      title: MessageRedactedAttribute
      type: object
      required:
        - messageId
        - wasTextRedacted
        - numberOfDeletedFiles
      properties:
        messageId:
          type: string
        wasTextRedacted:
          type: boolean
        numberOfDeletedFiles:
          type: integer
          format: int32
    MessengerConversation:
      title: MessengerConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        browserInfo:
          $ref: '#/components/schemas/BrowserInfo'
        language:
          type: string
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    MessengerFormAttributes:
      title: MessengerFormAttributes
      type: object
      required:
        - formSubmission
      properties:
        formSubmission:
          $ref: '#/components/schemas/FormSubmission'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        content:
          $ref: '#/components/schemas/Content'
    MetricData:
      title: MetricData
      type: object
      required:
        - id
      properties:
        id:
          type: string
        aggregates:
          type: array
          items:
            $ref: '#/components/schemas/AggregateValue'
    MetricMetadata:
      title: MetricMetadata
      type: object
      required:
        - id
      properties:
        id:
          description: The metric ID
          type: string
        description:
          description: Relevant information about the metric
          type: string
        filters:
          description: List of available filters that can be used when fetching metric data
          type: array
          items:
            $ref: '#/components/schemas/FilterMetadata'
        aggregations:
          description: >-
            List of available aggregations that can be used when fetching metric
            data
          type: array
          items:
            $ref: '#/components/schemas/AggregateMetadata'
        relatedRecordIds:
          description: List of record IDs used to compose the metric
          type: array
          items:
            type: string
    MetricRecord:
      title: MetricRecord
      type: object
      required:
        - primaryTimestampField
      properties:
        primaryTimestampField:
          $ref: '#/components/schemas/TimestampField'
        value:
          $ref: '#/components/schemas/FieldType'
        fields:
          type: array
          items:
            $ref: '#/components/schemas/Field'
    MetricRecordMetadata:
      title: MetricRecordMetadata
      type: object
      required:
        - id
        - description
      properties:
        id:
          description: The record ID
          type: string
        description:
          description: Relevant information about the record
          type: string
        filters:
          description: List of available filters that can be used when fetching record data
          type: array
          items:
            $ref: '#/components/schemas/FilterMetadata'
        relatedMetricIds:
          description: List of metric IDs that make use of this record
          type: array
          items:
            type: string
        fieldsMetadata:
          description: Information about the individual record fields
          type: array
          items:
            $ref: '#/components/schemas/FieldMetadata'
    MimeType:
      title: MimeType
      oneOf:
        - $ref: '#/components/schemas/MimeTypeImpl'
    MimeTypeImpl:
      title: MimeTypeImpl
      type: object
      required:
        - primary
        - sub
      properties:
        primary:
          type: string
        sub:
          type: string
    NoAuth:
      title: NoAuth
      type: object
    NoRecentDelivery:
      title: NoRecentDelivery
      type: object
    NotFound:
      title: NotFound
      type: object
      required:
        - message
      properties:
        message:
          type: string
    NotFound1:
      title: NotFound
      type: object
      required:
        - id
        - message
      properties:
        id:
          type: string
        message:
          type: string
    NoteAddedActivityType:
      title: NoteAddedActivityType
      type: object
    NoteAddedAttribute:
      title: NoteAddedAttribute
      type: object
      required:
        - message
      properties:
        message:
          type: string
        avatarUrl:
          type: string
    Nps:
      title: Nps
      type: object
      required:
        - value
      properties:
        value:
          description: Numeric value between 0 and 10 representing the net promoter score.
          type: integer
          format: int32
    OrganizationDetails:
      title: OrganizationDetails
      type: object
      required:
        - id
        - name
        - subdomain
        - status
      properties:
        id:
          type: string
        name:
          type: string
        subdomain:
          type: string
        status:
          description: 'values: [Active, Suspended]'
          type: string
        avatarUrl:
          type: string
    Outbound:
      title: Outbound
      type: object
      required:
        - content
        - agentId
      properties:
        content:
          $ref: '#/components/schemas/Content'
        agentId:
          type: string
          format: uuid
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        integrationEmail:
          type: string
        externalId:
          type: string
        cc:
          type: array
          items:
            type: string
            format: uuid
        bcc:
          type: array
          items:
            type: string
            format: uuid
    OutboundImport:
      title: OutboundImport
      type: object
      required:
        - content
        - agentId
        - createdAt
      properties:
        content:
          $ref: '#/components/schemas/Content'
        agentId:
          type: string
          format: uuid
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
        externalId:
          type: string
        createdAt:
          type: string
          format: date-time
        attributes:
          description: >-
            A set of dynamic attributes that are specific to the conversation
            channel, but not limited to it. See channel specific examples for
            your use case.
    PaginationLinks:
      title: PaginationLinks
      type: object
      properties:
        previous:
          description: url
          type: string
        next:
          description: url
          type: string
    PartialError:
      title: PartialError
      type: object
      required:
        - message
      properties:
        message:
          type: string
    PatchAgentInput:
      title: PatchAgentInput
      type: object
      properties:
        displayName:
          description: The agent's display name
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
    PatchConversationCustomAttributesOutput:
      title: PatchConversationCustomAttributesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
    PatchEndUserCustomAttributesOutput:
      title: PatchEndUserCustomAttributesOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
    PatchEndUserInput:
      title: PatchEndUserInput
      type: object
      properties:
        displayName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        additionalEmails:
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          type: string
        lastName:
          type: string
        middleNames:
          type: array
          items:
            type: string
        avatarUrl:
          type: string
        externalId:
          type: string
    PatchEndUserOutput:
      title: PatchEndUserOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    PatchWebhookSubscriptionInput:
      title: PatchWebhookSubscriptionInput
      type: object
      properties:
        name:
          description: The Webhook Subscription name
          type: string
        events:
          description: >-
            The set of events this Webhook Subscription subscribes to. Allowed
            values: [ConversationPending, AgentUnbannedEnduser,
            ConversationMessageAdded, ConversationAssigned,
            ConversationMessageDeliveryDelivered,
            ConversationMessageDeliveryInfo, ConversationTransferred,
            ConversationEnqueued, ConversationCreated, ConversationUnassigned,
            ConversationOpen, ConversationAbandoned, ConversationClosed,
            ConversationMessageDeliveryFailed, ConversationTagAdded,
            ConversationNoteAdded, AgentBannedEnduser,
            ConversationEndUserReplaced, ConversationMessageDeliverySeen,
            AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
            ConversationTagRemoved, ConversationRated,
            ConversationMessageDeliverySpamComplaint,
            ConversationPendingExpired]
          type: array
          uniqueItems: true
          items:
            description: >-
              values: [ConversationPending, AgentUnbannedEnduser,
              ConversationMessageAdded, ConversationAssigned,
              ConversationMessageDeliveryDelivered,
              ConversationMessageDeliveryInfo, ConversationTransferred,
              ConversationEnqueued, ConversationCreated, ConversationUnassigned,
              ConversationOpen, ConversationAbandoned, ConversationClosed,
              ConversationMessageDeliveryFailed, ConversationTagAdded,
              ConversationNoteAdded, AgentBannedEnduser,
              ConversationEndUserReplaced, ConversationMessageDeliverySeen,
              AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
              ConversationTagRemoved, ConversationRated,
              ConversationMessageDeliverySpamComplaint,
              ConversationPendingExpired]
            type: string
        url:
          description: URL of the server that the webhook request should be sent to
          type: string
        authorization:
          $ref: '#/components/schemas/WebhookAuthorization'
        customHeaders:
          $ref: '#/components/schemas/Map_String'
          description: Custom headers that will be added to the webhook request
        enabled:
          description: Defines whether this Webhook Subscription is enabled or disabled
          type: boolean
        filters:
          $ref: '#/components/schemas/Map_WebhookEventType_Filters'
          description: >-
            Filters to be applied to the events of the Webhook Subscription,
            only filtered events will be sent out. Filters can target a
            conversation channel, queue...
    PatchWebhookSubscriptionOutput:
      title: PatchWebhookSubscriptionOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/WebhookSubscription'
    PeriodFilter:
      title: PeriodFilter
      oneOf:
        - $ref: '#/components/schemas/Interval'
        - $ref: '#/components/schemas/Preset'
    PhoneAttributes:
      title: PhoneAttributes
      type: object
      required:
        - from
        - to
      properties:
        from:
          type: string
        to:
          type: string
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        duration:
          type: integer
          format: int32
    PresenceDuration:
      title: PresenceDuration
      type: object
      required:
        - value
        - status
      properties:
        value:
          type: number
          format: double
        status:
          $ref: '#/components/schemas/Status'
    Preset:
      title: Preset
      type: object
      required:
        - value
      properties:
        value:
          description: >-
            values: [PreviousQuarter, ThisWeek, PreviousWeek, Yesterday, Today,
            ThisMonth, PreviousMonth, ThisQuarter, ThisYear]
          type: string
    PrimitiveField:
      title: PrimitiveField
      oneOf:
        - $ref: '#/components/schemas/BooleanField'
        - $ref: '#/components/schemas/DoubleField'
        - $ref: '#/components/schemas/InstantField'
        - $ref: '#/components/schemas/IntField'
        - $ref: '#/components/schemas/LongField'
        - $ref: '#/components/schemas/StringField'
        - $ref: '#/components/schemas/UUIDField'
    PstnPhoneConversation:
      title: PstnPhoneConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    Query:
      title: Query
      type: object
      required:
        - value
      properties:
        value:
          type: string
        exactMatch:
          type: boolean
    Queue:
      title: Queue
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
        queuedAt:
          type: string
          format: date-time
    Queue1:
      title: Queue
      type: object
      required:
        - id
        - name
        - isDefault
        - organizationId
        - queueThresholds
        - slaCalculationMethod
        - doNotOfferTimeouts
        - isDoNotOfferEnabled
      properties:
        id:
          type: string
        name:
          type: string
        isDefault:
          type: boolean
        organizationId:
          type: string
        queueThresholds:
          $ref: '#/components/schemas/Map_QueueThreshold_Int'
        slaCalculationMethod:
          description: 'values: [AbandonedIgnored]'
          type: string
        offerTimeout:
          type: integer
          format: int32
        offeringAlgorithm:
          description: >-
            values: [AgentPriorityOneAtATimeRandom, AllAtOnce,
            AgentPriorityLongestIdle, AgentPriorityAllAtOnce, LongestIdle,
            OneAtATimeRandom]
          type: string
        memberListType:
          description: 'values: [Default, SkillBased]'
          type: string
        usages:
          $ref: '#/components/schemas/QueueUsages'
        wrapupTimeout:
          type: integer
          format: int32
        priority:
          type: integer
          format: int32
        offerAbandonedConversations:
          type: boolean
        doNotOfferTimeouts:
          $ref: '#/components/schemas/Map_ConversationChannel_Int'
        isDoNotOfferEnabled:
          type: boolean
        isPreferredAgentEnabled:
          type: boolean
        preferredAgentTimeouts:
          $ref: '#/components/schemas/Map_ConversationChannel_Int'
        preferredAgentOfflineTimeout:
          type: integer
          format: int32
        personalAgentOfflineTimeout:
          type: integer
          format: int32
        isRestricted:
          type: boolean
    QueueAvailabilityOutput:
      title: QueueAvailabilityOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ChannelAvailabilityOutcome'
    QueueId:
      title: QueueId
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/FieldCanHaveSingleValueOrBeEmptyOperator'
    QueueMember:
      title: QueueMember
      type: object
      required:
        - agentId
      properties:
        agentId:
          type: string
        priority:
          type: integer
          format: int32
    QueueMembersOutput:
      title: QueueMembersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/QueueMember'
    QueueUsages:
      title: QueueUsages
      type: object
      required:
        - queueId
        - usages
      properties:
        queueId:
          type: string
        usages:
          $ref: '#/components/schemas/Map_ConversationChannel_Set_String'
    QueuedConversation:
      title: QueuedConversation
      type: object
      required:
        - queuedAt
      properties:
        position:
          description: Approximate position of the conversation in the current queue
          type: integer
          format: int32
        queuedAt:
          type: string
          format: date-time
    QuickResponse:
      title: QuickResponse
      type: object
      required:
        - id
        - name
        - content
        - createdBy
        - createdAt
      properties:
        id:
          type: string
        name:
          type: string
        content:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
        lastEditedBy:
          type: string
        lastEditedAt:
          type: string
        translations:
          type: array
          uniqueItems: true
          items:
            $ref: '#/components/schemas/Translation'
        subject:
          type: string
    RatingOffer:
      title: RatingOffer
      type: object
      required:
        - id
        - userId
        - agentId
        - ratingType
      properties:
        id:
          type: string
        userId:
          type: string
        agentId:
          type: string
        ratingType:
          description: 'values: [Csat, Nps, ThumbsUpOrDown]'
          type: string
        offeredAt:
          type: string
          format: date-time
    RatingResult:
      title: RatingResult
      type: object
      required:
        - ratingId
        - ratingResult
      properties:
        ratingId:
          type: string
        userId:
          type: string
        ratingResult:
          $ref: '#/components/schemas/SubmittedRatingResult'
        comment:
          type: string
        submittedAt:
          type: string
          format: date-time
    Regular:
      title: Regular
      type: object
      required:
        - content
      properties:
        content:
          $ref: '#/components/schemas/Content'
    ReopenConversationInput:
      title: ReopenConversationInput
      type: object
      properties:
        userId:
          type: string
          format: uuid
    Restrictions:
      title: Restrictions
      type: object
      required:
        - isRestricted
      properties:
        isRestricted:
          type: boolean
        inheritedRestrictions:
          type: array
          items:
            $ref: '#/components/schemas/InheritedRestriction'
    SearchConversationsWithFiltersOutput:
      title: SearchConversationsWithFiltersOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConversationSearchWithFiltersHit'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    SearchField:
      title: SearchField
      oneOf:
        - $ref: '#/components/schemas/AgentId'
        - $ref: '#/components/schemas/AssignedDate'
        - $ref: '#/components/schemas/Channel'
        - $ref: '#/components/schemas/ClosedDate'
        - $ref: '#/components/schemas/ContactId'
        - $ref: '#/components/schemas/ConversationId'
        - $ref: '#/components/schemas/CreationDate'
        - $ref: '#/components/schemas/CustomAttribute1'
        - $ref: '#/components/schemas/Direction'
        - $ref: '#/components/schemas/Duration'
        - $ref: '#/components/schemas/LastActivity'
        - $ref: '#/components/schemas/LastMessage'
        - $ref: '#/components/schemas/QueueId'
        - $ref: '#/components/schemas/Status1'
        - $ref: '#/components/schemas/TagId'
    SearchOutput:
      title: SearchOutput
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ConversationSearchHit'
        meta:
          $ref: '#/components/schemas/PaginationLinks'
    SearchParametersInput:
      title: SearchParametersInput
      type: object
      properties:
        query:
          $ref: '#/components/schemas/Query'
        filters:
          $ref: '#/components/schemas/Filters'
    Select:
      title: Select
      type: object
      properties:
        value:
          type: array
          items:
            type: string
    Select1:
      title: Select
      type: object
      properties:
        options:
          type: array
          items:
            $ref: '#/components/schemas/SelectOption'
    SelectOption:
      title: SelectOption
      type: object
      required:
        - id
        - label
        - value
        - isDeactivated
        - orderIndex
      properties:
        id:
          type: string
          format: uuid
        label:
          type: string
        value:
          type: string
        nestedOptions:
          type: array
          items:
            $ref: '#/components/schemas/SelectOption'
        isDeactivated:
          type: boolean
        orderIndex:
          type: integer
          format: int32
    ServerError:
      title: ServerError
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ShorterThanOrEqualTo:
      title: ShorterThanOrEqualTo
      description: 'In milliseconds; for example: ''10800000'' (3 hours)'
      type: object
      required:
        - duration
      properties:
        duration:
          type: integer
          format: int64
    SideConversation:
      title: SideConversation
      type: object
      required:
        - parentId
      properties:
        parentId:
          type: integer
          format: int64
    Since:
      title: Since
      description: 'Timestamp in ISO-8601 format: yyyy-MM-dd''T''HH:mm:ss''Z'' '
      type: object
      required:
        - timestamp
      properties:
        timestamp:
          type: string
          format: date-time
    Sms:
      title: Sms
      type: object
      required:
        - requesterId
        - contactEndpointId
        - message
      properties:
        requesterId:
          type: string
          format: uuid
        contactEndpointId:
          description: SMS enabled provisioned phone number in valid E.164 format
          type: string
        message:
          $ref: '#/components/schemas/CreateMessageInput'
    SmsAttributes:
      title: SmsAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
    SmsConversation:
      title: SmsConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        fromNumber:
          type: string
        toNumber:
          type: string
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    Status:
      title: Status
      type: object
      required:
        - status
      properties:
        status:
          type: string
        description:
          type: string
    Status1:
      title: Status
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/StatusOperator'
    StatusOperator:
      title: StatusOperator
      oneOf:
        - $ref: '#/components/schemas/IsNotOneOf4'
        - $ref: '#/components/schemas/IsOneOf4'
    StringField:
      title: StringField
      type: object
      required:
        - value
      properties:
        value:
          type: string
        label:
          type: string
    SubmittedRatingResult:
      title: SubmittedRatingResult
      oneOf:
        - $ref: '#/components/schemas/Csat'
        - $ref: '#/components/schemas/Nps'
        - $ref: '#/components/schemas/ThumbsUpOrDown'
    Success:
      title: Success
      type: object
      required:
        - channelAvailability
      properties:
        channelAvailability:
          $ref: '#/components/schemas/ChannelAvailability'
    Tag:
      title: Tag
      type: object
      required:
        - id
        - name
        - state
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        color:
          type: string
        state:
          description: 'values: [Active, Inactive]'
          type: string
    TagAddedActivityType:
      title: TagAddedActivityType
      type: object
    TagAddedAttribute:
      title: TagAddedAttribute
      type: object
      required:
        - tag
      properties:
        tag:
          type: string
    TagConversationInput:
      title: TagConversationInput
      type: object
      required:
        - name
      properties:
        name:
          type: string
    TagId:
      title: TagId
      type: object
      required:
        - operator
      properties:
        operator:
          $ref: '#/components/schemas/FieldCanHaveMultipleValuesOrBeEmptyOperator'
    TagRemovedActivityType:
      title: TagRemovedActivityType
      type: object
    TagRemovedAttribute:
      title: TagRemovedAttribute
      type: object
      required:
        - tag
      properties:
        tag:
          type: string
    Team:
      title: Team
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
    Team1:
      title: Team
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
        name:
          type: string
    TeamMember:
      title: TeamMember
      type: object
      required:
        - id
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
    TelephonyEndpoint:
      title: TelephonyEndpoint
      type: object
      required:
        - number
      properties:
        number:
          type: string
        functionality:
          type: array
          items:
            description: 'values: [Sms, VoiceInbound, VoiceOutbound]'
            type: string
        name:
          type: string
    Template:
      title: Template
      oneOf:
        - $ref: '#/components/schemas/EmailAutoReply'
        - $ref: '#/components/schemas/QuickResponse'
    Text:
      title: Text
      type: object
      required:
        - value
      properties:
        value:
          type: string
    Text1:
      title: Text
      type: object
      required:
        - value
      properties:
        value:
          type: string
    Text2:
      title: Text
      type: object
      properties:
        placeholder:
          type: string
    ThumbsUpOrDown:
      title: ThumbsUpOrDown
      type: object
      required:
        - value
      properties:
        value:
          description: One of the the numeric values 0 (thumbs down) and 1 (thumbs up).
          type: integer
          format: int32
    TimestampField:
      title: TimestampField
      type: object
      required:
        - name
        - timestamp
      properties:
        name:
          type: string
        timestamp:
          type: string
          format: date-time
    TimestampOperator:
      title: TimestampOperator
      oneOf:
        - $ref: '#/components/schemas/Between'
        - $ref: '#/components/schemas/Since'
        - $ref: '#/components/schemas/Until'
    TokenAuth:
      title: TokenAuth
      type: object
      required:
        - value
      properties:
        value:
          description: >-
            Token value. It will be added in the headers of the request as:
            'Authorization': 'Bearer \<value\>'
          type: string
    TooLarge:
      title: TooLarge
      type: object
      required:
        - file
      properties:
        file:
          $ref: '#/components/schemas/File'
    TranscriptAttributes:
      title: TranscriptAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        utterance_start_ms:
          type: integer
          format: int64
        utterance_end_ms:
          type: integer
          format: int64
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
    TransferConversationInput:
      title: TransferConversationInput
      type: object
      required:
        - queueId
      properties:
        queueId:
          description: The target queue for the conversation transfer
          type: string
          format: uuid
        userId:
          description: >-
            An optional agent/admin to originate the transfer of the
            conversation
          type: string
          format: uuid
    TransferFailedActivityType:
      title: TransferFailedActivityType
      type: object
    TransferInitiatedActivityType:
      title: TransferInitiatedActivityType
      type: object
    TransferSuccessfulActivityType:
      title: TransferSuccessfulActivityType
      type: object
    Translation:
      title: Translation
      type: object
      required:
        - locale
        - content
        - isDeactivated
      properties:
        locale:
          description: >-
            Format for locale is {language}-{script}-{country}, e.g. "en-US",
            "uz-Arab-AF", "da"
          type: string
        content:
          type: string
        isDeactivated:
          type: boolean
        subject:
          type: string
    Translation1:
      title: Translation
      type: object
      required:
        - draft
      properties:
        draft:
          $ref: '#/components/schemas/ArticleTranslation'
        published:
          $ref: '#/components/schemas/ArticleTranslation'
    TranslationList:
      title: TranslationList
      type: object
      properties:
        draft:
          type: array
          items:
            $ref: '#/components/schemas/ArticleTranslation'
        published:
          type: array
          items:
            $ref: '#/components/schemas/ArticleTranslation'
    TranslationTitle:
      title: TranslationTitle
      type: object
      required:
        - languageId
        - title
      properties:
        languageId:
          type: string
        title:
          type: string
    TwitterAttributes:
      title: TwitterAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
    TwitterConversation:
      title: TwitterConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
        - conversationType
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        conversationType:
          description: 'values: [DirectMessage, Tweet]'
          type: string
        contactPointTwitterId:
          type: string
        endUserTwitterId:
          type: string
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
    UUIDField:
      title: UUIDField
      type: object
      required:
        - value
      properties:
        value:
          type: string
          format: uuid
        label:
          type: string
    Unauthorized:
      title: Unauthorized
      type: object
      required:
        - message
      properties:
        message:
          type: string
    UnexpectedError:
      title: UnexpectedError
      type: object
      required:
        - channel
        - message
      properties:
        channel:
          type: string
        message:
          type: string
    UnknownActivityType:
      title: UnknownActivityType
      type: object
    UnknownAnonymizationType:
      title: UnknownAnonymizationType
      type: object
    Until:
      title: Until
      description: 'Timestamp in ISO-8601 format: yyyy-MM-dd''T''HH:mm:ss''Z'' '
      type: object
      required:
        - timestamp
      properties:
        timestamp:
          type: string
          format: date-time
    UpdateAgentInput:
      title: UpdateAgentInput
      type: object
      required:
        - displayName
      properties:
        displayName:
          description: The agent's display name
          type: string
        phoneNumber:
          description: The agent's primary phone number
          type: string
        additionalEmails:
          description: Additional email addresses for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          description: Additional phone numbers for the agent
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          description: The agent's first name
          type: string
        lastName:
          description: The agent's last name
          type: string
        middleNames:
          description: The agent's middle names
          type: array
          items:
            type: string
        avatarUrl:
          description: The url from which to load the agent's avatar
          type: string
    UpdateAgentPresenceChannelInput:
      title: UpdateAgentPresenceChannelInput
      type: object
      required:
        - channel
        - working
      properties:
        channel:
          description: 'values: [Email, InteractiveChat, Messaging, Speak]'
          type: string
        working:
          type: boolean
    UpdateEndUserInput:
      title: UpdateEndUserInput
      type: object
      required:
        - displayName
      properties:
        displayName:
          type: string
        email:
          type: string
        phoneNumber:
          type: string
        additionalEmails:
          type: array
          uniqueItems: true
          items:
            type: string
        additionalPhoneNumbers:
          type: array
          uniqueItems: true
          items:
            type: string
        firstName:
          type: string
        lastName:
          type: string
        middleNames:
          type: array
          items:
            type: string
        avatarUrl:
          type: string
        externalId:
          type: string
    UpdateEndUserOutput:
      title: UpdateEndUserOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/EndUser'
    UserAnonymizationType:
      title: UserAnonymizationType
      type: object
    UserPresence:
      title: UserPresence
      type: object
      required:
        - userId
        - requestTime
        - connectionStatus
      properties:
        userId:
          type: string
        requestTime:
          type: string
        lastSeen:
          type: string
        presenceStatus:
          description: 'values: [Away, Working]'
          type: string
        connectionStatus:
          description: 'values: [Offline, Online]'
          type: string
        activeChannels:
          type: array
          items:
            description: >-
              values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
              Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
            type: string
    UserPresenceOutput:
      title: UserPresenceOutput
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/UserPresence'
    Validation:
      title: Validation
      type: object
      required:
        - message
      properties:
        id:
          type: string
        message:
          type: string
    WebhookAuthorization:
      title: WebhookAuthorization
      description: >-
        Authorization to be added as a header in the webhook request. Can be
        either, Basic auth, added as 'Basic
        base64encoded(\<username\>:\<password\>)', Token auth, added as 'Bearer
        \<token value\>', or no auth
      oneOf:
        - $ref: '#/components/schemas/BasicAuth'
        - $ref: '#/components/schemas/NoAuth'
        - $ref: '#/components/schemas/TokenAuth'
    WebhookSubscription:
      title: WebhookSubscription
      type: object
      required:
        - id
        - name
        - url
        - headers
        - secretKey
        - enabled
        - createdAt
        - createdBy
        - updatedAt
        - updatedBy
      properties:
        id:
          description: The Webhook Subscription ID
          type: string
          format: uuid
        name:
          description: The Webhook Subscription name
          type: string
        subscribedEvents:
          description: The set of events this Webhook Subscription is subscribed to
          type: array
          uniqueItems: true
          items:
            description: >-
              values: [ConversationPending, AgentUnbannedEnduser,
              ConversationMessageAdded, ConversationAssigned,
              ConversationMessageDeliveryDelivered,
              ConversationMessageDeliveryInfo, ConversationTransferred,
              ConversationEnqueued, ConversationCreated, ConversationUnassigned,
              ConversationOpen, ConversationAbandoned, ConversationClosed,
              ConversationMessageDeliveryFailed, ConversationTagAdded,
              ConversationNoteAdded, AgentBannedEnduser,
              ConversationEndUserReplaced, ConversationMessageDeliverySeen,
              AgentUnbannedIp, ConversationMessageDeliverySent, AgentBannedIp,
              ConversationTagRemoved, ConversationRated,
              ConversationMessageDeliverySpamComplaint,
              ConversationPendingExpired]
            type: string
        url:
          description: URL of the server that the webhook request should be sent to
          type: string
        headers:
          $ref: '#/components/schemas/Webhook_Headers_Map_String_String'
        secretKey:
          description: Dixa generated secret key, used to sign the requests
          type: string
        enabled:
          description: Defines whether this Webhook Subscription is enabled or disabled
          type: boolean
        createdAt:
          description: Date when this Webhook Subscription was created
          type: string
          format: date-time
        createdBy:
          description: The ID of the user who created this Webhook Subscription
          type: string
          format: uuid
        updatedAt:
          description: Date when this Webhook Subscription was last updated
          type: string
          format: date-time
        updatedBy:
          description: The ID of the user who last updated this Webhook Subscription
          type: string
          format: uuid
        filters:
          $ref: '#/components/schemas/Map_WebhookEventType_Filters'
          description: >-
            Filters to be applied to the events that are sent to this Webhook
            Subscription
    Webhook_Headers_Map_String_String:
      title: Webhook_Headers_Map_String_String
      description: The headers that will be added to the webhook request
      type: object
      additionalProperties:
        type: string
    WhatsAppAttributes:
      title: WhatsAppAttributes
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Content'
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/File'
    WhatsAppConversation:
      title: WhatsAppConversation
      type: object
      required:
        - id
        - requesterId
        - channel
        - createdAt
      properties:
        id:
          type: integer
          format: int64
        requesterId:
          type: string
          format: uuid
        channel:
          description: >-
            values: [WhatsApp, Voicemail, WidgetChat, FacebookMessenger,
            Twitter, Email, ContactForm, Callback, PstnPhone, Sms, Messenger]
          type: string
        createdAt:
          type: string
          format: date-time
        direction:
          description: 'values: [Inbound, Internal, Outbound]'
          type: string
        state:
          description: 'values: [AwaitingPending, Closed, Open, Pending]'
          type: string
        stateUpdatedAt:
          type: string
          format: date-time
        assignment:
          $ref: '#/components/schemas/Assignment'
        queue:
          $ref: '#/components/schemas/Queue'
        link:
          $ref: '#/components/schemas/ConversationLink'
        customAttributes:
          type: array
          items:
            $ref: '#/components/schemas/CustomAttribute'
        transportExpiresAt:
          type: string
          format: date-time
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      name: Authorization
      in: header
security:
  - ApiKeyAuth: []
