openapi: 3.0.2
x-explorer-enabled: false
x-samples-languages: ['curl', 'node', 'java', 'javascript', 'python', 'go']
info:
  title: Digital Chat SDK
  description: Chat SDK integrates Avaya Experience Platform solution with Front end client application so that all the functionalities provided by CCaaS are available directly through a SDK.
  contact:
    name: Avaya API Team
    url: https://developers.avayacloud.com/onecloud-ccaas
    email: apiteam@avaya.com
  license:
    name: Avaya Software Development Kit (SDK) Software License Terms
    url: http://support.avaya.com/css/P8/documents/101038288
  version: 1.0.1
servers:
  - url: '{protocol}://{server}{basePath}'
    description: Open API
    variables:
      protocol:
        enum:
          - 'https'
        default: 'https'
      server:
        default: 'HOST-REGION.api.avayacloud.com'
      basePath:
        default: "/sdk/digital/chat/v1"
  - url: "{protocol}://{server}:{port}"
    description: Internal API
    variables:
      protocol:
        enum:
          - "http"
          - "https"
        default: "http"
      server:
        default: "sdk"
      port:
        enum:
          - "80"
          - "443"
        default: "80"
tags:
  - name: Events
    description: >
      Events are used to notify the client about changes in the state of the
      session or the dialog. Events are sent to the client as a response to a
      GET request on the /sessions/{sessionId}/events endpoint.
  - name: Conversations
    description: >
      Conversations of the customer. Multiple engagements might be created for
      a conversation
  - name: Engagements
    description: >
      Chat engagements can be created from the customer side which are then
      handled by contact center resources like agents, supervisors and bots.
      Session Id's can be passed on any explicit requests made on engagements so
      that all the activities can be correlated back to the appropriate session.
  - name: Presigned URL
    description: >
      Pre-signed URLs provides access to the object identified in the URL.Pre-signed URL contains a signed component that the server (here UMR) will generate and can hence validate during upload and download operation.
  - name: Sessions
    description: >
      Sessions are used to hold context information about the customer and the clients used by the customer. A customer can have multiple active sessions at the same time. Sessions can be passed on any explicit requests made on engagements so that all the activities can be correlated back to sessions that caused it.

security:
  - {}
  - BearerAuth: []
paths:
  "/{integrationType}/{integrationId}/sessions":
    post:
      tags:
        - Sessions
      summary: Create Chat Session
      description: >
        Creates a new customer chat session.
      operationId: createChatSession
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Session"
            examples:
              "Start Session":
                $ref: "#/components/examples/StartSession"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionResponse"
              examples:
                "Session with no engagements exists for an user":
                  $ref: "#/components/examples/Session"
                "Session with existing engagements for an user":
                  $ref: "#/components/examples/SessionWithEngagement"
        "400":
          $ref: "#/components/responses/BadRequestCreateSession"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "500":
          $ref: "#/components/responses/InternalServerError"
    get:
      tags:
        - Sessions
      summary: List Chat Sessions
      description: List customers chat sessions
      operationId: listChatSessions
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Session"
              examples:
                "Get Sessions":
                  $ref: "#/components/examples/ListSessions"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/sessions/{sessionId}":
    get:
      tags:
        - Sessions
      summary: Get Chat Session
      description: Get a customers chat session.
      operationId: getChatSession
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/sessionId"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/SessionResponse"
              examples:
                "Get Session":
                  $ref: "#/components/examples/Session"
                "Get Session with Engagement":
                  $ref: "#/components/examples/SessionWithEngagement"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
    delete:
      tags:
        - Sessions
      summary: Delete Chat Session
      description: >
        Deletes a customer chat session.
      operationId: endChatSession
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/sessionId"
        - name: reason
          in: query
          description: "The reason for ending the customers client session"
          schema:
            type: string
            enum:
              - USER_CLOSED
              - USER_INACTIVE
              - UNKNOWN
            default: USER_CLOSED
            example: USER_INACTIVE
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/sessions/{sessionId}/events":
    get:
      tags:
        - Events
      summary: List Events
      operationId: getChatSessionEvents
      description: |
        Lists events that have occurred within a session but were not delivered previously.

        A client needs to send an acknowledgement of the last event that it has processed by sending it's **eventId** in **lastEventId** so that the server can consider that event and all its previous events as delivered and will not send them again to the client.
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/sessionId"
        - name: lastEventId
          description: "The unique 36 character internal id of the last event that has been processed."
          in: query
          schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
            example: "fc741b00-710b-11eb-9439-0242ac130002"
      responses:
        "200":
          description: Event Message
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Event"
              examples:
                "Participant-Added-Event":
                  $ref: "#/components/examples/Participant-Added-Event"
                "Participant-Disconnected-Event":
                  $ref: "#/components/examples/Participant-Disconnected-Event"
                "Message-Event-Plaintext-Simple":
                  $ref: "#/components/examples/Message-Event"
                "Message-Event-Agent-To-Customer-File":
                  $ref: "#/components/examples/AgentToCustomerFile"
                "Message-Event-Agent-To-Customer-Image":
                  $ref: "#/components/examples/AgentToCustomerImage"
                "Message-Event-Agent-To-Customer-Postback-Link-LocationRequest":
                  $ref: "#/components/examples/AgentToCustomerPostbackLinkLocationRequest"
                "Message-Event-Agent-To-Customer-Reply":
                  $ref: "#/components/examples/AgentToCustomerReply"
                "Message-Event-Agent-To-Customer-Carousel":
                  $ref: "#/components/examples/AgentToCustomerCarousel"
                "Message-Event-Agent-To-Customer-Location":
                  $ref: "#/components/examples/AgentToCustomerLocation"
                "Message-Event-Customer-To-Agent-Location":
                  $ref: "#/components/examples/CustomerToAgentLocation"
                "Message-Event-Customer-To-Agent-Reply":
                  $ref: "#/components/examples/CustomerToAgentReply"
                "Message-Event-Customer-To-Agent-File":
                  $ref: "#/components/examples/CustomerToAgentFile"
                "Message-Event-Customer-To-Agent-Image":
                  $ref: "#/components/examples/CustomerToAgentImage"
                "Message-Event-Customer-To-Agent-Postback":
                  $ref: "#/components/examples/CustomerToAgentPostback"
                "Engagement-Created-Event":
                  $ref: "#/components/examples/Engagement-Created-Event"
                "Engagement-Error-Event":
                  $ref: "#/components/examples/Engagement-Error-Event"
                "All-Events":
                  $ref: "#/components/examples/All-Events"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
  "/{integrationType}/{integrationId}/engagements":
    post:
      tags:
        - Engagements
      summary: Create Engagement
      description: >
        Creates a new engagement.
      operationId: createEngagement
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateEngagement"
            examples:
              "Start Engagement":
                $ref: "#/components/examples/CreateEngagement"
        required: true
      responses:
        "201":
          description: Created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Engagement"
              examples:
                "Start Engagement":
                  $ref: "#/components/examples/Engagement"
        "400":
          $ref: "#/components/responses/BadRequestCreateEngagement"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
  "/{integrationType}/{integrationId}/engagements/{engagementId}:disconnect":
    post:
      tags:
        - Engagements
      summary: Disconnect Engagement
      description: >
        Disconnects from an Engagement.
      operationId: disconnectEngagement
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DisconnectEngagement"
            examples:
              "Disconnect Engagement":
                $ref: "#/components/examples/DisconnectEngagement"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/engagements/{engagementId}":
    get:
      tags:
        - Engagements
      summary: Get Engagement
      description: |
        Gets an Engagement.
      operationId: getEngagement
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
        - name: sessionId
          description: "The unique 36 character internal id that represents the session."
          required: true
          in: query
          schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
            example: "fc741b00-710b-11eb-9439-0242ac130002"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Engagement"
              examples:
                "Get Engagement":
                  $ref: "#/components/examples/Engagement"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/engagements/{engagementId}:join":
    post:
      tags:
        - Engagements
      summary: Join Engagement
      description: Joins an Engagement as an active participant.
      operationId: joinEngagement
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/JoinEngagement"
            examples:
              default:
                $ref: "#/components/examples/JoinEngagement"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Engagement"
              examples:
                "Join Engagement":
                  $ref: "#/components/examples/Engagement"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
  "/{integrationType}/{integrationId}/engagements/{engagementId}/messages":
    post:
      tags:
        - Engagements
      summary: Send Message
      description: |
        Sends a message into a chat dialog of an Engagement.
      operationId: sendMessage
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/SendMessage"
            examples:
              "Send Message":
                $ref: "#/components/examples/SendMessage"
              "Send-Message-File":
                $ref: "#/components/examples/SendMessageRequestFile"
              "Send-Message-Image":
                $ref: "#/components/examples/SendMessageRequestImage"
              "Send-Message-Postback":
                $ref: "#/components/examples/SendMessageRequestPostback"
              "Send-Message-Location":
                $ref: "#/components/examples/SendMessageRequestLocation"
              "Send-Message-Reply":
                $ref: "#/components/examples/SendMessageReply"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessageSent"
              examples:
                "Send Message Response":
                  $ref: "#/components/examples/MessageSent"
                "Send Message Response with attachment":
                  $ref: "#/components/examples/MessageSentWithAttachment"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
    get:
      tags:
        - Engagements
      summary: List Messages
      description: |
        List messages that have been exchanged in a chat dialog of an Engagement.

        By default, this will return messages in descending order.
      operationId: listMessages
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
        - name: sessionId
          description: "The unique 36 character internal id that represents the session."
          required: true
          in: query
          schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
            example: "fc741b00-710b-11eb-9439-0242ac130002"
        - $ref: "#/components/parameters/dialogId"
        - $ref: "#/components/parameters/pageSize"
        - $ref: "#/components/parameters/pageNumber"
        - name: orderBy
          description: |
            Ordering is performed on the "receivedAt" field, the default order is descending.

            To specify ascending order, "asc" should be used.
          required: false
          in: query
          schema:
            type: string
            minLength: 3
            maxLength: 4
            default: "desc"
            example: "desc"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessagesPage"
              examples:
                "List Messages Page 1":
                  $ref: "#/components/examples/ListMessagesPage1"
                "List Messages Page 2":
                  $ref: "#/components/examples/ListMessagesPage2"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/engagements/{engagementId}:generateUploadUrl":
    post:
      tags:
        - Presigned URL
      summary: Generate Upload URI
      description: |
        Get a presigned URL to upload attachment.
      operationId: generateUploadUrl
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/engagementId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/GenerateUploadUrl"
            examples:
              "Generate Upload Url":
                $ref: "#/components/examples/GenerateUploadUrl"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/UploadUrl"
              examples:
                "Upload Signed Url":
                  $ref: "#/components/examples/UploadUrl"
        "400":
          $ref: "#/components/responses/BadRequestGenerateUploadURL"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/conversations/{conversationId}/messages":
    get:
      tags:
        - Conversations
      summary: List Conversation Messages
      description: |
        List messages that have been exchanged in a conversation (that might have involved multiple messaging dialogs).

        By default, this will return messages in descending order.
      operationId: listConversationMessages
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/conversationId"
        - name: sessionId
          description: "The unique 36 character internal id that represents the session."
          required: true
          in: query
          schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
            example: "fc741b00-710b-11eb-9439-0242ac130002"
        - $ref: "#/components/parameters/pageSize"
        - $ref: "#/components/parameters/pageNumber"
        - name: orderBy
          description: |
            Ordering is performed on the "receivedAt" field, the default order is descending.

            To specify ascending order, "asc" should be used.
          required: false
          in: query
          schema:
            type: string
            minLength: 3
            maxLength: 4
            default: "desc"
            example: "desc"
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/MessagesPage"
              examples:
                "List Conversations Page 1":
                  $ref: "#/components/examples/ListConversationsPage1"
                "List Conversations Page 2":
                  $ref: "#/components/examples/ListConversationsPage2"
                "List-Conversations-Page-Rich-Media":
                  $ref: "#/components/examples/ListConversationsPageRichMedia"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
  "/{integrationType}/{integrationId}/endpoints":
    post:
      tags:
        - Endpoints
      summary: Create endpoint
      description: Register the device as an endpoint for WebRTC capabilities
      operationId: createEndpoint
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Endpoint"
            examples:
              default:
                $ref: "#/components/examples/Endpoint"
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/EndpointResponse"
              examples:
                "Endpoint Response":
                  $ref: "#/components/examples/EndpointResponse"
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
  "/{integrationType}/{integrationId}/endpoints/{endpointId}":
    delete:
      tags:
        - Endpoints
      summary: Delete endpoint
      description: Delete endpoint registration
      operationId: deleteEndpoint
      parameters:
        - $ref: "#/components/parameters/integrationType"
        - $ref: "#/components/parameters/integrationId"
        - $ref: "#/components/parameters/endpointId"
      responses:
        "204":
          description: No Content
        "400":
          $ref: "#/components/responses/BadRequest"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/NotFound"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "503":
          $ref: "#/components/responses/ServiceUnavailable"
components:
  parameters:
    sessionId:
      name: sessionId
      description: "The unique 36 character internal id that represents the session."
      required: true
      in: path
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "fc741b00-710b-11eb-9439-0242ac130002"
    integrationId:
      name: integrationId
      description: "The unique 36 character id for this specific chat integration"
      required: true
      in: path
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "fc741b00-710b-11eb-9439-0242ac130002"
    integrationType:
      name: integrationType
      description: "The type of integration. 'integrations' for Chat SDK and 'messaging-integrations' for Messaging SDK"
      required: true
      in: path
      schema:
        type: string
        minLength: 4
        maxLength: 30
        example: "messaging-integrations"
    conversationId:
      name: conversationId
      description: "The unique 36 character internal id that represents the conversation."
      required: true
      in: path
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "9d7cf5b8-70ad-11eb-9439-0242ac130005"
    engagementId:
      name: engagementId
      description: "The unique 36 character internal id that represents the engagement."
      required: true
      in: path
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "8d7cf5b8-70ad-11eb-9439-0242ac130002"
    dialogId:
      name: dialogId
      description: "The unique 36 character internal id that represents the dialog."
      required: true
      in: query
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "fc741b00-710b-11eb-9439-0242ac130002"
    endpointId:
      name: endpointId
      description: "The unique 36 character internal id that represents the endpoint."
      required: true
      in: path
      schema:
        type: string
        minLength: 36
        maxLength: 36
        pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        example: "fc741b00-710b-11eb-9439-0242ac130002"
    pageSize:
      name: pageSize
      in: query
      description: The max number of messages in a page. Default value is 10, max value is 50
      schema:
        type: integer
        format: int32
        default: 10
        minimum: 1
        maximum: 50
        example: 10
    pageNumber:
      name: pageNumber
      in: query
      description: Page number of messages. Default value is 1
      schema:
        type: integer
        format: int32
        default: 1
        minimum: 1
        example: 1
  responses:
    BadRequestCreateSession:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            "Constraint Violation":
              $ref: "#/components/examples/ErrorConstraintViolation"
            "Max Sessions Limit Exceeded":
              $ref: "#/components/examples/MaxSessionsLimitExceeded"
    BadRequestCreateEngagement:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            "Constraint Violation":
              $ref: "#/components/examples/ErrorConstraintViolation"
            "Max Engagements Limit Exceeded":
              $ref: "#/components/examples/MaxEngagementsLimitExceeded"
    BadRequestGenerateUploadURL:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            "Constraint Violation":
              $ref: "#/components/examples/ErrorConstraintViolation"
            "Unsupported Media Type":
              $ref: "#/components/examples/UnSupportedAttachmentType"
    BadRequest:
      description: Bad Request
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: "#/components/examples/ErrorConstraintViolation"
    Unauthorized:
      description: Unauthorized.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: "#/components/examples/ErrorUnauthorized"
    Forbidden:
      description: Forbidden.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: "#/components/examples/ErrorForbidden"
    NotFound:
      description: Not Found.
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: '#/components/examples/ErrorNotFound'
    InternalServerError:
      description: Internal Server Error
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: "#/components/examples/ErrorInternalServerError"
    ServiceUnavailable:
      description: Service Unavailable
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/Problem"
          examples:
            default:
              $ref: "#/components/examples/ServiceUnavailable"
  schemas:
    UploadUrl:
      type: object
      required:
        - attachmentId
        - presignedUrl
      properties:
        attachmentId:
          type: string
          description: "The unique 36 character internal id for the attachment"
        presignedUrl:
          type: string
          description: "Presigned Url"
    Session:
      type: object
      required:
        - clientType
      properties:
        displayName:
          type: string
          maxLength: 70
          description: "The display name of the customer. Note, this field will be ignored if a customer name was already provided at the time of generating the JWT token."
          example: John Doe
        clientType:
          type: string
          minLength: 2
          maxLength: 70
          example: web
          description: "The type of client making the request"
        sessionParameters:
          type: object
          description: "Optional key/value session parameters for capturing properties of the user and the user's client device. Key is limited to 64 characters"
          maxProperties: 20
          additionalProperties:
            type: string
            maxLength: 256
        sessionId:
          readOnly: true
          type: string
          description: "The unique 36 character internal id that represents the session."
        participantId:
          readOnly: true
          type: string
          description: "The id that represents the participant."
        notificationParams:
          $ref: "#/components/schemas/NotificationParams"
        createdAt:
          readOnly: true
          type: string
          format: date-time
          description: "The datetime when the session was created (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
    NotificationParams:
      type: object
      required:
        - pushConfigId
      properties:
        pushConfigId:
          type: string
          description: >
            The unique 36 character internal id of the Push Notification
            Configuration (configured on admin portal), that will be used
            to send the push notifications for the session.
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
    SessionResponse:
      type: object
      allOf:
        - $ref: '#/components/schemas/Session'
        - properties:
            engagements:
              type: array
              items:
                $ref: "#/components/schemas/Engagement"
              description: "The list of active engagements"
            conversations:
              type: array
              items:
                $ref: "#/components/schemas/Conversation"
              description: "The list of active conversations. In single-conversation mode, only the user's default conversation will be part of this array"
    CreateEngagement:
      type: object
      required:
        - sessionId
      properties:
        sessionId:
          type: string
          description: "The unique 36 character internal id that represents the session."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        engagementParameters:
          type: object
          maxProperties: 20
          description: "Optional key/value context information on the dialog. This information might be used to make business decisions on how the dialog is treated. For example, the client application might want to send hints about customer's interest based on the customer's searches or FAQ browsing. Key is limited to 64 characters"
          additionalProperties:
            type: string
            maxLength: 256
        isPriority:
          type: boolean
          description: "Optional flag to indicate if this is a priority WebRTC engagement. Default value is false"
        mediaPreferences:
          type: object
          maxProperties: 20
          description: "Optional key/value media preferences. This information is used to setup WebRTC engagement. Key is limited to 64 characters"
          additionalProperties:
            type: boolean
    DisconnectEngagement:
      type: object
      required:
        - dialogId
        - sessionId
      properties:
        reason:
          type: string
          description: Reason for disconnecting from the chat dialog.
          enum:
            - USER_CLOSED
            - USER_INACTIVE
            - SYSTEM_CLOSED
          example: USER_CLOSED
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        sessionId:
          type: string
          description: "The unique 36 character internal id that represents the session."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
    JoinEngagement:
      type: object
      required:
        - dialogId
        - sessionId
      properties:
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        sessionId:
          type: string
          description: "The unique 36 character internal id that represents the session."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
    Conversation:
      type: object
      description: The conversation
      required:
        - conversationId
      properties:
        conversationId:
          type: string
          description: "The unique 36 character internal id that represents the conversation."
    Engagement:
      type: object
      description: The media specific element inside the engagement
      required:
        - engagementId
      properties:
        engagementId:
          type: string
          description: "The unique 36 character internal id that represents the engagement."
        conversationId:
          type: string
          description: "The unique 36 character internal id that represents the conversation."
        engagementParameters:
          type: object
          description: "Optional key/value context information on the dialog. This information might be used to make business decisions on how the dialog is treated. For example, the client application might want to send hints about customer's interest based on the customer's searches or FAQ browsing"
          additionalProperties:
            type: string
        dialogs:
          type: array
          items:
            $ref: "#/components/schemas/Dialog"
          description: "The list of active dialogs"
    Dialog:
      type: object
      description: The media specific element inside the dialog.
      required:
        - dialogId
        - dialogStatus
        - participants
        - createdAt
        - lastUpdatedAt
      properties:
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
        dialogStatus:
          $ref: "#/components/schemas/DialogStatus"
        participants:
          type: array
          items:
            $ref: "#/components/schemas/Participant"
          description: List of participants
        createdAt:
          type: string
          format: date-time
          description: "The datetime when the dialog was created (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
        lastUpdatedAt:
          type: string
          format: date-time
          description: "The datetime when the dialog was last updated (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
    DialogStatus:
      type: string
      description: Status of the dialog.
      enum:
        - PENDING
        - ACTIVE
        - TERMINATING
        - TERMINATED
    Endpoint:
      type: object
      required:
        - clientType
        - sessionId
        - displayName
      properties:
        sessionId:
          readOnly: true
          type: string
          description: "The unique 36 character internal id that represents the session."
        clientType:
          type: string
          minLength: 2
          maxLength: 70
          example: web
          description: "The type of client making the request"
        displayName:
          type: string
          maxLength: 70
          description: "The display name of the customer. Note, this field will be ignored if a customer name was already provided at the time of generating the JWT token."
          example: John Doe
        ttl:
          type: number
          description: "Endpoint session expiration time in seconds"
    EndpointResponse:
      type: object
      required:
        - endpointId
        - sessionId
        - webSocketSessionId
        - webSocketSessionToken
      allOf:
        - properties:
            endpointId:
              type: string
              description: "The unique 36 character internal id that represents the endpoint."
            displayName:
              type: string
              maxLength: 70
              description: "The display name of the customer. Note, this field will be ignored if a customer name was already provided at the time of generating the JWT token."
              example: John Doe
            sessionId:
              readOnly: true
              type: string
              description: "The unique 36 character internal id that represents the session."
            webSocketSessionId:
              type: string
              description: "The unique id that represents the websocket session"
            webSocketSessionToken:
              type: string
              description: "The unique token requires to establish websocket session"
    Participant:
      type: object
      description: The association between a dialog and a participant
      required:
        - participantId
        - participantType
      properties:
        participantId:
          type: string
          description: "The id that represents the participant."
        participantType:
          $ref: "#/components/schemas/ParticipantType"
        displayName:
          type: string
          description: "The display name of the participant"
    Pagination:
      type: object
      properties:
        pageNumber:
          type: integer
          description: The current page number.
        pageSize:
          type: integer
          description: The max number of records that can be retrieved on this page.
        total:
          type: integer
          description: The total number of records.
    Links:
      type: object
      description: Links of the adjacent pages
      properties:
        prev:
          type: string
          description: URL of the previous page. Blank if currently on the first page.
        next:
          type: string
          description: URL of the next page. Blank if currently on the last page.
    MessagesPage:
      type: object
      description: A message page that is sent in response of request to retrieving messages
      properties:
        pagination:
          $ref: "#/components/schemas/Pagination"
        messages:
          type: array
          items:
            $ref: "#/components/schemas/Message"
        links:
          $ref: "#/components/schemas/Links"
    Message:
      type: object
      description: A conversation message
      required:
        - participantType
        - senderParticipantId
        - body
        - messageId
      properties:
        messageId:
          type: string
          description: "The unique 36 character internal id for this specific message."
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
        engagementId:
          type: string
          description: "The unique 36 character internal id that represents the engagement."
        conversationId:
          type: string
          description: "The unique 36 character internal id that represents the conversation."
        senderParticipantId:
          type: string
          description: "The unique 36 character id (uuid) that represents the sender of the message"
        body:
          $ref: "#/components/schemas/BodyElement"
        messageIndex:
          type: integer
          description: "The index of the message within the context of the dialog"
        parentMessageId:
          type: string
          description: "The unique 36 character internal id for the message that is the parent of this message"
        participantType:
          $ref: "#/components/schemas/ParticipantType"
        displayName:
          type: string
          description: Display name of the participant
        attachments:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/Attachment"
          description: "List of Attachments"
        receivedAt:
          type: string
          format: date-time
          description: "The datetime when the message was received by the Contact Center (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
        lastUpdatedAt:
          type: string
          format: date-time
          description: "The datetime when the message was updated by the Contact Center (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
    SendMessage:
      type: object
      required:
        - dialogId
        - sessionId
        - body
      properties:
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        sessionId:
          type: string
          description: "The unique 36 character internal id that represents the session."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        body:
          $ref: "#/components/schemas/BodyElement"
        parentMessageId:
          type: string
          description: "The unique 36 character internal id for the message that is the parent of this message."
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
          example: "c44545f6-c8a4-445a-abe8-983a5cbe1ed0"
    GenerateUploadUrl:
      type: object
      required:
        - attachmentName
        - attachmentSize
        - attachmentType
      properties:
        attachmentName:
          type: string
          description: "Name of the attachment to be uploaded"
          minLength: 1
          maxLength: 100
        attachmentType:
          type: string
          description: "Type of the attachment to be uploaded"
          minLength: 1
          maxLength: 100
          example: image/png
        attachmentSize:
          type: integer
          description: "The size of the attachment in bytes"
          format: int64
          minimum: 1
          example: 922
    MessageSent:
      type: object
      allOf:
        - $ref: '#/components/schemas/Message'
        - properties:
            sessionId:
              type: string
              description: "The unique 36 character internal id for this specific session."
    BodyElement:
      type: object
      description: "Definition of the body element such as the type of element, the message text and format"
      required:
        - elementType
        - elementText
      properties:
        elementType:
          type: string
          minLength: 1
          maxLength: 50
          description: "The type of the body element such as text, image, file, postback, carousel, location"
          example: text
        elementText:
          $ref: "#/components/schemas/ElementText"
        richMediaPayload:
          $ref: "#/components/schemas/RichMediaPayload"
    RichMediaPayload:
      type: object
      description: "Rich media payload data"
      properties:
        attachmentIds:
          type: array
          writeOnly: true
          description: "An array of ids of the media attached to the message. Currently restricted to a single attachment per message"
          maxItems: 1
          items:
            $ref: "#/components/schemas/AttachmentId"
        selectedAction:
          $ref: "#/components/schemas/Action"
        actions:
          type: array
          description: "An array of actions associated with the message"
          minItems: 1
          maxItems: 5
          readOnly: true
          items:
            $ref: "#/components/schemas/Action"
        items:
          type: array
          description: "An array of items associated with the message"
          minItems: 1
          maxItems: 10
          readOnly: true
          items:
            $ref: "#/components/schemas/Item"
        coordinates:
          $ref: "#/components/schemas/Coordinates"
        location:
          $ref: "#/components/schemas/Location"
    Attachment:
      type: object
      description: Meta information about the media
      required:
        - attachmentId
        - name
        - size
        - contentType
        - url
      properties:
        attachmentId:
          type: string
          description: "The unique 36 character internal id for the attachment"
          minLength: 36
          maxLength: 36
          pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
        name:
          type: string
          description: "The name of the attachment"
        size:
          type: integer
          format: int64
          description: "The size of the attachment in bytes"
        contentType:
          type: string
          description: "The content type of the attachment"
        contentId:
          type: string
          maxLength: 256
          description: "The content id of the attachment"
        url:
          type: string
          description: "The URL link to retrieve the attachment"
        captionText:
          type: string
          description: "The text describing the caption of the attachment"
        thumbnailUrl:
          type: string
          description: "The URL link to retrieve the thumbnail of the attachment"
        additionalProperties:
          type: object
          description: Any additional properties of the attachment like labels, tags, revision numbers, display properties, etc.
          additionalProperties:
            type: string
    Action:
      type: object
      description: "An action button that the user can click to trigger an action"
      required:
        - type
      properties:
        type:
          type: string
          description: "The type of action. Supported types of action types are link, reply, postback, and locationRequest. Messages sent by customer are allowed to have only reply and postback as action type."
          minLength: 1
          maxLength: 50
          example: postback
        text:
          type: string
          description: "The text on an action button"
          maxLength: 50
          example: Book Appointment
        payload:
          type: string
          description: "The payload of 'postback' or 'reply' action button"
          maxLength: 512
          example: "BOOK_APPOINTMENT"
        uri:
          type: string
          description: "The URI that will be used by the clients when 'link' action button is clicked. Supports only https url."
          format: uri
          maxLength: 2048
          example: https://example.com/items/info
        iconUrl:
          type: string
          description: "The URL of the image of the icon on a 'reply' action button.  Supports only https url."
          format: uri
          maxLength: 2048
          example: https://example.com/images/icon.png
    Coordinates:
      type: object
      description: "The coordinates of a location"
      required:
        - lat
        - long
      properties:
        lat:
          type: number
          description: "The latitude of a location"
          format: double
          minimum: -90
          maximum: 90
          example: -18.516634
        long:
          type: number
          description: "The longitude of a location"
          format: double
          minimum: -180
          maximum: 180
          example: 73.928104
    Location:
      type: object
      description: "The information about a location"
      properties:
        address:
          type: string
          description: "The address of the location"
          maxLength: 512
          example: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
        name:
          type: string
          description: "The name of the location"
          maxLength: 50
          example: ABC Enterprises
    Item:
      type: object
      description: "An item of a carousel or a list"
      required:
        - title
        - actions
      properties:
        title:
          type: string
          description: "The title of the item in carousel or list"
          minLength: 1
          maxLength: 50
          example: Tacos
        mediaUrl:
          type: string
          description: "The URL of the image to be shown inside the item in carousel or list"
          format: uri
          maxLength: 2048
          example: https://example.com/images/image.png
        description:
          type: string
          description: "Description of the item in carousel or list"
          maxLength: 256
          example: Car with hybrid features
        actions:
          type: array
          description: "An array of actions associated with the item in carousel or list"
          minItems: 1
          maxItems: 5
          items:
            $ref: "#/components/schemas/Action"
    AttachmentId:
      type: string
      description: Id of attachment uploaded along with the message
      minLength: 36
      maxLength: 36
      pattern: '^[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}$'
    ElementText:
      type: object
      description: "The text of the message body"
      required:
        - text
      properties:
        text:
          type: string
          maxLength: 4096
          description: Text of the body
          example: "Need documentation for insurance details"
        textFormat:
          $ref: "#/components/schemas/TextFormat"
    TextFormat:
      description: "The text format of the message in the body"
      example: PLAINTEXT
      type: string
      enum:
        - PLAINTEXT
        - HTML
        - MARKDOWN
    ParticipantType:
      description: "The type of participant"
      type: string
      enum:
        - CUSTOMER
        - AGENT
        - SUPERVISOR
        - SYSTEM
        - BOT
    Event:
      type: object
      description: Common event data
      required:
        - eventId
        - eventType
        - eventDate
        - sessionId
      properties:
        eventId:
          type: string
          description: "The unique id of the event"
        eventType:
          description: "The type of digital event to subscribe for"
          type: string
          enum:
            - MESSAGE
            - PARTICIPANT_ADDED
            - PARTICIPANT_DISCONNECTED
            - ENGAGEMENT_CREATED
            - ENGAGEMENT_ERROR
        eventDate:
          type: string
          format: date-time
          description: "The datetime of when the event was generated by the Contact Center (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
        sessionId:
          type: string
          description: "The unique 36 character internal id that represents the session."
          example: d3c8400d-d34f-4451-8316-4333334fac34
        dialogId:
          type: string
          description: "The unique 36 character internal id that represents the dialog."
        engagementId:
          type: string
          description: "The unique 36 character internal id that represents the engagement."
        conversationId:
          type: string
          description: "The unique 36 character internal id that represents the conversation."
        participant:
          $ref: "#/components/schemas/Participant"
        message:
          $ref: "#/components/schemas/MessageEvent"
        error:
          $ref: "#/components/schemas/ErrorEvent"
    MessageEvent:
      type: object
      description: Message Event
      required:
        - messageId
        - body
      properties:
        messageId:
          type: string
          description: "The unique 36 character internal id for this specific message."
        body:
          $ref: "#/components/schemas/BodyElement"
        attachments:
          type: array
          readOnly: true
          items:
            $ref: "#/components/schemas/Attachment"
        messageIndex:
          type: integer
          description: "The index of the message within the context of the dialog"
        parentMessageId:
          type: string
          description: "The unique 36 character internal id for the message that is the parent of this message"
        receivedAt:
          type: string
          format: date-time
          description: "The datetime when the message was received by the Contact Center (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
        lastUpdatedAt:
          type: string
          format: date-time
          description: "The datetime when the message was updated by the Contact Center (in ISO 8601 format including timezone, 'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z')"
    ErrorEvent:
      type: object
      description: Error Event
      required:
        - type
        - title
      properties:
        type:
          type: string
          description: "The type of error"
        title:
          type: string
          description: "The title (summary) of the error"
        detail:
          type: string
          description: "The detailed description of the error"
    Problem:
      type: object
      description: |
        <b>Problem Detail</b> as a way to carry machine-readable details of errors in a HTTP response to avoid the need to define new error response formats for HTTP APIs <a href="https://tools.ietf.org/html/rfc7807">RFC 7807</a>
      properties:
        type:
          type: string
          format: uri
          description: |
            An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML).
          default: 'about:blank'
          example: 'https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation'
        title:
          type: string
          description: |
            A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized).
          example: Service Unavailable
          nullable: true
        status:
          type: integer
          format: int32
          description: |
            The HTTP status code generated by the origin server for this occurrence of the problem.
          minimum: 100
          maximum: 600
          exclusiveMaximum: true
          example: 503
          nullable: true
        detail:
          type: string
          description: |
            A human readable explanation specific to this occurrence of the problem.
          example: Connection to database timed out
          nullable: true
        instance:
          type: string
          format: uri
          description: |
            An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
          nullable: true
        violations:
          type: array
          description: |
            A list of violations that occurred as a result of invalid data provided as part of a request.
          nullable: true
          items:
            type: object
            properties:
              field:
                type: string
                description: |
                  The name of the field in the request that caused the violation. This can be the name of a path parameter, query parameter, or a field within the request body.
                example: accountId
              message:
                type: string
                description: |
                  A human readable explanation specific to this occurrence of the violation.
                example: "must match \"^[a-zA-Z]{6}$\""
              code:
                type: integer
                format: int32
                description: |
                  The violation code generated by the server for this occurrence of the violation. Use this code when implementing any error handling logic instead of the message, as the message can change.
                example: 20006
          example:
            - field: emailAddress
              message: "must not be null"
              code: 20002
            - field: accountId
              message: "must match \"^[a-zA-Z]{6}$\""
              code: 20006
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: This API uses Bearer Token Authorization Flow
      bearerFormat: JWT
  examples:
    StartSession:
      value:
        displayName: John Doe
        clientType: web
        sessionParameters:
          language: english
          device: mobile
          app: chrome-mobile
        notificationParams:
          pushConfigId: "32bb6842-59e7-41f9-9178-e51391b169fe"
    ListSessions:
      value:
        - sessionId: fc741b00-710b-11eb-9439-0242ac130002
          displayName: John Doe
          clientType: web
          sessionParameters:
            language: english
            device: mobile
            app: chrome-mobile
          notificationParams:
            pushConfigId: "32bb6842-59e7-41f9-9178-e51391b169fe"
          participantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
          createdAt: "2021-11-13T20:25:39.534Z"
    Session:
      value:
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        displayName: John Doe
        clientType: web
        sessionParameters:
          language: english
          device: mobile
          app: chrome-mobile
        notificationParams:
          pushConfigId: "32bb6842-59e7-41f9-9178-e51391b169fe"
        participantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
        createdAt: "2021-11-13T20:25:39.534Z"
        conversations:
          - conversationId: 6878e1e8-fc89-3233-a513-3656ba8f10ea
    SessionWithEngagement:
      value:
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        displayName: John Doe
        clientType: web
        sessionParameters:
          language: english
          device: mobile
          app: chrome-mobile
        notificationParams:
          pushConfigId: "32bb6842-59e7-41f9-9178-e51391b169fe"
        participantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
        createdAt: "2021-11-13T20:25:39.534Z"
        engagements:
          - engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            engagementParameters:
              model: 512GTB
              interestedModel: 488GTB
            dialogs:
              - dialogId: 40374765-2b39-4b11-98b1-79545337dd30
                dialogStatus: ACTIVE
                participants:
                  - participantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
                    participantType: CUSTOMER
                    displayName: John Doe
                  - participantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
                    participantType: AGENT
                    displayName: Scott Adams
                createdAt: "2021-11-13T20:25:39.534Z"
                lastUpdatedAt: "2021-11-13T20:25:39.734Z"
        conversations:
          - conversationId: 6878e1e8-fc89-3233-a513-3656ba8f10ea
    CreateEngagement:
      value:
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        engagementParameters:
          model: 512GTB
          interestedModel: 488GTB
    Engagement:
      value:
        engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
        engagementParameters:
          model: 512GTB
          interestedModel: 488GTB
        dialogs:
          - dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            dialogStatus: ACTIVE
            participants:
              - participantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
                participantType: CUSTOMER
                displayName: John Doe
              - participantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
                participantType: AGENT
                displayName: Scott Adams
            createdAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    DisconnectEngagement:
      value:
        reason: USER_CLOSED
        dialogId: 40374765-2b39-4b11-98b1-79545337dd30
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
    JoinEngagement:
      value:
        dialogId: 40374765-2b39-4b11-98b1-79545337dd30
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
    Endpoint:
      value:
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        clientType: web
        displayName: John Doe
    EndpointResponse:
      value:
        endpointId: 4dc53692-e25c-4e8c-a780-0b2f0500847
        clientType: web
        displayName: John Doe
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        webSocketSessionId: 4dc53692-e25c-4e8c-a780-0b2f05008478
        webSocketSessionToken: 4dc53692-e25c-4e8c-a780-0b2f05008478
        ttl: 7200
    SendMessage:
      value:
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: text
          elementText:
            text: "Hi Everyone"
            textFormat: PLAINTEXT
        parentMessageId: c44545f6-c8a4-445a-abe8-983a5cbe1ed0
    SendMessageRequestFile:
      value:
        sessionId: 10494b78-710c-11eb-9439-0242ac130002
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: file
          elementText:
            text: These files contains car's brochure
            textFormat: PLAINTEXT
          richMediaPayload:
            attachmentIds:
              - 46132c4b-b0fe-4901-8b81-1810832f7a32
        parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
    SendMessageRequestImage:
      value:
        sessionId: 10494b78-710c-11eb-9439-0242ac130002
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: image
          elementText:
            text: Car's Front View for insurance
            textFormat: PLAINTEXT
          richMediaPayload:
            attachmentIds:
              - 6e232c4b-b0fe-4901-8b81-288ec7de9e4c
        parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
    SendMessageRequestPostback:
      value:
        sessionId: 10494b78-710c-11eb-9439-0242ac130002
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: postback
          elementText:
            text: ""
            textFormat: PLAINTEXT
          richMediaPayload:
            selectedAction:
              type: postback
              text: Book Appointment
              payload: "BOOK_APPOINTMENT"
        parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
    SendMessageRequestLocation:
      value:
        sessionId: 10494b78-710c-11eb-9439-0242ac130002
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: location
          elementText:
            text: ""
            textFormat: PLAINTEXT
          richMediaPayload:
            coordinates:
              lat: -18.516634
              long: 73.928104
            location:
              address: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
              name: ABC Enterprises
        parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
    SendMessageReply:
      value:
        sessionId: 10494b78-710c-11eb-9439-0242ac130002
        dialogId: fc741b00-710b-11eb-9439-0242ac130002
        body:
          elementType: reply
          elementText:
            text: ""
            textFormat: PLAINTEXT
          richMediaPayload:
            selectedAction:
              type: reply
              text: Good
              payload: "GOOD"
              iconUrl: https://example.com/icons/good.png
        parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
    GenerateUploadUrl:
      value:
        attachmentName: good.png
        attachmentSize: 9088
        attachmentType: image/png
    UploadUrl:
      value:
        attachmentId: 6e232c4b-b0fe-4901-8b81-288ec7de9e4c
        presignedUrl: https://HOST-REGION.api.avayacloud.com/sdk/digital/chat/v1/media/68932c4b-b0fe-4901-8b81-288ec7de9e4c&type=pdf&expiry=1662036657&Signature=12b74b0788aa036bc7c3d03b3f20c61f1f91cc9ad8873e3314255dc479a25351
    ListMessagesPage1:
      value:
        pagination:
          pageNumber: 1
          pageSize: 2
          total: 4
        messages:
          - messageId: a852745w-474c-99kf-8364-0242ac22338904
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
            body:
              elementType: text
              elementText:
                text: "I need some help to sell my car"
                textFormat: PLAINTEXT
            messageIndex: 1
            parentMessageId: c44545f6-c8a4-445a-abe8-983a5cbe1ed0
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: b987232w-474c-99kf-8364-0242ac22334455
            dialogId: fc741b00-710b-11eb-9439-0242ac130002
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: "Sure. How long have you been using it?"
                textFormat: PLAINTEXT
            messageIndex: 2
            parentMessageId: 1744c820-a597-4060-9dd3-eaa3bd2395c4
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        links:
          prev: ""
          next: "/sdk/digital/chat/v1/integrations/a8b5b6aa-d242-4d77-9d0e-f7b5097525f6/engagements/39e1a438-d104-479a-bf5c-6c7c09a79e8c/messages?dialogId=8526dba4-76d0-4e35-91cd-437d847adaa2sessionId=0123b41b-1a29-4d93-81eb-1cb34fb10fa5&pageNumber=2&pageSize=2"
    ListMessagesPage2:
      value:
        pagination:
          pageNumber: 2
          pageSize: 2
          total: 4
        messages:
          - messageId: a852745w-474c-99kf-8364-0242ac22338904
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
            body:
              elementType: text
              elementText:
                text: "I have been driving it for about 4 years now"
                textFormat: PLAINTEXT
            messageIndex: 3
            parentMessageId: 0a149a22-1581-48e7-bc9c-001d7c76d860
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: b987232w-474c-99kf-8364-0242ac22334455
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: "What is the make and model?"
                textFormat: PLAINTEXT
            messageIndex: 4
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        links:
          prev: "/sdk/digital/chat/v1/integrations/a8b5b6aa-d242-4d77-9d0e-f7b5097525f6/engagements/39e1a438-d104-479a-bf5c-6c7c09a79e8c/messages?dialogId=8526dba4-76d0-4e35-91cd-437d847adaa2sessionId=0123b41b-1a29-4d93-81eb-1cb34fb10fa5&pageNumber=1&pageSize=2"
          next: ""
    ListConversationsPage1:
      value:
        pagination:
          pageNumber: 1
          pageSize: 2
          total: 4
        messages:
          - messageId: a852745w-474c-99kf-8364-0242ac22338904
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
            body:
              elementType: text
              elementText:
                text: "I need some help to sell my car"
                textFormat: PLAINTEXT
            messageIndex: 1
            parentMessageId: c44545f6-c8a4-445a-abe8-983a5cbe1ed0
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: b987232w-474c-99kf-8364-0242ac22334455
            dialogId: fc741b00-710b-11eb-9439-0242ac130002
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: "Sure. How long have you been using it?"
                textFormat: PLAINTEXT
            messageIndex: 2
            parentMessageId: 1744c820-a597-4060-9dd3-eaa3bd2395c4
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        links:
          prev: ""
          next: "/sdk/digital/chat/v1/messaging-integrations/10494b78-710c-11eb-9439-0242ac130002/conversations/fc741b00-710b-11eb-9439-0242ac130002/messages?sessionId=fc741b00-710b-11eb-9439-0242ac130002&pageNumber=2&pageSize=2"
    ListConversationsPage2:
      value:
        pagination:
          pageNumber: 2
          pageSize: 2
          total: 4
        messages:
          - messageId: a852745w-474c-99kf-8364-0242ac22338904
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
            body:
              elementType: text
              elementText:
                text: "I have been driving it for about 4 years now"
                textFormat: PLAINTEXT
            messageIndex: 3
            parentMessageId: 0a149a22-1581-48e7-bc9c-001d7c76d860
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: b987232w-474c-99kf-8364-0242ac22334455
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: "What is the make and model?"
                textFormat: PLAINTEXT
            messageIndex: 4
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        links:
          prev: "/sdk/digital/chat/v1/messaging-integrations/10494b78-710c-11eb-9439-0242ac130002/conversations/fc741b00-710b-11eb-9439-0242ac130002/messages?sessionId=fc741b00-710b-11eb-9439-0242ac130002&pageNumber=1&pageSize=2"
          next: ""
    ListConversationsPageRichMedia:
      value:
        pagination:
          pageNumber: 1
          pageSize: 10
          total: 11
        messages:
          - messageId: a852745w-474c-99kf-8364-0242ac22338904
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
            body:
              elementType: carousel
              elementText:
                text: "Here are car details"
                textFormat: PLAINTEXT
              richMediaPayload:
                items:
                  - mediaUrl: https://example.com/cars/images/carmodel1.png
                    description: This is hybrid car
                    title: CarModel1
                    actions:
                      - payload: CAR_MODEL_1
                        text: Select
                        type: postback
                      - text: More info
                        type: link
                        uri: https://example.com/cars/info-carmodel1
                  - mediaUrl: https://example.com/cars/images/carmodel2.png
                    description: This is hybrid car
                    title: CarModel2
                    actions:
                      - payload: CAR_MODEL_2
                        text: Select
                        type: postback
                      - text: More info
                        type: link
                        uri: https://example.com/cars/info-carmodel2
            messageIndex: 5
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: You can visit this showroom near to you
                textFormat: PLAINTEXT
              richMediaPayload:
                coordinates:
                  lat: -18.516634
                  long: 73.928104
                location:
                  address: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
                  name: Showroom Address
            messageIndex: 6
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: location
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                coordinates:
                  lat: -18.516634
                  long: 73.928104
                location:
                  address: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
                  name: ABC Enterprises
            messageIndex: 7
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: Get car details
                textFormat: PLAINTEXT
              richMediaPayload:
                actions:
                  - type: postback
                    text: Book Appointment
                    payload: "BOOK_APPOINTMENT"
                  - type: link
                    text: Get more information
                    uri: https://example.com/documents/info
                  - type: locationRequest
                    text: Send Your Location
            messageIndex: 8
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: image
              elementText:
                text: Car's Front View
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            messageIndex: 9
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4c
              name: good.png
              size: 993
              contentType: image/png
              contentId: "4307935"
              url: "https://somedomain.com/good.png"
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: file
              elementText:
                text: This file contains car's brochure
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            messageIndex: 10
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4c
              name: good.pdf
              size: 993
              contentType: application/pdf
              contentId: "4307935"
              url: "https://somedomain.com/good.pdf"
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: f314569c-710b-11eb-9439-0242ac130002
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: text
              elementText:
                text: Please rate your conversation
                textFormat: PLAINTEXT
              richMediaPayload:
                actions:
                  - type: reply
                    text: Upset
                    payload: "UPSET"
                    iconUrl: https://example.com/icons/upset.png
                  - type: reply
                    text: Good
                    payload: "GOOD"
                    iconUrl: https://example.com/icons/good.png
                  - type: reply
                    text: Perfect
                    payload: "PERFECT"
                    iconUrl: https://example.com/icons/perfect.png
            messageIndex: 11
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: AGENT
            displayName: Scott Adams
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: a852745w-474c-99kf-8364-0242ac22338905
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: file
              elementText:
                text: This file contains car's brochure
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            messageIndex: 12
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: a852745w-474c-99kf-8364-0242ac22338905
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: image
              elementText:
                text: Car's Front View for insurance
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            messageIndex: 13
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: a852745w-474c-99kf-8364-0242ac22338905
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: postback
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                selectedAction:
                  type: postback
                  text: Book Appointment
                  payload: "BOOK_APPOINTMENT"
            messageIndex: 14
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
          - messageId: a852745w-474c-99kf-8364-0242ac22338905
            dialogId: 40374765-2b39-4b11-98b1-79545337dd30
            engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
            senderParticipantId: e3c8400d-c44f-4451-8316-e75c4efb8cc7
            body:
              elementType: reply
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                selectedAction:
                  type: reply
                  text: Good
                  payload: "GOOD"
                  iconUrl: https://example.com/icons/good.png
            messageIndex: 15
            parentMessageId: 289f460b-3398-4c96-b5d0-23ae03390f4a
            participantType: CUSTOMER
            displayName: John Doe
            receivedAt: "2021-11-13T20:25:39.534Z"
            lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        links:
          prev: ""
          next: "/sdk/digital/chat/v1/messaging-integrations/10494b78-710c-11eb-9439-0242ac130002/conversations/fc741b00-710b-11eb-9439-0242ac130002/messages?sessionId=fc741b00-710b-11eb-9439-0242ac130002&pageNumber=2&pageSize=10"
    MessageSent:
      value:
        messageId: a852745w-474c-99kf-8364-0242ac22338904
        dialogId: 40374765-2b39-4b11-98b1-79545337dd30
        engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
        senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
        conversationId: 6878e1e8-fc89-3233-a513-3656ba8f10ea
        body:
          elementType: text
          elementText:
            text: "I have been driving it for about 4 years now"
            textFormat: PLAINTEXT
        messageIndex: 3
        parentMessageId: 0a149a22-1581-48e7-bc9c-001d7c76d860
        participantType: CUSTOMER
        displayName: John Doe
        receivedAt: "2021-11-13T20:25:39.534Z"
        lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
    MessageSentWithAttachment:
      value:
        messageId: a852745w-474c-99kf-8364-0242ac22338904
        dialogId: 40374765-2b39-4b11-98b1-79545337dd30
        engagementId: 133fbaab-de2f-4927-b76a-5d379ef340f3
        senderParticipantId: 4dc53692-e25c-4e8c-a780-0b2f05008478
        conversationId: 6878e1e8-fc89-3233-a513-3656ba8f10ea
        body:
          elementType: image
          elementText:
            text: "I have been driving it for about 4 years now"
            textFormat: PLAINTEXT
          richMediaPayload:
            attachmentIds:
              - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
        messageIndex: 3
        attachments:
          - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            name: good.png
            size: 993
            contentType: image/png
            contentId: "4307935"
            url: "https://HOST-REGION.api.avayacloud.com/sdk/digital/chat/v1/media/68932c4b-b0fe-4901-8b81-288ec7de9e4c&type=pdf&expiry=1662036657&Signature=12b74b0788aa036bc7c3d03b3f20c61f1f91cc9ad8873e3314255dc479a25351"
        parentMessageId: 0a149a22-1581-48e7-bc9c-001d7c76d860
        participantType: CUSTOMER
        displayName: John Doe
        receivedAt: "2021-11-13T20:25:39.534Z"
        lastUpdatedAt: "2021-11-13T20:25:39.834Z"
        sessionId: fc741b00-710b-11eb-9439-0242ac130002
    ErrorConstraintViolation:
      description: Constraint Violation
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation"
        title: "Constraint Violation"
        status: 400
        detail: "A problem that indicates a syntactically correct, yet semantically illegal request. The Server can not process this request until the client resolves the semantic errors described in the violations section."
        violations:
          - field: integrationId
            message: "must match \"^[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12}$\""
            code: 20006
    MaxSessionsLimitExceeded:
      description: Constraint Violation
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation"
        title: "Constraint Violation"
        status: 400
        detail: "A problem that indicates a max limit set for no of sessions per user has exceeded. The Server can not process this request until existing session(s) are terminated."
        violations:
          - message: "Maximum number of sessions allowed for an user has exceeded"
    UnSupportedAttachmentType:
      description: Constraint Violation
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation"
        title: "Constraint Violation"
        status: 400
        detail: "A problem that indicates attachment file to be uploaded has invalid type."
        violations:
          - field: attachmentType
            message: "Unsupported attachment type"
    MaxEngagementsLimitExceeded:
      description: Constraint Violation
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#constraint-violation"
        title: "Constraint Violation"
        status: 400
        detail: "A problem that indicates a max limit set for no of engagements per user has exceeded. The Server can not process this request until existing engagement(s) are terminated."
        violations:
          - message: "Maximum number of engagements allowed for an user has exceeded"
    ErrorUnauthorized:
      description: Unauthorized
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#unauthorized"
        title: "Unauthorized"
        status: 401
        detail: "This operation requires authentication. See https://developers.avayacloud.com/onecloud-ccaas/docs/how-to-authenticate-with-ccaas-apis"
    ErrorForbidden:
      description: Forbidden
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#forbidden"
        title: "Forbidden"
        status: 403
        detail: "According to the access control policy the current user and/or integrationId does not have permission to access this resource."
    ErrorNotFound:
      description: Not Found
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#not-found"
        title: "Not Found"
        status: 404
        detail: "Either there is no API method associated with the URL path of the request, or the request refers to one or more resources that were not found."
    ErrorInternalServerError:
      description: Server Error
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#server-error"
        title: "Server Error"
        status: 500
        detail: "An internal server error was encountered."
    ServiceUnavailable:
      description: Service Unavailable
      value:
        type: "https://developers.avayacloud.com/onecloud-ccaas/docs/error-handling#service-unavailable"
        title: "Service Unavailable"
        status: 503
    Participant-Added-Event:
      value:
        - eventType: PARTICIPANT_ADDED
          eventId: f844f3ea-bdd6-41f1-a718-f0cd34b0b786
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: fc741b00-710b-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
    Participant-Disconnected-Event:
      value:
        - eventType: PARTICIPANT_DISCONNECTED
          eventId: e412bcb5-5f45-4fc8-b581-7108becc1266
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: fc741b00-710b-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
    Message-Event:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: text
              elementText:
                text: How may I help?
                textFormat: PLAINTEXT
            messageIndex: 1
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerFile:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: file
              elementText:
                text: This file contains car's brochure
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4c
            messageIndex: 2
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4c
              name: good.pdf
              size: 993
              contentType: application/pdf
              contentId: "4307935"
              url: "https://somedomain.com/good.pdf"
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerImage:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: image
              elementText:
                text: Car's Front View
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4f
            messageIndex: 3
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4f
              name: good.png
              size: 993
              contentType: image/png
              contentId: "4307935"
              url: "https://somedomain.com/good.png"
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerPostbackLinkLocationRequest:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: text
              elementText:
                text: Get car details
                textFormat: PLAINTEXT
              richMediaPayload:
                actions:
                  - type: postback
                    text: Book Appointment
                    payload: "BOOK_APPOINTMENT"
                  - type: link
                    text: Get more information
                    uri: https://example.com/documents/info
                  - type: locationRequest
                    text: Send Your Location
            messageIndex: 3
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerReply:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: text
              elementText:
                text: Please rate your conversation
                textFormat: PLAINTEXT
              richMediaPayload:
                actions:
                  - type: reply
                    text: Upset
                    payload: "UPSET"
                    iconUrl: https://example.com/icons/upset.png
                  - type: reply
                    text: Good
                    payload: "GOOD"
                    iconUrl: https://example.com/icons/good.png
                  - type: reply
                    text: Perfect
                    payload: "PERFECT"
                    iconUrl: https://example.com/icons/perfect.png
            messageIndex: 4
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerCarousel:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: carousel
              elementText:
                text: "Here are car details"
                textFormat: PLAINTEXT
              richMediaPayload:
                items:
                  - mediaUrl: https://example.com/cars/images/carmodel1.png
                    description: This is hybrid car
                    title: CarModel1
                    actions:
                      - payload: CAR_MODEL_1
                        text: Select
                        type: postback
                      - text: More info
                        type: link
                        uri: https://example.com/cars/info-carmodel1
                  - mediaUrl: https://example.com/cars/images/carmodel2.png
                    description: This is hybrid car
                    title: CarModel2
                    actions:
                      - payload: CAR_MODEL_2
                        text: Select
                        type: postback
                      - text: More info
                        type: link
                        uri: https://example.com/cars/info-carmodel2
            messageIndex: 6
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    AgentToCustomerLocation:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: text
              elementText:
                text: You can visit this showroom near to you
                textFormat: PLAINTEXT
              richMediaPayload:
                coordinates:
                  lat: -18.516634
                  long: 73.928104
                location:
                  address: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
                  name: Showroom Address
            messageIndex: 7
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    CustomerToAgentLocation:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: CUSTOMER
            displayName: John Doe
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: location
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                coordinates:
                  lat: -18.516634
                  long: 73.928104
                location:
                  address: Nth Floor, UVW Park, XYZ Street, Some Country, PIN CODE - 123456
                  name: ABC Enterprises
            messageIndex: 7
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    CustomerToAgentFile:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: CUSTOMER
            displayName: John Doe
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: file
              elementText:
                text: This file contains car's brochure
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4d
            messageIndex: 7
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4d
              name: good.pdf
              size: 993
              contentType: application/pdf
              contentId: "4307935"
              url: "https://somedomain.com/good.pdf"
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    CustomerToAgentImage:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: CUSTOMER
            displayName: John Doe
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: image
              elementText:
                text: Car's Front View for insurance
                textFormat: PLAINTEXT
              richMediaPayload:
                attachmentIds:
                  - 68932c4b-b0fe-4901-8b81-288ec7de9e4e
            messageIndex: 7
            attachments:
            - attachmentId: 68932c4b-b0fe-4901-8b81-288ec7de9e4e
              name: good.png
              size: 993
              contentType: image/png
              contentId: "4307935"
              url: "https://HOST-REGION.api.avayacloud.com/sdk/digital/chat/v1/media/68932c4b-b0fe-4901-8b81-288ec7de9e4e&type=png&expiry=1662036657&Signature=12b74b0788aa036bc7c3d03b3f20c61f1f91cc9ad8873e3314255dc479a25351"
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    CustomerToAgentPostback:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: CUSTOMER
            displayName: John Doe
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: postback
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                selectedAction:
                  type: postback
                  text: Book Appointment
                  payload: "BOOK_APPOINTMENT"
            messageIndex: 7
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    CustomerToAgentReply:
      value:
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2018-11-13T20:25:39.734Z"
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          engagementId: 8d7cf5b8-70ad-11eb-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: CUSTOMER
            displayName: John Doe
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: reply
              elementText:
                text: ""
                textFormat: PLAINTEXT
              richMediaPayload:
                selectedAction:
                  type: reply
                  text: Good
                  payload: "GOOD"
                  iconUrl: https://example.com/icons/good.png
            messageIndex: 7
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
    Engagement-Created-Event:
      value:
        - eventType: ENGAGEMENT_CREATED
          eventId: f978622b-6c45-498e-964f-aa18d317bff7
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
    Engagement-Error-Event:
      value:
        - eventType: ENGAGEMENT_ERROR
          eventId: f3a4acb9-ea1c-4745-bed7-adff49b6e802
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: f115434a-ede0-4429-b67a-9530b313528c
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: ed407cc5-408e-4d08-a6f2-a6b7123e366f
          error:
            type: ENGAGEMENT_INITIALIZATION_FAILED
            title: "Failed to initialize the engagement"
            detail: "Error occurred while initializing the engagement f115434a-ede0-4429-b67a-9530b313528c. Retry creating a new engagement after sometime"
    All-Events:
      value:
        - eventType: ENGAGEMENT_CREATED
          eventId: f978622b-6c45-498e-964f-aa18d317bff7
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
        - eventType: PARTICIPANT_ADDED
          eventId: f844f3ea-bdd6-41f1-a718-f0cd34b0b786
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
        - eventType: MESSAGE
          eventId: 0f44e209-9d49-42a5-a72a-79c06ec09562
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
          message:
            messageId: a852745w-474c-99kf-8364-0242ac22338904
            body:
              elementType: text
              elementText:
                text: How may I help?
                textFormat: PLAINTEXT
            messageIndex: 1
            parentMessageId: 0683305e-ff90-4ac1-8475-1810832f7a32
            receivedAt: "2021-11-13T20:25:39.734Z"
            lastUpdatedAt: "2021-11-13T20:25:39.734Z"
        - eventType: PARTICIPANT_DISCONNECTED
          eventId: e412bcb5-5f45-4fc8-b581-7108becc1266
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: zc38400d-c44f-9439-0242ac130002
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: fc741b00-710b-11eb-9439-0242ac130002
          participant:
            participantId: 277cacfe-710c-11eb-9439-0242ac130002
            participantType: AGENT
            displayName: Scott Adams
        - eventType: ENGAGEMENT_ERROR
          eventId: f3a4acb9-ea1c-4745-bed7-adff49b6e802
          eventDate: "2021-11-13T20:25:39.734Z"
          sessionId: 10494b78-710c-11eb-9439-0242ac130002
          engagementId: f115434a-ede0-4429-b67a-9530b313528c
          conversationId: cc741b00-710b-11eb-9439-0242ac130003
          dialogId: ed407cc5-408e-4d08-a6f2-a6b7123e366f
          error:
            type: ENGAGEMENT_INITIALIZATION_FAILED
            title: "Failed to initialize the engagement"
            detail: "Error occurred while initializing the engagement f115434a-ede0-4429-b67a-9530b313528c. Retry creating a new engagement after sometime"
