openapi: 3.0.0
info:
  version: ''
  title: Conversation Manager APIs
  description: >
    This section provides the requisite APIs needed to create Conversation
    Manager accounts and to configure conversation workflows. 

    To create the Conversation Manager acccount, use the Conversation APIs in
    this order when setting up a complete eGain application:

    * Authentication

    * Client Application

    * Participant 

    * Channel 

    * Orchestration 

    * Account 


    After the account is created you can use the following APIs to send /
    receive messages.

    * Conversation 

    * Asset


    Note: You can configure your system to use third party Bots and third party
    Channels. The API instructions provided here assume you are using eGain's
    application setup.
  contact:
    name: API Support
    email: apisupport@egain.com
    url: https://apidev.egain.com
servers:
  - url: https://api.egain.cloud/conversation/conversationmgr/v3
    description: Production Server
security:
  - oAuthClient:
      - https://api.egain.cloud/auth/.default
tags:
  - name: Authentication
    description: >-
      Use this API to register client callback Authentication methods using
      oAuth or Basic Authentication.
  - name: Client Application
    description: >-
      Use this API to register external client applications where we send and
      receive messages.
  - name: Participant
    description: >-
      Use this API to register Bots. You can register multiple Bots for each
      client application.
  - name: Channel
    description: >-
      Use this API to register and define channel parameters which is used for
      chat messages.
  - name: Orchestration
    description: >-
      Use this API to configure workflows for conversation between participants
      (Customer/Agent/Bot applications).
  - name: Account
    description: Use this API to create the Conversation Account for Conversation Manager.
  - name: Conversation
    description: Use this API to send messages through the Conversation Manager.
  - name: Assets
    description: Use this API to upload/download Assets like attachments.
paths:
  /authentications:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createAuthentication
      tags:
        - Authentication
      summary: Create Authentication
      description: >
        # Overview

        Use this API to register client callback Authentication methods using
        oAuth or Basic Authentication. This is the first step in creating a new
        Conversation Account.

        New Account API process flow: **Authenticiation** > Client Application >
        Participant > Channel > Orchestration > Account

        Use the ID returned in the response when creating the client
        application.

        The Conversation Manager also uses this authentication method when
        sending messages to the callback URL of the client application.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_authentication'
      responses:
        '201':
          $ref: '#/components/responses/201_authentication_created'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.read
      operationId: getAllAuthentication
      tags:
        - Authentication
      summary: Get Authentications
      description: >
        # Overview

        Use this API to Get details of all authentication types in the
        Conversation Manager.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        assigned to call this API
      responses:
        '200':
          $ref: '#/components/responses/get_all_authentications'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /authentications/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAuthentication
      tags:
        - Authentication
      summary: Get Authentication
      description: >
        # Overview

        Use this API to get details of existing Authentication types in the
        Conversation Manager.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_authentication'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateAuthentication
      tags:
        - Authentication
      summary: Update Authentication
      description: >
        # Overview

        Use this API to update an existing authentication type.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_authentication'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteAuthentication
      tags:
        - Authentication
      summary: Delete Authentication
      description: >
        # Overview

        Use this API to delete an existing authentication method. An
        authentication method can not be deleted if it is in use in the client
        application.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /clientapplications:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createClientApplication
      tags:
        - Client Application
      summary: Create Client Application
      description: >
        # Overview

        API to register new Client Applications that can integrate with the
        Conversation Hub. Client applications are used to send and receive
        messages.

        New Account API process flow: Authenticiation > **Client Application** >
        Participant > Channel > Orchestration > Account


        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_client_application'
      responses:
        '201':
          $ref: '#/components/responses/201_client_application_created'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAllClientApplication
      tags:
        - Client Application
      summary: Get Client Applications
      description: >
        # Overview

        Use this APi to get details of all Client applications.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      responses:
        '200':
          $ref: '#/components/responses/get_all_client_applications'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /clientapplications/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getClientApplication
      tags:
        - Client Application
      summary: Get Client Application
      description: >
        # Overview

        Use this API to get details of the Client application in the
        Conversation Manager.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_client_application'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateClientApplication
      tags:
        - Client Application
      summary: Update Client Application
      description: >
        # Overview

        Use this API to update an existing Client application registered with
        the Conversation Manager.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_client_application'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteClientApplication
      tags:
        - Client Application
      summary: Delete Client Application
      description: >
        # Overview

        Use this APi to delete a Client application. If client application is
        used by a participant then it can not be deleted.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /participants:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createParticipant
      tags:
        - Participant
      summary: Create Participant
      description: >
        # Overview

        This API allow you to register participant

        New Account API process flow: Authenticiation > Client Application >
        **Participant** > Channel > Orchestration > Account

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_participant'
      responses:
        '201':
          $ref: '#/components/responses/201_participant_created'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAllParticipant
      tags:
        - Participant
      summary: Get Participants
      description: >
        # Overview

        Use this API to Get details of all participants.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      responses:
        '200':
          $ref: '#/components/responses/get_all_participants'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /participants/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getParticipant
      tags:
        - Participant
      summary: Get Participant
      description: >
        # Overview

        Use this API to Get details of an existing Participant

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_participant'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateParticipant
      tags:
        - Participant
      summary: Update Participant
      description: >
        # Overview

        Use this API to update an existing participant.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_participant'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteParticipant
      tags:
        - Participant
      summary: Delete Participant
      description: >
        # Overview

        Use this API to delete an existing participant.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /channels:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createChannel
      tags:
        - Channel
      summary: Create Channel
      description: >
        # Overview

        Use this API to register and define custom channel parameters in the
        Conversation Manager which is used for chat messages. 

        New Account API process flow: Authenticiation > Client Application >
        Participant > **Channel** > Orchestration > Account


        Note: You can configure your system to use third party Channels. The API
        instructions provided here assume you are using eGain's application
        setup.


        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_channel'
      responses:
        '201':
          $ref: '#/components/responses/201_channel_created'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAllChannels
      tags:
        - Channel
      summary: Get Channels
      description: >
        # Overview

        Use this API to Get all channel details for the Conversation Manager. 

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      responses:
        '200':
          $ref: '#/components/responses/get_all_channels'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /channels/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getChannel
      tags:
        - Channel
      summary: Get Channel
      description: >
        # Overview

        Use this API to Get channel detail information in the Conversation
        Manager.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_channel'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateChannel
      tags:
        - Channel
      summary: Update Channel
      description: >
        # Overview

        Use this API to update an existing channel in the Conversation Manager
        with your specific custom requirements.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_channel'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteChannel
      tags:
        - Channel
      summary: Delete Channel
      description: >
        # Overview

        Use this API to delete a channel in the Conversation Manager. A channel
        can not be deleted if it is in use in the client application.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /orchestrations:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createOrchestration
      tags:
        - Orchestration
      summary: Create Orchestration
      description: >
        # Overview

        Use this API to configure workflows for conversations between
        participants (Customer/Agent/Bot applications).

        New Account API process flow: Authenticiation > Client Application >
        Participant > Channel > **Orchestration** > Account        

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_orchestration'
      responses:
        '201':
          $ref: '#/components/responses/201_orchestration_created'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAllOrchestration
      tags:
        - Orchestration
      summary: Get Orchestrations
      description: >
        # Overview

        Use this API to Get all conversation orchestration details.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      responses:
        '200':
          $ref: '#/components/responses/get_all_orchestrations'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /orchestrations/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getOrchestration
      tags:
        - Orchestration
      summary: Get Orchestration
      description: >
        # Overview

        Use this API to Get orchestration details.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_orchestration'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateOrchestration
      tags:
        - Orchestration
      summary: Update Orchestration
      description: >
        # Overview

        Use this API to update existing orchestration configuration.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_orchestration'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteOrchestration
      tags:
        - Orchestration
      summary: Delete Orchestration
      description: >
        # Overview

        Use this API to delete an existing orchestration. If an orchestration
        object is in use in a channel account, then the orchestration object
        cannot be deleted.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /accounts:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: createAccount
      tags:
        - Account
      summary: Create Account
      description: >
        # Overview

        Use this API to create a Conversation Account for the Conversation
        Manager. 

        New Account API process flow: Authentication > Client Application >
        Participant > Channel > Orchestration > **Account**

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      requestBody:
        $ref: '#/components/requestBodies/post_account'
      responses:
        '201':
          $ref: '#/components/responses/201_account_created'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAllAccounts
      tags:
        - Account
      summary: Get Accounts
      description: >
        # Overview

        This APIs allows you to get details of all accounts

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      responses:
        '200':
          $ref: '#/components/responses/get_all_accounts'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /accounts/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
        - app.conversation.conversationmgr.read
      operationId: getAccount
      tags:
        - Account
      summary: Get account
      description: >
        # Overview

        Use this API to get details of a registered Conversation Manager
        account. 

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        or 'app.conversation.conversationmgr.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_account'
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    put:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: updateAccount
      tags:
        - Account
      summary: Update account
      description: >
        # Overview

        This APIs allows you to update an existing Conversation Manager account.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      requestBody:
        $ref: '#/components/requestBodies/put_account'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/400_common_bad_request'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.manage
      operationId: deleteAccount
      tags:
        - Account
      summary: Delete account
      description: >
        # Overview

        Use this API to delete a Conversation Manager account.

        ## Scope

        Client application must have 'app.conversation.conversationmgr.manage'
        scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '204':
          description: No Content
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /conversations/messages:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.interaction.manage
      operationId: sendMessage
      tags:
        - Conversation
      summary: Send message
      description: >
        # Overview

        Use this API to send different types of messages to the Conversation
        Hub. 

        Conversation Hub delivers messages on a callback URL of registered
        client applications of recipient.

        Recipient client applications should discard messages of various types,
        if it doesn't support them.        


        Following table tells which client app can send which type of message

        | Message Type                             | customer | egain_agent |
        custom_agent | egain_bot | custom_bot|

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

        | text                                     |    Y     |     Y      
        |       Y      |    Y      |     Y     |

        | typing.start                             |    Y     |     Y      
        |       Y      |    Y      |     Y     |

        | typing.end                               |    Y     |     Y      
        |       Y      |    Y      |     Y     |

        | escalation.transfer                      |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | pagePush                                 |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | conversation.state                       |    N     |     Y      
        |       Y      |    N      |     N     |

        | agent.join                               |    N     |     Y      
        |       Y      |    N      |     N     |

        | agent.available                          |    N     |     Y      
        |       Y      |    N      |     N     |

        | agent.unavailable                        |    N     |     Y      
        |       Y      |    N      |     N     |

        | agent.transfer                           |    N     |     Y      
        |       Y      |    N      |     N     |

        | queue.transfer                           |    N     |     Y      
        |       Y      |    N      |     N     |

        | richMessage.listpicker                   |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.quickreply                   |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.template                     |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.timepicker                   |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.richlink                     |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.form                         |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.payment                      |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.app                          |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | richMessage.authentication               |    N     |     Y      
        |       Y      |    Y      |     Y     |

        | authentication.success                   |    Y     |     N      
        |       N      |    N      |     N     |

        | authentication.failure                   |    Y     |     N      
        |       N      |    N      |     N     |

        | customer.info                            |    Y     |     Y      
        |       Y      |    Y      |     Y     |

        | customer.active                          |    Y     |     N      
        |       N      |    N      |     N     |

        | customer.inactive                        |    Y     |     N      
        |       N      |    N      |     N     |

        | error                                    |    Y     |     Y      
        |       Y      |    Y      |     Y     |

        | delete.soft                              |    Y     |     N      
        |       N      |    N      |     N     |

        | delete.permanent                         |    Y     |     N      
        |       N      |    N      |     N     |

        | undo                                     |    Y     |     N      
        |       N      |    N      |     N     |

        | conversation.end                         |    Y     |     Y      
        |       Y      |    Y      |     Y     |


        ## Scope

        Client application must have
        'app.conversation.conversationmgr.interaction.manage' assigned to call
        this API
      requestBody:
        $ref: '#/components/requestBodies/post_send_message'
      responses:
        '202':
          $ref: '#/components/responses/202_send_message'
        '400':
          $ref: '#/components/responses/400_send_message'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_send_message'
        '500':
          $ref: '#/components/responses/InternalServerError'
      callbacks:
        customBotRequestData:
          $ref: '#/components/callbacks/customBotRequestData'
        agentRequestData:
          $ref: '#/components/callbacks/agentRequestData'
        customerRequestData:
          $ref: '#/components/callbacks/customerRequestData'
  /conversations/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.interaction.manage
        - app.conversation.conversationmgr.interaction.read
      operationId: fetchConversation
      tags:
        - Conversation
      summary: Get conversation
      description: >
        # Overview

        Use this API to get details of a completed conversation using
        conversation id.

        ## Scope

        Client application must have
        'app.conversation.conversationmgr.interaction.manage' or
        'app.conversation.conversationmgr.interaction.read' scope assigned.
      parameters:
        - $ref: '#/components/parameters/id'
      responses:
        '200':
          $ref: '#/components/responses/get_conversation'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '406':
          $ref: '#/components/responses/NotAcceptable'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /assets:
    post:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.interaction.manage
      operationId: createAsset
      tags:
        - Assets
      summary: Create Asset
      description: >
        # Overview

        Use this API to generate a signed URL for uploading an asset.

        Use contentUrl in response as it is used for uploading content.

        Make sure you upload files which have the same content type and size
        that was provided at the the time of signed url generation.

        ## Scope

        Client application must have
        'app.conversation.conversationmgr.interaction.manage' assigned to call
        this API
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationAsset'
            example:
              channel:
                type: sms
              sender:
                type: customer
              name: bird.jpg
              size: 17245
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreUploadAssetResponse'
              example:
                id: 8de578e2-f7b8-462b-94b7-7d3358af9756
                contentUrl: >-
                  https://dev-storageservice-ext.ezdev.net/core/assetmgr/v3/assets/upload?signature=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJtZXRob2QiOiJQT1NUIiwiaXNzIj
                contentUrlExpiry: '2022-01-27T20:04:25.498Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '500':
          $ref: '#/components/responses/InternalServerError'
  /assets/{id}:
    get:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.interaction.manage
        - app.conversation.conversationmgr.interaction.read
      operationId: getAsset
      tags:
        - Assets
      summary: Get Asset
      description: >
        Use this API to generate a signed URL for downloading content. Use
        contentUrl in response as it used is for downloading content.

        ## Scope

        Client application must have
        'app.conversation.conversationmgr.interaction.manage' or
        'app.conversation.conversationmgr.interaction.read' assigned to call
        this API
      parameters:
        - $ref: '#/components/parameters/parameters-id'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreDownloadAssetResponse'
              example:
                id: 7b6c5fff-036e-4a40-b68a-a67c592fc079
                name: bird.jpeg
                contentType: image/jpeg
                size: 17245
                contentUrl: >-
                  http://storage-ext.egain.cloud/core/assetmgr/v3/chat.attachments/download?signature=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI5OThiNjFjMWRlYmM0OTRiYWVkNjhmNTkxM2U5
                contentUrlExpiry: '2023-01-13T16:45:27.457Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
        '500':
          $ref: '#/components/responses/InternalServerError'
    delete:
      x-egain-app-permissions:
        - app.conversation.conversationmgr.interaction.manage
      operationId: deleteAsset
      tags:
        - Assets
      summary: Delete Asset
      description: >
        # Overview

        Use this API to delete an asset. After an asset is used in a message the
        asset cannot be deleted.

        ## Scope

        Client application must have
        'app.conversation.conversationmgr.interaction.manage' scope assigned.
      parameters:
        - $ref: '#/components/parameters/parameters-id'
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/401_invalid_authorization'
        '403':
          $ref: '#/components/responses/403_scope_not_assigned'
        '404':
          $ref: '#/components/responses/404_common_not_found'
components:
  securitySchemes:
    oAuthClient:
      type: oauth2
      description: Authenticate as a client (Server to Server).
      flows:
        clientCredentials:
          tokenUrl: >-
            https://login.egain.cloud/global/f51302dd-7036-41b5-b619-e1a52a67c780/oauth2/v2.0/token
          scopes:
            https://api.egain.cloud/auth/.default: Default scope
      x-defaultClientId: 7bbc9ba6-0465-46f0-91f4-d2742cdc0ef8
  schemas:
    PaginationInfo:
      type: object
      properties:
        count:
          type: integer
          description: Total number of records that match criteria of API call
        pagenum:
          type: integer
          description: Page number
        pagesize:
          type: integer
          description: Number of results per page
    Attribute:
      type: object
      required:
        - name
        - value
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: name of attribute
        value:
          type: string
          description: value of attribute
          minLength: 1
          maxLength: 1023
    Oauth2Authentication:
      description: >-
        OAuth type authentication for callback APIs specified in Client
        application. Conversation Hub will generate token using this API and use
        it until it receives 401 from callback API
      type: object
      required:
        - name
        - type
        - oauth2
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique name for authentication method
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        type:
          type: string
          description: Type of authentication
          enum:
            - oauth2
          example: oauth2
        oauth2:
          type: object
          required:
            - tokenRequestUrl
            - method
            - headers
            - payload
            - accessTokenPath
          properties:
            tokenRequestUrl:
              type: string
              minLength: 1
              maxLength: 255
              description: Access token API
            method:
              type: string
              enum:
                - POST
                - GET
              description: Http method for access token API
            headers:
              type: array
              minItems: 1
              maxItems: 25
              items:
                $ref: '#/components/schemas/Attribute'
            payload:
              type: string
              description: Access token request payload
              minLength: 1
              maxLength: 1024
            accessTokenPath:
              type: string
              description: >-
                The JSON query path of an access token in the returned JSON
                response
              example: $.accessToken
              minLength: 1
              maxLength: 1024
    BasicAuthentication:
      type: object
      required:
        - name
        - type
        - basicAuth
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique name for authentication method
        description:
          type: string
          minLength: 1
          maxLength: 1023
        type:
          type: string
          description: Type of authentication
          enum:
            - basic
          example: basic
        active:
          type: boolean
          default: true
        basicAuth:
          type: object
          required:
            - username
            - password
          properties:
            username:
              type: string
              minLength: 1
              maxLength: 255
            password:
              type: string
              minLength: 1
              maxLength: 255
    Authentication:
      description: >-
        Authentication mechanism for callback url configured in client
        application
      oneOf:
        - $ref: '#/components/schemas/Oauth2Authentication'
        - $ref: '#/components/schemas/BasicAuthentication'
    GetAuthenticationData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/Authentication'
    WSErrorCommon:
      type: object
      title: Error Response
      required:
        - code
        - developerMessage
      properties:
        code:
          title: Code Identifier
          description: |
            String that follow the pattern {integer}-{integer}. 
              * The first part is http status code.  The code is unique as a whole. Nothing common between 400-101 and 404-101
          allOf:
            - type: string
        developerMessage:
          title: Developer Message
          description: Response explaining what happened
          allOf:
            - type: string
              minLength: 0
              maxLength: 255
        details:
          title: Response Details
          allOf:
            - type: array
              items:
                type: object
                required:
                  - key
                properties:
                  key:
                    title: Key
                    allOf:
                      - type: string
                        minLength: 0
                        maxLength: 255
                  value:
                    title: Value
                    allOf:
                      - type: string
                        minLength: 0
                        maxLength: 255
              minItems: 0
              maxItems: 30
        userMessage:
          title: User Message
          description: |
            UI friendly message only supported by some API.  
              * Client must request explicitly by passing X-egain-error-message=yes header
          allOf:
            - type: string
              minLength: 0
              maxLength: 1024
    PostAuthenticationData:
      allOf:
        - $ref: '#/components/schemas/Authentication'
        - type: object
    Id:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: UUID generated for the object.
    PutAuthenticationData:
      allOf:
        - $ref: '#/components/schemas/Authentication'
        - type: object
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    Role:
      type: object
      description: Details of role client application is playing.
      required:
        - name
        - version
        - callback
        - notificationEmail
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          uniqueItems: true
          description: Client aplication type
          enum:
            - customer
            - custom_bot
            - egain_bot
            - egain_agent
            - custom_agent
            - business_notification
        version:
          type: string
          description: >-
            Conversation Hub will send payload which is specific to this
            version.
          enum:
            - v1
            - v3
          example: v3
        callback:
          type: string
          minLength: 1
          maxLength: 1023
          description: >-
            Callback API to recieve messages from Conversation Hub sent by
            various participants in conversation. Callback APIs needs to respond
            within 5 seconds. We strongly recommend to process message
            asynchronously. API must return 401 if Authorization header is
            expired, Conversation Hub will generate new Authorization header on
            401.
          example: https://example.support.com/messaging/callback/customer
        notificationEmail:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            If client application callback is not reachable, Conversation Hub
            sends a notification to this email address
          example: admin@example.com
        headers:
          type: array
          minItems: 1
          maxItems: 25
          description: >-
            Custom headers for callback, Conversation Hub will include these
            while sending message to callback
          items:
            $ref: '#/components/schemas/Attribute'
        authentication:
          description: Authentication for callback API.
          type: object
          required:
            - id
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated for client application
              example: a987d07a-d59c-11ea-87d0-0242ac13000.
    ClientApplication:
      type: object
      description: >-
        Client application represents application which sends messages to
        Conversation hub from customer/bot/agent. And receives messages from
        Conversation Hub and sends them back to customer/bot/agent. If you are
        using eGain bot of eGain agent then you don't have to register client
        application for that
      required:
        - name
        - roles
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique name for client application
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        roles:
          type: array
          minItems: 1
          maxItems: 7
          items:
            $ref: '#/components/schemas/Role'
    GetClientApplicationData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/ClientApplication'
    PostClientApplicationData:
      allOf:
        - $ref: '#/components/schemas/ClientApplication'
        - type: object
          required:
            - name
            - roles
    PutClientApplicationData:
      allOf:
        - $ref: '#/components/schemas/ClientApplication'
        - type: object
          required:
            - name
            - roles
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    Intent:
      type: object
      required:
        - value
        - displayValue
      properties:
        value:
          type: string
          minLength: 1
          maxLength: 255
          description: Internal value for intent.
        displayValue:
          type: string
          minLength: 1
          maxLength: 255
          description: Display value for intent.
    Intents:
      type: object
      description: Intents supported by bot.
      required:
        - intent
      properties:
        intent:
          type: array
          minItems: 1
          maxItems: 500
          items:
            $ref: '#/components/schemas/Intent'
    Participant:
      type: object
      description: >-
        Conversation participant. Currently only participant for custom bots
        needs to be registered.
      required:
        - name
        - type
        - application
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique name for participant
        type:
          type: string
          description: >-
            Type of participant. eGain Bot participants are created
            automatically when bot is created in eGain VA application.
          enum:
            - custom_bot
            - egain_bot
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        application:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: >-
                ID to clientApplication, messages for this participant are sent
                to call back url registered in this client application
              example: d987d07a-d59c-11ea-87d0-0242ac130001
        intents:
          $ref: '#/components/schemas/Intents'
        options:
          type: array
          minItems: 1
          maxItems: 25
          items:
            $ref: '#/components/schemas/Attribute'
    GetParticipantData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/Participant'
    PostParticipantData:
      allOf:
        - $ref: '#/components/schemas/Participant'
        - type: object
          required:
            - name
            - type
            - application
    PutParticipantData:
      allOf:
        - $ref: '#/components/schemas/Participant'
        - type: object
          required:
            - name
            - type
            - application
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    AttachmentPolicy:
      type: object
      properties:
        enabled:
          type: boolean
          default: true
          description: >-
            if this flag is set to true then application will allow inbound
            attachments
        maxSize:
          type: integer
          default: 10485760
          minimum: 1
          maximum: 10485760
        type:
          type: string
          description: >-
            Whether to allow or block files with extension provided in
            'attachmentPolicy.extensions'
          enum:
            - allow
            - block
        extensions:
          type: array
          minItems: 1
          maxItems: 75
          description: File extensions
          items:
            type: string
            minLength: 1
            maxLength: 255
    InboundRestrictions:
      type: object
      description: Channel restrictions messages coming from customer.
      properties:
        maxTextLength:
          type: integer
          description: Number of characters allowed in text message.
          minimum: 1
          maximum: 10000
          default: 10000
          example: 140
        attachmentPolicy:
          $ref: '#/components/schemas/AttachmentPolicy'
        features:
          type: array
          minItems: 1
          maxItems: 4
          description: >-
            if no features are provided then application will allow participants
            to send typing events, attachments and richText ( html content)
          items:
            type: string
            enum:
              - typing_events
              - attachments
              - richText
              - delivery_receipts
    OutboundRestriction:
      type: object
      description: Channel restrictions on messages/attachments sent to customer.
      properties:
        maxTextLength:
          type: integer
          description: Number of characters allowed in text message.
          minimum: 1
          maximum: 10000
          default: 10000
          example: 140
        systemMessages:
          type: boolean
          description: >-
            Based on this flag eGain Agent application decides whether to send
            system messages or not
          default: false
        midChatAuth:
          type: boolean
          description: >-
            Based on this flag eGain Agent application will decides whether to
            support mid chat authentiation or not..
          default: false
        attachmentPolicy:
          $ref: '#/components/schemas/AttachmentPolicy'
        features:
          type: array
          minItems: 1
          maxItems: 3
          description: >-
            if no features are provided then application will not allow
            participants to send typing events, attachments and richText ( html
            content)
          items:
            type: string
            enum:
              - typing_events
              - attachments
              - richText
              - delivery_receipts
        customerServiceWindow:
          type: object
          required:
            - durationMinutes
          properties:
            durationMinutes:
              type: integer
              minimum: 1
              maximum: 10080
              description: >
                After this duration advisor is not allowed to send free text
                reply to customer. Advisor can sed only message types defined in
                continueMessageTypes.
            continueMessageTypes:
              type: array
              minItems: 1
              description: >-
                Type of message to be allowed to send to customer after
                durationMinutes
              items:
                type: string
                enum:
                  - listpicker
                  - timepicker
                  - richlink
                  - quickreply
                  - template
                  - form
                  - authentication
                  - payment
                  - app
        richMessageTypes:
          type: array
          minItems: 1
          maxItems: 9
          description: >
            Rich message types that channel supports.

            If no rich message types are provided then application will not
            allow participants to send rich messages types.
          items:
            type: string
            enum:
              - listpicker
              - timepicker
              - richlink
              - quickreply
              - template
              - form
              - authentication
              - payment
              - app
    Restrictions:
      type: object
      description: >-
        Channel restriction on inbound(from customer) and outbound( to customer)
        messages.
      properties:
        inbound:
          $ref: '#/components/schemas/InboundRestrictions'
        outbound:
          $ref: '#/components/schemas/OutboundRestriction'
    L10nProperties:
      type: object
      description: >-
        System messages that conversation Hub will send in case of various error
        scenarios
      required:
        - language
        - properties
      properties:
        language:
          type: string
          description: language of properties
          enum:
            - en-US
            - es-ES
            - fr-FR
            - it-IT
            - de-DE
            - nl-NL
            - pt-BR
            - pt-PT
            - da-DK
            - ru-RU
            - fr-CA
            - zh-CN
            - ja-JP
            - ko-KR
            - sv-SE
          example: en-US
        properties:
          type: array
          minItems: 1
          maxItems: 75
          items:
            $ref: '#/components/schemas/Attribute'
    Channel:
      type: object
      properties:
        type:
          type: string
          description: >-
            Unique channel type. Do not prefix with 'custom.' for channels
            supported by eGain.
          minLength: 1
          maxLength: 255
          example: custom.teams
        displayName:
          type: string
          minLength: 1
          maxLength: 255
          example: Teams
        icon:
          type: string
          minLength: 1
          maxLength: 512000
          description: >-
            base64 encoded image. This icon is used in eGain Chat Advisor
            desktop for activities of this channel. If eGain Chat is used for
            live agents then use icon file in ‘png’ format with pixel dimensions
            32 X 32.
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        restrictions:
          $ref: '#/components/schemas/Restrictions'
        l10nProperties:
          type: array
          minItems: 1
          maxItems: 25
          items:
            $ref: '#/components/schemas/L10nProperties'
    GetChannelData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/Channel'
    PostChannelData:
      allOf:
        - $ref: '#/components/schemas/Channel'
        - type: object
          required:
            - type
            - displayName
            - icon
    PutChannelData:
      allOf:
        - $ref: '#/components/schemas/Channel'
        - type: object
          required:
            - type
            - displayName
            - icon
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    Orchestration:
      type: object
      description: >-
        Conversation orchestration. Register bot, customer and agent client
        applications before creating this object.
      properties:
        name:
          type: string
          description: Name for orchestration
          example: default_orhchestration
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        applications:
          type: object
          properties:
            botConfiguration:
              type: object
              description: Required if agentConfiguration is not provided
              required:
                - bots
              properties:
                forwardTranscript:
                  type: boolean
                  description: >-
                    If VA session is not escalated and customer is identifiable
                    then forward transcript to eGain agent
                  default: true
                bypassVaDuration:
                  type: number
                  minimum: 1
                  maximum: 10080
                  description: >-
                    If customer returns before this duration(in minutes) ends
                    then bypass va and escalate to agent directly.
                bots:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - id
                      - participant
                    properties:
                      id:
                        type: string
                        minLength: 36
                        maxLength: 36
                        description: >-
                          UUID generated by Conversation Hub for bot client
                          application.
                      participant:
                        type: object
                        required:
                          - id
                        properties:
                          id:
                            type: string
                            minLength: 36
                            maxLength: 36
                            description: >-
                              UUID generated by Conversation Hub for bot
                              participant.
                      onEscalation:
                        type: object
                        required:
                          - agent
                        properties:
                          agent:
                            type: object
                            required:
                              - id
                            properties:
                              id:
                                type: string
                                minLength: 36
                                maxLength: 36
                                description: >-
                                  UUID generated by Conversation Hub for agent
                                  client application, on escalation from bot,
                                  message will be sent to this client
                                  application
            customerConfiguration:
              type: object
              required:
                - customer
              description: >-
                details of customer client app, this object must be specified
                for custom channels.
              properties:
                customer:
                  type: object
                  required:
                    - id
                  description: >-
                    Replies sent by bot or agent will be sent to this client
                    application
                  properties:
                    id:
                      type: string
                      minLength: 36
                      maxLength: 36
                      description: >-
                        UUID generated by Conversation Hub for customer client
                        application
            agentConfiguration:
              type: object
              required:
                - agents
              description: >-
                Details of agent client app. Required if botConfiguration is not
                provided.
              properties:
                agents:
                  type: array
                  minItems: 1
                  maxItems: 1
                  items:
                    type: object
                    required:
                      - id
                    properties:
                      id:
                        type: string
                        minLength: 36
                        maxLength: 36
                        description: >-
                          UUID generated by Conversation Hub for agent
                          application
    GetOrchestrationData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/Orchestration'
    PostOrchestrationData:
      allOf:
        - $ref: '#/components/schemas/Orchestration'
        - type: object
          required:
            - name
            - applications
    PutOrchestrationData:
      allOf:
        - $ref: '#/components/schemas/Orchestration'
        - type: object
          required:
            - name
            - applications
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    CaseManagement:
      type: object
      properties:
        sameCaseDuration:
          type: number
          minimum: 1
          maximum: 10080
          description: >-
            If same customer returns before this duration ends, then chat
            activity will be linked with same case.
        copyCustomAttributes:
          type: boolean
          description: >-
            If bypass VA feature is enabled in orchestration object and if set
            to true, then custom attributes from previous conversation will be
            copied for this conversation as well.
    EntryPoint:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique id of entrypoint in client application
    ChatConfigurations:
      type: object
      required:
        - orchestration
        - entryPoint
      properties:
        timeout:
          type: number
          minimum: 3
          maximum: 10080
          default: 240
          description: >
            Timeout for conversation created for this account. Time is
            calculated from last message in conversation.

            Client applications should start new conversation after timeout.
        defaultLanguage:
          type: string
          description: Default language
          default: en-US
          example: en-US
        onAgentUnavailability:
          type: string
          enum:
            - off_hours
            - retain_and_retry
          default: off_hours
          description: >-
            This attribute indicates action on agent unavailability, in case of
            'off_hours' if agent is not available then 'off hours' message is
            sent back. In case of 'retain_and_retry' message is held on
            Conversation Hub until agent is online
          example: off_hours
        allowLogoutWithOpenChats:
          type: boolean
          default: false
          description: Allow agents to logout with open messages in their inbox.
        allowQueueTransferOnAgentUnavailability:
          type: boolean
          default: false
          description: >-
            Allow agents to transfer messages back to queue when no agents are
            available.
        orchestration:
          type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: >-
                UUID generated for orchestration object, which will be used for
                orchestration of conversations for this account
              example: c987d07a-d59c-11ea-87d0-0242ac13000d
        entryPoint:
          $ref: '#/components/schemas/EntryPoint'
    Account:
      type: object
      description: Channel account.
      required:
        - name
        - address
        - channel
        - chatConfigurations
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique name for account
        description:
          type: string
          minLength: 1
          maxLength: 1023
        active:
          type: boolean
          default: true
        address:
          type: string
          minLength: 1
          maxLength: 255
          description: Account ID like email address, phone numbers.
        channel:
          type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated for account
              example: c987d07a-d59c-11ea-87d0-0242ac130200
        caseManagement:
          $ref: '#/components/schemas/CaseManagement'
        chatConfigurations:
          $ref: '#/components/schemas/ChatConfigurations'
        attributes:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/Attribute'
    GetAccountData:
      allOf:
        - type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
            created:
              type: string
              format: date-time
              description: Last modified time in GMT
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
        - $ref: '#/components/schemas/Account'
    PostAccountData:
      allOf:
        - $ref: '#/components/schemas/Account'
        - type: object
          required:
            - name
            - address
            - channel
            - chatConfigurations
    PutAccountData:
      allOf:
        - $ref: '#/components/schemas/Account'
        - type: object
          required:
            - name
            - address
            - channel
            - chatConfigurations
          properties:
            modified:
              type: string
              format: date-time
              description: Last modified time in GMT
    Metadata:
      type: array
      minItems: 1
      maxItems: 10
      items:
        $ref: '#/components/schemas/Attribute'
    conversationContact:
      type: string
      example: email
      enum:
        - email
        - phone.mobile
        - phone.office
        - phone.home
        - facebookId
        - twitterId
        - appleOpaqueId
        - other
      description: >-
        The contact to be used for the conversation. If this parameter is not
        provided, the activity created for this conversation will not be
        associated with any contact point. | The attribute corresponding to the
        provided value must exist in the customer representation. for example,
        If provided value is "email", the contact in the customer representation
        must contain an email contact point.
    lookupContact:
      type: string
      description: >-
        This parameter indicates the attribute of the contact, on which customer
        records will be looked up in eGain Solve application.
      example: email
      enum:
        - email
        - phone.mobile
        - phone.office
        - phone.home
        - facebookId
        - twitterId
        - appleOpaqueId
        - other
    Contact:
      type: array
      minItems: 1
      maxItems: 25
      items:
        type: object
        required:
          - type
          - address
        properties:
          type:
            type: string
            description: Contact point type.
            enum:
              - email
              - phone
              - facebookId
              - twitterId
              - appleOpaqueId
              - other
          subType:
            type: string
            description: >-
              sub type of contact point, for example for 'phone' type of contact
              point, supported subtTypes are mobile, home, office
            example: mobile
            enum:
              - mobile
              - office
              - home
          address:
            type: string
            description: >-
              Contact point value, if contact point type is email then this
              value should be email address.
            minLength: 1
            maxLength: 255
    Contacts:
      type: object
      required:
        - contact
      properties:
        contact:
          $ref: '#/components/schemas/Contact'
    Customer:
      type: object
      properties:
        name:
          type: string
          description: Name of customer.
          minLength: 1
          maxLength: 255
        type:
          type: string
          description: Type of customer.
          enum:
            - individual
        attributes:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/Attribute'
        contacts:
          $ref: '#/components/schemas/Contacts'
    ClientInfo:
      type: object
      properties:
        timeOffset:
          type: integer
          minimum: -720
          maximum: 720
        referrerName:
          minLength: 1
          maxLength: 255
          type: string
        referrerUrl:
          type: string
          maxLength: 2500
    Redact:
      type: object
      properties:
        redact:
          type: boolean
          description: >
            If this flag is true, Conversation Hub will redact the content of
            message after processing is done.

            If client applications are receving message from Conversation Hub
            with this flag value as true, they they should redact content as
            well.
          example: false
    TextContent:
      allOf:
        - type: object
          required:
            - text
          properties:
            text:
              type: string
              description: text version of content
              minLength: 1
              maxLength: 10000
        - $ref: '#/components/schemas/Redact'
    HtmlContent:
      allOf:
        - type: object
          required:
            - html
          properties:
            html:
              type: string
              description: html version of content
              minLength: 1
              maxLength: 10000
        - $ref: '#/components/schemas/Redact'
    JsonContent:
      allOf:
        - type: object
          required:
            - json
          properties:
            json:
              type: string
              description: json version of content
              minLength: 1
              maxLength: 10000
        - $ref: '#/components/schemas/Redact'
    XMLContent:
      allOf:
        - type: object
          required:
            - xml
          properties:
            xml:
              type: string
              description: xml version of content, supported only for custom message types
              minLength: 1
              maxLength: 10000
        - $ref: '#/components/schemas/Redact'
    Content:
      oneOf:
        - $ref: '#/components/schemas/TextContent'
        - $ref: '#/components/schemas/HtmlContent'
        - $ref: '#/components/schemas/JsonContent'
        - $ref: '#/components/schemas/XMLContent'
    ExternalMessageParticipantData:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Name of participant(Customer/Bot/Agent). This name will be visible
            to recipient
          example: John
    ExternalMessageClientData:
      type: object
      required:
        - type
        - participant
      properties:
        type:
          type: string
          description: type of recipient client application
          enum:
            - custom_bot
            - egain_bot
            - customer
          example: customer
        participant:
          $ref: '#/components/schemas/ExternalMessageParticipantData'
    ExternalMessageRecipients:
      type: object
      properties:
        recipient:
          type: array
          description: list of recipients.
          minItems: 1
          maxItems: 1
          items:
            $ref: '#/components/schemas/ExternalMessageClientData'
    CustomAttribute:
      type: object
      required:
        - name
        - value
      properties:
        external:
          type: boolean
          default: true
          description: >
            Set this to 'false', if its out of the box attribute or custom
            attribute of 'activity' or 'customer' objects in eGain system.

            If its external attribute then set it to true, eGain system will
            ignore such attributes.
          example: true
        object:
          type: string
          description: Name of object this attribute belongs to.
          enum:
            - activity
            - customer
          example: activity
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            Name of attribute, if its custom attribute created on 'activity' or
            'customer' object, then prefix name with 'custom.'

            If its out of the box attribute of these objects then no need to
            prefix with 'custom.' prefix.
          example: custom.refId
        value:
          type: string
          minLength: 1
          maxLength: 2048
          description: Value of attribute.
          example: '1234'
    Attributes:
      type: object
      description: List of attributes.
      properties:
        attribute:
          type: array
          minItems: 1
          maxItems: 75
          items:
            $ref: '#/components/schemas/CustomAttribute'
    ExternalRequestMessage:
      type: object
      required:
        - type
        - sender
        - recipients
        - sent
      properties:
        messageId:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            External unique message Id. If message is submitted with same
            messageId again on same conversation, it will be considered as
            duplicate and will not be accepted
        type:
          type: object
          required:
            - value
          properties:
            value:
              type: string
              description: >-
                Message type value. Refer
                https://apidev.egain.cloud/services/messaging/msgtypes/msgtypetable.html
                to understand which type of messages client applications can
                send. | Client applications can send custom type of message as
                well, in that case type value must start with 'custom.', for
                example, 'custom.order'.
              enum:
                - text
                - richMessage.listpicker
                - richMessage.timepicker
                - richMessage.richlink
                - richMessage.quickreply
                - richMessage.template
                - richMessage.form
                - richMessage.app
                - richMessage.payment
                - richMessage.authentication
                - pagePush
                - delete.soft
                - delete.permanent
                - undo
              example: text
        content:
          $ref: '#/components/schemas/Content'
        sender:
          $ref: '#/components/schemas/ExternalMessageClientData'
        recipients:
          $ref: '#/components/schemas/ExternalMessageRecipients'
        attributes:
          $ref: '#/components/schemas/Attributes'
        parent:
          type: object
          required:
            - id
          description: >-
            Parent message Id, can be used for error messages to indicate for
            which message error message is generated.
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated by Conversation Hub for parent message
            messageId:
              type: string
              minLength: 1
              maxLength: 255
              description: External messageId of parent message
        sent:
          type: string
          format: date-time
          description: Sent time in GMT. When this message was sent to recipient.
    ExternalRequestMessages:
      type: object
      description: >
        If conversation between customer and custom bot is happened outside of
        Conversation Hub 

        and at the time of escalation if bot needs to share transcript(messages
        exchanged between customer and bot)

        with agent then this object can be used to include those messages.
      required:
        - message
      properties:
        message:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/ExternalRequestMessage'
    RequestConversation:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >
            Conversation Id, If its not passed new conversation is created and
            its id will be returned in the response, 

            which should be used for subsequent messages of same conversation.
        account:
          type: object
          description: >
            This object must be passed in first request of conversation. 

            Conversation Hub needs account address and channel type to start the
            conversation
          required:
            - channel
            - address
          properties:
            channel:
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                  description: Channel type. This should match with type in Channel object
                  minLength: 1
                  maxLength: 255
                modified:
                  type: string
                  format: date-time
                  description: >
                    When channel was last modified. Sent to participants by MH
                    only when its custom channel message. 

                    Client applications should cache channel object, and that
                    cache should be refreshed if this date changes.
                id:
                  type: string
                  minLength: 36
                  maxLength: 36
                  description: >-
                    Channel Id. This can be used to fetch channel details from
                    MH. Sent to participants by MH only when its custom channel
                    message.
            address:
              type: string
              description: Channel account address
              minLength: 1
              maxLength: 255
            modified:
              type: string
              format: date-time
              description: >
                When account was last modified. Sent to participants by MH only
                when its custom channel message.

                Client applications should cache account object, and that cache
                should be refreshed if this date changes.
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: >-
                Account id. This can be used to fetch account details from MH.
                Sent to participants by MH only when its custom channel message.
        conversationContact:
          $ref: '#/components/schemas/conversationContact'
        lookupContact:
          $ref: '#/components/schemas/lookupContact'
        entryPoint:
          $ref: '#/components/schemas/EntryPoint'
        customer:
          $ref: '#/components/schemas/Customer'
        clientInfo:
          $ref: '#/components/schemas/ClientInfo'
        type:
          type: string
          example: survey.form
          description: >-
            Type of conversation, pass it only when its survey type
            conversation.
          enum:
            - survey.form
        parent:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: ID to parent conversation
              example: d987d07a-d59c-11ea-87d0-0242ac13000d
        preferredAgent:
          type: object
          description: >-
            Preferred Agent, if both values 'id' and 'userName' are provided
            then make sure it belongs to same user.
          anyOf:
            - required:
                - id
            - required:
                - userName
          properties:
            id:
              type: string
              minLength: 1
              maxLength: 36
              description: Preferred Agent id
              example: '1234'
            userName:
              type: string
              minLength: 1
              maxLength: 255
              description: Preferred Agent userName
              example: agent007
        messages:
          $ref: '#/components/schemas/ExternalRequestMessages'
    MessageParticipantData:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            Name of participant(Customer/Bot/Agent). This name will be visible
            to recipient
          example: John
        type:
          type: string
          enum:
            - custom_bot
            - egain_bot
            - customer
            - egain_agent
            - system
            - custom_agent
          description: type of participant
    ClientData:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          description: type of recipient client application
          enum:
            - custom_bot
            - egain_bot
            - customer
            - egain_agent
            - custom_agent
          example: customer
        participant:
          $ref: '#/components/schemas/MessageParticipantData'
    Recipients:
      type: object
      properties:
        recipient:
          type: array
          description: list of recipients.
          minItems: 1
          maxItems: 1
          items:
            $ref: '#/components/schemas/ClientData'
    Attachment:
      type: object
      required:
        - name
        - url
        - size
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique id
        name:
          type: string
          description: file name
          minLength: 1
          maxLength: 255
          example: shirt.jpg
        contentType:
          type: string
          minLength: 1
          maxLength: 255
          example: image/jpg
        size:
          type: integer
          maximum: 10485760
          description: size of attachment.
          example: 1157
        url:
          type: string
          minLength: 1
          maxLength: 2500
          description: Conversation Hub will stream attachment content from this URL
          example: >-
            https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg
    UploadedAttachment:
      type: object
      description: Already uploaded attachment using asset APIs
      required:
        - id
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique id
    Attachments:
      type: object
      properties:
        attachment:
          type: array
          description: list of attachments.
          minItems: 1
          maxItems: 5
          items:
            oneOf:
              - $ref: '#/components/schemas/Attachment'
              - $ref: '#/components/schemas/UploadedAttachment'
    RequestMessage:
      type: object
      required:
        - type
        - conversation
        - sender
      properties:
        messageId:
          type: string
          minLength: 1
          maxLength: 255
          description: >
            External unique message Id. If message is submitted with same
            messageId again on same conversation, 

            it will be considered as duplicate and will not be accepted
        conversation:
          $ref: '#/components/schemas/RequestConversation'
        type:
          type: object
          description: Message type
          required:
            - value
          properties:
            value:
              type: string
              description: >
                Message type value. Refer
                https://apidev.egain.cloud/services/messaging/msgtypes/msgtypetable.html
                to understand which type of messages client applications can
                send. 

                Client applications can send custom type of message as well, in
                that case type value must start with 'custom.', for example,
                'custom.order'.
              enum:
                - text
                - status.read
                - status.delivered
                - richMessage.listpicker
                - richMessage.timepicker
                - richMessage.richlink
                - richMessage.quickreply
                - richMessage.template
                - richMessage.form
                - richMessage.app
                - richMessage.payment
                - richMessage.authentication
                - authentication.start
                - authentication.success
                - authentication.failure
                - authentication.accept
                - authentication.reject
                - agent.transfer
                - bot.transfer
                - queue.transfer
                - pagePush
                - error
                - escalation.transfer
                - escalation.request
                - typing.start
                - typing.end
                - agent.join
                - agent.exit
                - agent.available
                - agent.unavailable
                - agent.active
                - agent.inactive
                - customer.info
                - customer.active
                - customer.inactive
                - customer.exit
                - customer.block
                - cobrowse.start
                - conversation.state
                - delete.soft
                - delete.permanent
                - undo
                - conversation.end
              example: text
        parent:
          type: object
          required:
            - id
          description: >-
            Parent message, can be used for error messages to indicate for which
            message error message is generated.
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated by Conversation Hub for parent message
            messageId:
              type: string
              minLength: 1
              maxLength: 255
              description: External messageId of parent message
        content:
          $ref: '#/components/schemas/Content'
        sender:
          $ref: '#/components/schemas/ClientData'
        recipients:
          $ref: '#/components/schemas/Recipients'
        attachments:
          $ref: '#/components/schemas/Attachments'
        attributes:
          $ref: '#/components/schemas/Attributes'
    RequestMessages:
      type: object
      required:
        - message
      properties:
        message:
          type: array
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/RequestMessage'
    RequestData:
      type: object
      required:
        - messages
      properties:
        metadata:
          type: object
          properties:
            attributes:
              $ref: '#/components/schemas/Metadata'
        messages:
          $ref: '#/components/schemas/RequestMessages'
    SendMessageResponseData:
      type: object
      properties:
        messages:
          type: object
          properties:
            message:
              type: array
              minItems: 1
              maxItems: 10
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 36
                    maxLength: 36
                    description: Id genereated by system for incoming message.
                  messageId:
                    type: string
                    minLength: 1
                    maxLength: 255
                    description: >-
                      If incoming message had message id , same will be returned
                      back, so that clients can use it for mapping if needed.
                  conversation:
                    type: object
                    properties:
                      id:
                        type: string
                        minLength: 36
                        maxLength: 36
                        description: >
                          Conversation Id. If incoming message had conversation
                          id then same will be returned back. 

                          If it was not present then new id is generated by
                          conversation hub for message.

                          This id must be passed in subsequent messages on same
                          conversation.
    schemas-Attachment:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 255
          description: Unique id
        name:
          type: string
          description: file name
          minLength: 1
          maxLength: 255
          example: shirt.jpg
        contentType:
          type: string
          minLength: 1
          maxLength: 255
          example: image/jpg
        size:
          type: integer
          maximum: 10485760
          description: size of attachment.
          example: 1157
        url:
          type: string
          minLength: 1
          maxLength: 2500
          description: Use this URL to stream the attachment content
          example: >-
            https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg
    schemas-Attachments:
      type: object
      properties:
        attachment:
          type: array
          description: list of attachments.
          minItems: 1
          maxItems: 5
          items:
            $ref: '#/components/schemas/schemas-Attachment'
    CallbackInnerMessage:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >
            UUID generated by Conversation Hub. This field is returned only for
            messages that were exchanged via Conversation Hub. 

            If conversation started between customer and bots outside of
            conversation Hub, but those messages were submitted to Conversation
            Hub. 

            at the time of escalation, then this field will not be returned for
            such messages.
        messageId:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            External unique message Id. If message is submitted with same
            messageId again on same conversation, it will be considered as
            duplicate and will not be accepted
        type:
          type: object
          properties:
            value:
              type: string
              description: >-
                Message type value. Refer
                https://apidev.egain.cloud/services/messaging/msgtypes/msgtypetable.html
                to understand which type of messages client applications can
                send. | Client applications can send custom type of message as
                well, in that case type value must start with 'custom.', for
                example, 'custom.order'.
              enum:
                - text
                - richMessage.listpicker
                - richMessage.timepicker
                - richMessage.richlink
                - richMessage.quickreply
                - richMessage.template
                - richMessage.form
                - richMessage.app
                - richMessage.payment
                - richMessage.authentication
                - authentication.start
                - authentication.success
                - authentication.failure
                - authentication.accept
                - authentication.reject
                - agent.transfer
                - bot.transfer
                - queue.transfer
                - pagePush
                - error
                - escalation.transfer
                - escalation.request
                - typing.start
                - typing.end
                - agent.join
                - agent.exit
                - agent.available
                - agent.unavailable
                - agent.active
                - agent.inactive
                - customer.info
                - customer.active
                - customer.inactive
                - customer.exit
                - customer.block
                - cobrowse.start
                - conversation.state
                - delete.soft
                - delete.permanent
                - undo
                - conversation.end
              example: text
        parent:
          type: object
          description: >-
            Parent message, can be used for error messages to indicate for which
            message error message is generated.
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated by Conversation Hub for parent message
            messageId:
              type: string
              minLength: 1
              maxLength: 255
              description: External messageId of parent message
        content:
          $ref: '#/components/schemas/Content'
        sender:
          $ref: '#/components/schemas/ClientData'
        recipients:
          $ref: '#/components/schemas/Recipients'
        attachments:
          $ref: '#/components/schemas/schemas-Attachments'
        attributes:
          $ref: '#/components/schemas/Attributes'
        created:
          type: string
          format: date-time
          description: >
            Created time in GMT. This field is returned only for messages that
            were exchanged via Conversation Hub. 

            If conversation started between customer and bots outside of
            conversation Hub, but those messages were submitted to Conversation
            Hub.

            at the time of escalation, then this field will be not returned for
            such messages.
        sent:
          type: string
          format: date-time
          description: Sent time in GMT
    CallbackInnerMessages:
      type: object
      properties:
        paginationInfo:
          $ref: '#/components/schemas/PaginationInfo'
        message:
          type: array
          minItems: 1
          maxItems: 200
          description: list of messages returned in Fetch cnversation or during escalation
          items:
            $ref: '#/components/schemas/CallbackInnerMessage'
    CallbackConversation:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >-
            conversation id, this id must be passed in subsequent messages on
            same conversation.
        account:
          type: object
          properties:
            channel:
              type: object
              properties:
                type:
                  type: string
                modified:
                  type: string
                  format: date-time
                  description: >-
                    when channel was last modified. Sent to participants by MH
                    only when its custom channel message.
                id:
                  type: string
                  minLength: 36
                  maxLength: 36
                  description: >-
                    Channel id. This can be used to fetch channel details from
                    MH. Sent to participants by MH only when its custom channel
                    message.
            address:
              type: string
              description: chanel account addres
            modified:
              type: string
              format: date-time
              description: >-
                when account was last modified. Sent to participants by MH only
                when its custom channel message.
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: >-
                Account id. This can be used to fetch account details from MH.
                Sent to participants by MH only when its custom channel message.
        conversationContact:
          $ref: '#/components/schemas/conversationContact'
        lookupContact:
          $ref: '#/components/schemas/lookupContact'
        entryPoint:
          $ref: '#/components/schemas/EntryPoint'
        customer:
          $ref: '#/components/schemas/Customer'
        clientInfo:
          $ref: '#/components/schemas/ClientInfo'
        type:
          type: string
          example: survey.form
          description: >-
            Type of conversation, pass it only when its survey type
            conversation.
          enum:
            - survey.form
        parent:
          type: object
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: ID to parent conversation
              example: d987d07a-d59c-11ea-87d0-0242ac13000d
        preferredAgent:
          type: object
          description: >-
            Preferred Agent details. Sender may send  'id' or 'userName' or
            both.
          properties:
            id:
              type: string
              minLength: 1
              maxLength: 36
              description: Preferred Agent id
              example: '1234'
            userName:
              type: string
              minLength: 1
              maxLength: 255
              description: Preferred Agent userName
              example: agent007
        messages:
          $ref: '#/components/schemas/CallbackInnerMessages'
    CallbackMessage:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >-
            UUID generated by Conversation Hub. This field is returned only for
            messages that were exchanged via Conversation Hub. | If conversation
            started between customer and bots outside of conversation Hub, but
            those messages were submitted to Conversation Hub | at the time of
            escalation, then this field will not be returned for such messages.
        messageId:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            External unique message Id. If message is submitted with same
            messageId again on same conversation, it will be considered as
            duplicate and will not be accepted
        type:
          type: object
          description: Message type
          properties:
            value:
              type: string
              description: >-
                Message type value. Refer
                https://apidev.egain.cloud/services/messaging/msgtypes/msgtypetable.html
                to understand which type of messages client applications can
                send. | Client applications can send custom type of message as
                well, in that case type value must start with 'custom.', for
                example, 'custom.order'.
              enum:
                - text
                - richMessage.listpicker
                - richMessage.timepicker
                - richMessage.richlink
                - richMessage.quickreply
                - richMessage.template
                - richMessage.form
                - richMessage.app
                - richMessage.payment
                - richMessage.authentication
                - authentication.start
                - authentication.success
                - authentication.failure
                - authentication.accept
                - authentication.reject
                - agent.transfer
                - bot.transfer
                - queue.transfer
                - pagePush
                - error
                - escalation.transfer
                - escalation.request
                - typing.start
                - typing.end
                - agent.join
                - agent.exit
                - agent.available
                - agent.unavailable
                - agent.active
                - agent.inactive
                - customer.info
                - customer.active
                - customer.inactive
                - customer.exit
                - customer.block
                - cobrowse.start
                - conversation.state
                - delete.soft
                - delete.permanent
                - undo
                - conversation.end
              example: text
        conversation:
          $ref: '#/components/schemas/CallbackConversation'
        parent:
          type: object
          description: >-
            Parent message, can be used for error messages to indicate for which
            message error message is generated.
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated by Conversation Hub for parent message
            messageId:
              type: string
              minLength: 1
              maxLength: 255
              description: External messageId of parent message
        content:
          $ref: '#/components/schemas/Content'
        sender:
          $ref: '#/components/schemas/ClientData'
        recipients:
          $ref: '#/components/schemas/Recipients'
        intent:
          type: object
          description: >-
            At the time of handoff to bot, agent can send intent of conversation
            to bot
          properties:
            value:
              type: string
              minLength: 1
              maxLength: 255
              description: Intent value
        attachments:
          $ref: '#/components/schemas/schemas-Attachments'
        attributes:
          $ref: '#/components/schemas/Attributes'
        created:
          type: string
          format: date-time
          description: >-
            Created time in GMT. This field is returned only for messages that
            were exchanged via Conversation Hub. | If conversation started
            between customer and bots outside of conversation Hub, but those
            messages were submitted to Conversation Hub | at the time of
            escalation, then this field will be not returned for such messages.
        sent:
          type: string
          format: date-time
          description: Sent time in GMT
    CallbackMessages:
      type: object
      properties:
        message:
          type: array
          minItems: 1
          maxItems: 200
          description: list of messages returned in Fetch cnversation or during escalation
          items:
            $ref: '#/components/schemas/CallbackMessage'
    CallbackRequestData:
      type: object
      properties:
        metadata:
          type: object
          properties:
            attributes:
              $ref: '#/components/schemas/Metadata'
        messages:
          $ref: '#/components/schemas/CallbackMessages'
    ResponseMessage:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >
            UUID generated by Conversation Hub. This field is returned only for
            messages that were exchanged via Conversation Hub. 

            If conversation started between customer and bots outside of
            conversation Hub, but those messages were submitted to Conversation
            Hub. 

            at the time of escalation, then this field will not be returned for
            such messages.
        messageId:
          type: string
          minLength: 1
          maxLength: 255
          description: >-
            External unique message Id. If message is submitted with same
            messageId again on same conversation, it will be considered as
            duplicate and will not be accepted
        type:
          type: object
          description: Message type
          required:
            - value
          properties:
            value:
              type: string
              description: >-
                Message type value. Refer
                https://apidev.egain.cloud/services/messaging/msgtypes/msgtypetable.html
                to understand which type of messages client applications can
                send. | Client applications can send custom type of message as
                well, in that case type value must start with 'custom.', for
                example, 'custom.order'.
              enum:
                - text
                - richMessage.listpicker
                - richMessage.timepicker
                - richMessage.richlink
                - richMessage.quickreply
                - richMessage.template
                - richMessage.form
                - richMessage.app
                - richMessage.payment
                - richMessage.authentication
                - authentication.start
                - authentication.success
                - authentication.failure
                - authentication.accept
                - authentication.reject
                - agent.transfer
                - bot.transfer
                - queue.transfer
                - pagePush
                - error
                - escalation.transfer
                - escalation.request
                - typing.start
                - typing.end
                - agent.join
                - agent.exit
                - agent.available
                - agent.unavailable
                - agent.active
                - agent.inactive
                - customer.info
                - customer.active
                - customer.inactive
                - customer.exit
                - customer.block
                - cobrowse.start
                - conversation.state
                - delete.soft
                - delete.permanent
                - undo
                - conversation.end
              example: text
        parent:
          type: object
          required:
            - id
          description: >-
            Parent message, can be used for error messages to indicate for which
            message error message is generated.
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: UUID generated by Conversation Hub for parent message
            messageId:
              type: string
              minLength: 1
              maxLength: 255
              description: External messageId of parent message
        content:
          $ref: '#/components/schemas/Content'
        sender:
          $ref: '#/components/schemas/ClientData'
        recipients:
          $ref: '#/components/schemas/Recipients'
        attachments:
          $ref: '#/components/schemas/schemas-Attachments'
        attributes:
          $ref: '#/components/schemas/Attributes'
        status:
          type: string
          description: Message Status
          enum:
            - sent
            - failed
            - retryInProgress
            - skipped
            - unsupported
        created:
          type: string
          format: date-time
          description: >
            Created time in GMT. This field is returned only for messages that
            were exchanged via Conversation Hub. 

            If conversation started between customer and bots outside of
            conversation Hub, but those messages were submitted to Conversation
            Hub.

            at the time of escalation, then this field will be not returned for
            such messages.
        sent:
          type: string
          format: date-time
          description: Sent time in GMT
    ResponseMessages:
      type: object
      properties:
        paginationInfo:
          $ref: '#/components/schemas/PaginationInfo'
        message:
          type: array
          minItems: 1
          maxItems: 200
          description: list of messages returned in Fetch cnversation or during escalation
          items:
            $ref: '#/components/schemas/ResponseMessage'
    ResponseConversation:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: >-
            conversation id, this id must be passed in subsequent messages on
            same conversation.
        account:
          type: object
          required:
            - channel
            - address
          properties:
            channel:
              type: object
              required:
                - type
              properties:
                type:
                  type: string
                modified:
                  type: string
                  format: date-time
                  description: >-
                    when channel was last modified. Sent to participants by MH
                    only when its custom channel message.
                id:
                  type: string
                  minLength: 36
                  maxLength: 36
                  description: >-
                    Channel id. This can be used to fetch channel details from
                    MH. Sent to participants by MH only when its custom channel
                    message.
            address:
              type: string
              description: chanel account addres
            modified:
              type: string
              format: date-time
              description: >-
                when account was last modified. Sent to participants by MH only
                when its custom channel message.
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: >-
                Account id. This can be used to fetch account details from MH.
                Sent to participants by MH only when its custom channel message.
        conversationContact:
          $ref: '#/components/schemas/conversationContact'
        lookupContact:
          $ref: '#/components/schemas/lookupContact'
        entryPoint:
          $ref: '#/components/schemas/EntryPoint'
        customer:
          $ref: '#/components/schemas/Customer'
        clientInfo:
          $ref: '#/components/schemas/ClientInfo'
        type:
          type: string
          example: survey.form
          description: >-
            Type of conversation, pass it only when its survey type
            conversation.
          enum:
            - survey.form
        parent:
          type: object
          required:
            - id
          properties:
            id:
              type: string
              minLength: 36
              maxLength: 36
              description: ID to parent conversation
              example: d987d07a-d59c-11ea-87d0-0242ac13000d
        messages:
          $ref: '#/components/schemas/ResponseMessages'
    ConversationAsset:
      type: object
      required:
        - channel
        - name
        - size
        - sender
      properties:
        channel:
          type: object
          required:
            - type
          properties:
            type:
              type: string
              minLength: 1
              maxLength: 255
              description: Channel type.
        sender:
          type: object
          description: recipient client application type
          required:
            - type
          properties:
            type:
              type: string
              description: type of recipient client application
              enum:
                - custom_bot
                - customer
                - egain_agent
                - egain_bot
                - custom_agent
              example: customer
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: Name of an asset with an extension.
        size:
          type: integer
          minimum: 1
          maximum: 10485760
    PreUploadAssetResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: Unique id generated for asset.
        contentUrlExpiry:
          type: string
          format: date-time
          example: '2020-08-11T03:19:21.070Z'
          description: Signed URL expiry time in GMT
        contentUrl:
          type: string
          description: URL to upload or download  the content
    PreDownloadAssetResponse:
      type: object
      properties:
        id:
          type: string
          minLength: 36
          maxLength: 36
          description: Unique id generated for asset.
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: name of asset with extension.
        size:
          type: integer
          maximum: 2147483648
        contentType:
          type: string
        contentUrlExpiry:
          type: string
          format: date-time
          example: '2020-08-11T03:19:21.070Z'
          description: Signed URL expiry time in GMT
        contentUrl:
          type: string
          description: URL to upload or download  the content
  responses:
    get_all_authentications:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              authentication:
                type: array
                items:
                  $ref: '#/components/schemas/GetAuthenticationData'
            example:
              authentication:
                - id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
                  name: custom_bot_callback_authentication
                  type: oauth2
                  oauth2:
                    tokenRequestUrl: https://acme.support.com/clientapp/accesstoken
                    method: POST
                    headers:
                      - name: Content-Type
                        value: application/json
                      - name: Accept
                        value: application/json
                    payload: >-
                      { "clientId":
                      "c987cbfc-d59c-11ea-87d0-0242ac130003","clientSecret":
                      "c987cde6-d59c-11ea-87d0-0242ac130003","refreshToken":
                      "c987cee0-d59c-11ea-87d0-0242ac130003"}
                    accessTokenPath: $.accessToken
                  created: '2021-03-28T14:29:01.516Z'
                  modified: '2021-03-28T14:29:01.516Z'
                - id: b92fe726-da13-4821-b236-62ade0c1f7fa
                  name: custom_bot_callback_authentication_2
                  type: basic
                  basicAuth:
                    username: string
                    password: string
                  created: '2021-03-31T03:54:07.620Z'
                  modified: '2021-03-28T14:29:01.516Z'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Unsupported Parameters:
              $ref: '#/components/examples/UnsupportedParameters'
            Invalid Value:
              $ref: '#/components/examples/InvalidValue'
            Missing required query parameter:
              $ref: '#/components/examples/MissingParameter'
    401_invalid_authorization:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Invalid Authorization:
              $ref: '#/components/examples/Invalid_Authorization'
    403_scope_not_assigned:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Required Scope Missing:
              $ref: '#/components/examples/Scope_Not_Assigned'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Internal Server Error:
              $ref: '#/components/examples/InternalServerError'
    201_authentication_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
    400_common_bad_request:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Required Attribute missing:
              $ref: '#/components/examples/Required_Attribute_Missing'
            Duplicate Resource Found:
              $ref: '#/components/examples/Duplicate_Resource_Found'
            Unallowed attribute value:
              $ref: '#/components/examples/Unallowed_Attribute_Value'
            Max length exceeded:
              $ref: '#/components/examples/Max_Length_Exceeded'
            Unknown Attribute Present:
              $ref: '#/components/examples/Unknown_Attribute_Present'
            Value doesn't match pattern:
              $ref: '#/components/examples/Invalid_Characters_In_Attribute_Value'
    get_authentication:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAuthenticationData'
          example:
            id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
            name: custom_bot_callback_authentication
            type: oauth2
            oauth2:
              tokenRequestUrl: https://acme.support.com/clientapp/accesstoken
              method: POST
              headers:
                - name: Content-Type
                  value: application/json
                - name: Accept
                  value: application/json
              payload: >-
                { "clientId":
                "c987cbfc-d59c-11ea-87d0-0242ac130003","clientSecret":
                "c987cde6-d59c-11ea-87d0-0242ac130003","refreshToken":
                "c987cee0-d59c-11ea-87d0-0242ac130003"}
              accessTokenPath: $.accessToken
            created: '2021-03-28T14:29:01.516Z'
            modified: '2021-03-28T14:29:01.516Z'
    404_common_not_found:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Resource Not Found:
              $ref: '#/components/examples/Resource_Not_Found'
    get_all_client_applications:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              clientApplication:
                type: array
                items:
                  $ref: '#/components/schemas/GetClientApplicationData'
          example:
            clientApplication:
              - id: 9e1d7993-cc82-4d5f-a193-0d6b0d48a959
                name: custom_bot_client_application_1
                description: Client app for Eva bot
                active: true
                roles:
                  - name: custom_bot
                    version: v3
                    callback: https://example.support.com/messaging/customBot
                    notificationEmail: client_app_admin@example.com
                    headers:
                      - name: X-custom-header
                        value: xyz
                    authentication:
                      id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
              - id: 8e1d7993-cc82-4d5f-a193-0d6b0d48a959
                name: custom_bot_client_application_2
                description: Client app for Eva bot
                active: true
                roles:
                  - name: custom_bot
                    version: v3
                    callback: https://example.support.com/messaging/customBot
                    notificationEmail: client_app_admin@example.com
                    headers:
                      - name: X-custom-header
                        value: xyz
                    authentication:
                      id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
    201_client_application_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 9e1d7993-cc82-4d5f-a193-0d6b0d48a959
    get_client_application:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetClientApplicationData'
          example:
            id: 9e1d7993-cc82-4d5f-a193-0d6b0d48a959
            name: custom_bot_client_application_1
            description: Client app for Eva bot
            active: true
            roles:
              - name: custom_bot
                version: v3
                callback: https://example.support.com/messaging/customBot
                notificationEmail: client_app_admin@example.com
                headers:
                  - name: X-custom-header
                    value: xyz
                authentication:
                  id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
    get_all_participants:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              participant:
                type: array
                items:
                  $ref: '#/components/schemas/GetParticipantData'
            example:
              participant:
                - id: ae103957-9c82-4fa8-a34e-925be85e06ec
                  name: custom_bot_participant_1
                  type: custom_bot
                  active: true
                  application:
                    id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
                  modified: '2021-03-06T21:16:36.838Z'
                  created: '2021-03-06T21:16:36.838Z'
                - id: b5fc053c-77f4-4445-b6df-2e744aef8f4f
                  name: custom_bot_participant_2
                  type: custom_bot
                  active: true
                  application:
                    id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
                  modified: '2021-03-06T21:16:36.838Z'
                  created: '2021-03-21T03:08:57.190Z'
    201_participant_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 45a095f4-d0ee-4220-a689-22b541c58f61
    get_participant:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetParticipantData'
          example:
            id: ae103957-9c82-4fa8-a34e-925be85e06ec
            name: custom_bot_participant
            type: custom_bot
            active: true
            application:
              id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
            created: '2021-03-06T21:16:36.838Z'
            modified: '2021-03-06T21:16:36.838Z'
    get_all_channels:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              channel:
                type: array
                items:
                  $ref: '#/components/schemas/GetChannelData'
            example:
              channel:
                - id: 6121306b-59c2-4a2c-afee-1e025a84b0d9
                  type: custom_channel
                  icon: <base64>
                  displayName: Custom Channel
                  description: Custom Channel
                  active: true
                  created: '2021-06-11T21:14:41.836Z'
                  modified: '2021-06-11T23:14:41.836Z'
                  restrictions:
                    inbound:
                      maxTextLength: 140
                      features:
                        - typing_events
                        - attachments
                        - richText
                      attachmentPolicy:
                        enabled: true
                        maxSize: 12345
                        type: block
                        extensions:
                          - bat
                          - exe
                    outbound:
                      maxTextLength: 140
                      systemMessages: true
                      midChatAuth: true
                      features:
                        - typing_events
                        - attachments
                        - richText
                      richMessageTypes:
                        - listpicker
                        - timepicker
                        - richlink
                      attachmentPolicy:
                        enabled: true
                        maxSize: 12345
                        type: block
                        extensions:
                          - bat
                          - exe
                  l10nProperties:
                    - language: en-US
                      properties:
                        - name: msg_hub_retain_and_retry
                          value: >-
                            Thank you for reaching out. We will respond to you
                            at the earliest.
                        - name: msg_hub_off_hours
                          value: >-
                            Thank you for your inquiry. Our service hours are
                            9am-5pm PST, Monday-Friday. If you are trying within
                            the service hours and still getting this message,
                            please try again after some time.
                        - name: msg_hub_invalid_content_type_to_customer
                          value: This content type is not currently supported.
                        - name: msg_hub_invalid_content_type_to_agent
                          value: This content type is not currently supported.
                        - name: msg_hub_channel_msg_failed
                          value: >-
                            Message could not be delivered. Please try again
                            after some time.
                        - name: msg_hub_blocked_file_extension
                          value: Attachment file type '{0}' is not allowed.
                        - name: msg_hub_attachment_size_exceeds_limit
                          value: >-
                            File could not be sent. It exceeded the maximum
                            limit of {0}
    201_channel_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 45a095f4-d0ee-4220-a689-22b541c58f67
    get_channel:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetChannelData'
          example:
            id: 6121306b-59c2-4a2c-afee-1e025a84b0d9
            type: custom_channel
            icon: <base64>
            displayName: Custom Channel
            description: Custom Channel
            active: true
            created: '2021-06-11T21:14:41.836Z'
            modified: '2021-06-11T23:14:41.836Z'
            restrictions:
              inbound:
                maxTextLength: 140
                features:
                  - typing_events
                  - attachments
                  - richText
                attachmentPolicy:
                  enabled: true
                  maxSize: 12345
                  type: block
                  extensions:
                    - bat
                    - exe
              outbound:
                maxTextLength: 140
                systemMessages: true
                midChatAuth: true
                features:
                  - typing_events
                  - attachments
                  - richText
                richMessageTypes:
                  - listpicker
                  - timepicker
                  - richlink
                attachmentPolicy:
                  enabled: true
                  maxSize: 12345
                  type: block
                  extensions:
                    - bat
                    - exe
            l10nProperties:
              - language: en-US
                properties:
                  - name: msg_hub_retain_and_retry
                    value: >-
                      Thank you for reaching out. We will respond to you at the
                      earliest.
                  - name: msg_hub_off_hours
                    value: >-
                      Thank you for your inquiry. Our service hours are 9am-5pm
                      PST, Monday-Friday. If you are trying within the service
                      hours and still getting this message, please try again
                      after some time.
                  - name: msg_hub_invalid_content_type_to_customer
                    value: This content type is not currently supported.
                  - name: msg_hub_invalid_content_type_to_agent
                    value: This content type is not currently supported.
                  - name: msg_hub_channel_msg_failed
                    value: >-
                      Message could not be delivered. Please try again after
                      some time.
                  - name: msg_hub_blocked_file_extension
                    value: Attachment file type '{0}' is not allowed.
                  - name: msg_hub_attachment_size_exceeds_limit
                    value: >-
                      File could not be sent. It exceeded the maximum limit of
                      {0}
    get_all_orchestrations:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              orchestration:
                type: array
                items:
                  $ref: '#/components/schemas/GetOrchestrationData'
            example:
              orchestration:
                - id: 45a095f4-d0ee-4220-a689-22b541c58f67
                  name: default_orchestration
                  description: Created for Custom channel.
                  active: true
                  created: '2021-03-21T14:29:01.516Z'
                  modified: '2021-03-28T14:29:01.516Z'
                  applications:
                    botConfiguration:
                      forwardTranscript: true
                      bots:
                        - id: a09dddd6-394b-4039-86bc-a5dd89ee5e8d
                          participant:
                            id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                          onEscalation:
                            agent:
                              id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    customerConfiguration:
                      customer:
                        id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                - id: b5fc053c-77f4-4445-b6df-2e744aef8f4f
                  name: default_orchestration_2
                  description: Created for Custom channel
                  active: true
                  created: '2021-03-21T14:29:01.516Z'
                  modified: '2021-03-28T14:29:01.516Z'
                  applications:
                    customerConfiguration:
                      customer:
                        id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    agentConfiguration:
                      agents:
                        - id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
    201_orchestration_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 45a095f4-d0ee-4220-a689-22b541c58f67
    get_orchestration:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetOrchestrationData'
          example:
            id: 45a095f4-d0ee-4220-a689-22b541c58f67
            name: default_orchestration
            description: Created for custom channel.
            active: true
            created: '2021-03-21T14:29:01.516Z'
            modified: '2021-03-28T14:29:01.516Z'
            applications:
              botConfiguration:
                forwardTranscript: true
                bots:
                  - id: a09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    participant:
                      id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    onEscalation:
                      agent:
                        id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
              customerConfiguration:
                customer:
                  id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
    get_all_accounts:
      description: OK
      content:
        application/json:
          schema:
            type: object
            properties:
              paginationInfo:
                $ref: '#/components/schemas/PaginationInfo'
              account:
                type: array
                items:
                  $ref: '#/components/schemas/GetAccountData'
            example:
              account:
                - id: ae103957-9c82-4fa8-a34e-925be85e06ec
                  created: '2021-03-21T14:29:01.516Z'
                  modified: '2021-03-28T14:29:01.516Z'
                  name: order_account
                  address: '123456789'
                  channel:
                    id: 45a095f4-d0ee-4220-a689-22b541c58f67
                  chatConfigurations:
                    timeout: 30
                    defaultLanguage: en-US
                    onAgentUnavailability: off_hours
                    orchestration:
                      id: c37e975f-6b2f-490f-9cac-dfa05499f744
                    entryPoint:
                      id: '1001'
                - id: b5fc053c-77f4-4445-b6df-2e744aef8f4f
                  created: '2021-03-21T14:29:01.516Z'
                  modified: '2021-03-28T14:29:01.516Z'
                  name: purplenile_account
                  address: '123456789'
                  channel:
                    id: 45a095f4-d0ee-4220-a689-22b541c58f67
                  chatConfigurations:
                    timeout: 30
                    defaultLanguage: en-US
                    onAgentUnavailability: off_hours
                    orchestration:
                      id: c37e975f-6b2f-490f-9cac-dfa05499f744
                    entryPoint:
                      id: '1001'
    201_account_created:
      description: Created
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Id'
          example:
            id: 45a095f4-d0ee-4220-a689-22b541c58f67
    get_account:
      description: OK
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/GetAccountData'
          example:
            id: ae103957-9c82-4fa8-a34e-925be85e06ec
            created: '2021-03-21T14:29:01.516Z'
            modified: '2021-03-28T14:29:01.516Z'
            name: order_account
            address: '123456789'
            channel:
              id: 45a095f4-d0ee-4220-a689-22b541c58f67
            chatConfigurations:
              timeout: 30
              defaultLanguage: en-US
              onAgentUnavailability: off_hours
              orchestration:
                id: c37e975f-6b2f-490f-9cac-dfa05499f744
              entryPoint:
                id: '1001'
    202_send_message:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SendMessageResponseData'
          example:
            messages:
              message:
                - id: c3bd352c-68ca-43ed-a328-89e125332f5d
                  messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                  conversation:
                    id: a78cfcc0-2182-4fff-91e2-67bad444df13
    400_send_message:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Invalid Conversation ID:
              $ref: '#/components/examples/Invalid_Completed_Expired_Conversation'
            Required Attribute missing in payload:
              $ref: '#/components/examples/Required_Attribute_Missing'
            In valid message Type:
              $ref: '#/components/examples/Sender_Not_Allowed_To_Send_Message_Type'
            Invalid Sender:
              $ref: '#/components/examples/Sender_Not_Part_Of_Conversation'
    403_send_message:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Invalid Sender:
              $ref: '#/components/examples/Sender_Not_Allowed_To_Start_Conversation'
            Required Scope Missing:
              $ref: '#/components/examples/Scope_Not_Assigned'
    get_conversation:
      description: Response for fetch conversation API
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ResponseConversation'
          example:
            id: 21822806-88c3-43b3-8eed-097b4f0d68a7
            account:
              address: '1000'
              channel:
                type: web_chat
            conversationContact: phone.mobile
            entryPoint:
              id: '1000'
            customer:
              name: John smith
              type: individual
              attributes:
                - name: type
                  value: individual
              contacts:
                contact:
                  - type: phone
                    subType: mobile
                    address: '123456788'
                  - type: email
                    address: johnsmith@example.com
            messages:
              message:
                - id: c3bd352c-68ca-43ed-a328-89e125332f5d
                  messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                  type:
                    value: text
                  content:
                    text: I need help with my order.
                    redact: false
                  sender:
                    type: customer
                    participant:
                      name: John smith
                  recipients:
                    recipient:
                      - type: custom_bot
                        participant:
                          name: custom_bot_participant
                  status: sent
                  created: '2021-03-30T22:58:09.533Z'
                  sent: '2021-03-30T22:58:11.549Z'
                - id: a08c022c-123b-4c90-9cba-12927981e347
                  messageId: 1db8cee5-c7af-484a-bd6e-57d38c53193a
                  type:
                    value: text
                  content:
                    text: Please enter your order number
                    redact: false
                  sender:
                    type: custom_bot
                    participant:
                      name: custom_bot_participant
                  recipients:
                    recipient:
                      - type: customer
                  status: sent
                  created: '2021-03-30T22:58:11.709Z'
                  sent: '2021-03-30T22:58:13.726Z'
                - id: 6bb5190a-a6f2-4069-a039-0f780fdf8a03
                  messageId: c3bd352c-68ca-43ed-a328-89e125332f5d
                  type:
                    value: text
                  content:
                    text: '12354326875'
                    redact: false
                  sender:
                    type: customer
                    participant:
                      name: John smith
                  recipients:
                    recipient:
                      - type: custom_bot
                        participant:
                          name: custom_bot_participant
                  status: sent
                  created: '2021-03-30T22:58:26.752Z'
                  sent: '2021-03-30T22:58:28.209Z'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Forbidden:
              $ref: '#/components/examples/Forbidden'
    NotAcceptable:
      description: Not Acceptable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/WSErrorCommon'
          examples:
            Invalid Accept-Language:
              $ref: '#/components/examples/InvalidAcceptLanguage'
  examples:
    UnsupportedParameters:
      value:
        code: 400-101
        developerMessage: 'Unsupported query parameter(s) supplied: ''<query_parameter>''.'
    InvalidValue:
      value:
        code: 400-152
        developerMessage: >-
          Invalid value is provided in the request body for the following
          attribute:'<attribute_name>'.
    MissingParameter:
      value:
        code: 400-112
        developerMessage: >-
          Required query parameter(s) is missing. The following parameters are
          required: '<query_parameter>'.
    Invalid_Authorization:
      description: >
        Invalid on expired Authorization. Generate new Authorization header and
        try again.
      value:
        code: 401-104
        developerMessage: Invalid or missing 'Authorization' header value.
    Scope_Not_Assigned:
      description: >
        OAuth Client application used for generating Authorization token doesn't
        have required scope to call this API.

        Refer API description to know which scope needs to be assigned to OAuth
        client.
      value:
        code: 403-197
        developerMessage: Not authorized to perform the action.
    InternalServerError:
      value:
        code: 500-100
        developerMessage: >-
          System is unable to process this request. Please contact your
          administrator.
    Required_Attribute_Missing:
      description: Required attribute is missing in payload
      value:
        code: 400-143
        developerMessage: 'Required attribute is missing in the request body: <attribute>'
    Duplicate_Resource_Found:
      description: Resouce with same details found
      value:
        code: 400-138
        developerMessage: 'Duplicate resource present in request body: <duplicate_value>'
    Unallowed_Attribute_Value:
      description: One of the attribute has value which is not allowed
      value:
        code: 400-196
        developerMessage: >-
          Invalid value of attribute <attrbiute>, expected values are:
          [<possible_values>].
    Max_Length_Exceeded:
      description: Attribute value has length that exceeds limit
      value:
        code: 400-358
        developerMessage: >-
          The value provided for <attribute> is more than the maximum allowed
          length of <limit>
    Unknown_Attribute_Present:
      description: Unknown attribute present in request body
      value:
        code: 400-420
        developerMessage: >-
          <attribute>: is not defined in the schema and the schema does not
          allow additional properties
    Invalid_Characters_In_Attribute_Value:
      description: Attribute value doesn't match pattern of allowed characters
      value:
        code: 400-414
        developerMessage: >-
          Value(s) of request body attribute <attribute> must match the
          following format: ^[A-Za-z0-9\\-_ ]+$.
    Resource_Not_Found:
      description: Resource not found
      value:
        code: 404-101
        developerMessage: 'The following id does not exist: <id>'
    Customer_to_Conversation_Hub:
      description: This example shows how customer client app can start conversation.
      value:
        metadata:
          attributes:
            - name: k1
              value: v1
        messages:
          message:
            - messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: text
              content:
                text: I have a question related to my recent order.
              conversation:
                account:
                  channel:
                    type: custom.teams
                  address: '1000'
                clientInfo:
                  timeOffset: 30
                  referrerName: DD
                  referrerUrl: http://egain.com
                lookupContact: phone.mobile
                conversationContact: phone.mobile
                customer:
                  name: John smith
                  type: individual
                  attributes:
                    - name: group
                      value: eGain
                  contacts:
                    contact:
                      - type: phone
                        subType: mobile
                        address: '123456788'
                      - type: email
                        address: johnsmith@example.com
              sender:
                type: customer
                participant:
                  name: customer_name
              attributes:
                attribute:
                  - external: true
                    name: k1
                    value: v1
    Custom_bot_to_Conversation_Hub:
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: text
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
              content:
                text: Please enter your order number
    bot_escalate_conversation:
      description: >
        Bot application can escalate conversation to the Agent by sending
        'escalation.transfer' type message to the Conversation Hub.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: escalation.transfer
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    agent_escalate_conversation:
      description: >
        Agent application can handoff conversation to the bot by sending
        'escalation.transfer' type message to the Conversation Hub.

        During handoff agent can share intent(if available) of conversation with
        the bot
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: escalation.transfer
              intent:
                value: order_complaints
              sender:
                type: custom_agent
                participant:
                  name: custom_agent_name
    customer_start_typing:
      description: >
        Participants in conversation ( customer/botagent) can send typing events
        to each other.

        Send 'typing.start' type of message to indicate start of the typing
        event and 'typing.end' to indicate end of typing event.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: typing.start
              sender:
                type: customer
                participant:
                  name: customer_name
    eGain_Agent_to_Conversation_Hub:
      description: Message from eGain Agent to Conversation Hub
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: text
              sender:
                type: egain_agent
                participant:
                  name: egain_agent_name
              content:
                text: How can I help you today ?
            - messageId: 41822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: text
              content:
                text: How can I help you today ?
              sender:
                type: egain_agent
                participant:
                  name: egain_agent_name
              attachments:
                attachment:
                  - name: test.jpg
                    contentType: image/jpeg
                    size: 867
                    url: >-
                      https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg
                  - id: 862839d2-7cb3-4b38-90cd-5989a56e5d44
    sending_attachments:
      description: >
        Attachments can be sent by participants in two ways. 

        By uploading attachment using attachment APIs and just including
        attachment id in mesage payload.

        By sending publicly accessible url in message payload itself. This
        example show both type of attachment objects
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: text
              attachments:
                attachment:
                  - name: test.jpg
                    size: 867
                    url: >-
                      https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg
                  - id: 862839d2-7cb3-4b38-90cd-5989a56e5d44
              sender:
                type: customer
                participant:
                  name: customer_name
    update_customer_info:
      description: >
        Bot client application can ask questions to the customer and collect
        customer info. 

        That information can be shared with Conversation Hub by sending
        'customer.info' type message.

        Same information can be sent at the time escalation as well as part of
        'escalation.transfer' message.
      value:
        messages:
          message:
            - messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: customer.info
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
                lookupContact: phone.mobile
                conversationContact: phone.mobile
                customer:
                  name: John smith
                  type: individual
                  attributes:
                    - name: group
                      value: eGain
                  contacts:
                    contact:
                      - type: phone
                        subType: mobile
                        address: '123456788'
                      - type: email
                        address: johnsmith@example.com
              sender:
                type: customer
                participant:
                  name: customer_name
    send_listpicker:
      description: >
        Bot or Agent type of client application can send multiple choice
        questions to customer by sending 'richMessage.listpicker' type of
        message.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.listpicker
              content:
                json: >-
                  { "type": "list", "version": "1", "title": "Check latest
                  collection ", "subtitle": "Only online", "list": {  
                  "multipleSelection": false,   "sections": [     {      
                  "multipleSelection": false,  "title": "Select Answer", 
                  "order": 0,  "items": [ {"title": "Check trim
                  T-shirt","subtitle": "Available only online order.","id":
                  "100001","actions": [ { "type": "postback" }] }, {"title":
                  "Classic trench coat","subtitle": "Available in stores and
                  online","id": "100002","actions": [ { "type": "postback" }] }
                  ]}]}}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_listpicker_with_images:
      description: >
        Bot or Agent type of client application can send multiple choice
        questions with images to customer by sending 'richMessage.listpicker'
        type of message.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.listpicker
              content:
                json: >-
                  {   "type": "listpicker_with_images",   "version": "1",  
                  "title": "Check latest collection ",   "subtitle": "Only
                  online",   "imageid": "1",   "list": { "multipleSelection":
                  false, "sections": [ {   "multipleSelection": false,  
                  "title": "Select Answer",   "order": 0,   "items": [ {"title":
                  "Check trim T-shirt","subtitle": "Available only online
                  order.","id": "100001","imageid": "1","actions": [  {"type":
                  "postback"  }] }, {"title": "Classic trench coat","subtitle":
                  "Available in stores and online","id": "100002","imageid":
                  "2","actions": [  {"type": "postback"  }] }   ] } ]   },  
                  "images": [ { "url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg",
                  "imageid": "1" }, { "url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg",
                  "imageid": "2" {  "type": "listpicker_with_images", 
                  "version": "1",  "title": "Check latest collection ", 
                  "subtitle": "Only online",  "imageid": "1",  "list":
                  {"multipleSelection": false,"sections": [{ 
                  "multipleSelection": false,  "title": "Select Answer", 
                  "order": 0,  "items": [{"title": "Check trim
                  T-shirt","subtitle": "Available only online order.","id":
                  "100001","imageid": "1","actions": [ {   "type": "postback"
                  }]},{"title": "Classic trench coat","subtitle": "Available in
                  stores and online","id": "100002","imageid": "2","actions": [
                  {   "type": "postback" }]}  ]}]  },  "images": [{"url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg","imageid":
                  "1"},{"url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg","imageid":
                  "2"}  ]}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_timepicker:
      description: >
        Bot or Agent type of client application can send pickup options or
        timeslots to customer using this type of message.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.timepicker
              content:
                json: >-
                  {"type": "timepicker","id":
                  "cd3e8271-2bd5-4489-b23b-c70a43058813","version": "1","style":
                  "icon","imageid": "1","title": "Timelslot selector-4","event":
                  {"timezoneOffset": 0,"title": "Choose a timeslot","timeslots":
                  [ { "duration": "3600", "startTime": "2020-12-31T17:00+0000",
                  "id": "1000006" }, { "duration": "3600", "startTime":
                  "2020-12-31T18:00+0000", "id": "1000007" }],"location": {
                  "latitude": 37.7725, "longitude": -122.4311, "radius": 100,
                  "title": "Building One"}},"images": [{ "url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg",
                  "imageid": "1"}]}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_richlink:
      description: >
        Bot or Agent type of client application can send rich links to customer
        using this type of message
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.richlink
              content:
                json: >-
                  {  "version": "1",  "type": "web_url",  "imageid": "1", 
                  "images": [{  "title": "Winter Jackets!!",  "url":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg", 
                  "link":
                  "https://aznadestzwa07.egdemo.info/purplenile/collection.html", 
                  "imageid": "1",  "mimeType": "image/jpg",  "style": "icon"} 
                  ]}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_quick_reply:
      description: >
        Bot or Agent can suggest reply to customer using this type of message.
        This is typically shown in bubble on customer side, 

        where customer can just tap on it to send reply instead of actually
        typing it.
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.quickreply
              content:
                json: >-
                  {  "type": "quickreply",  "version": "1",  "quickReply":
                  {"title": "How was your experience","items": [  {"title":
                  "Great"  },  {"title": "Decent"  },  {"title": "Terrible"  }] 
                  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_template:
      description: >
        Bot or Agent can send template type of message to whatsapp user using
        this type of message.

        Template must be approved by whatsapp.
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.template
              content:
                json: >-
                  {"type": "template","version": "1","template": { "title": "Hi
                  {{1}}, thanks for your order {{2}} placed on {{3}}. Your order
                  has shipped. You can get a tracking update any time by
                  replying TRACK.", "items": [{"id": "1","value": "Bob"},{"id":
                  "2","value": "12345"},{"id": "3","value": "01/21/23"} ]}}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_template_with_quick_reply_buttons:
      description: >
        Bot or Agent can send template type of message with quick reply buttons
        to whatsapp user using this type of message.

        Template must be approved by whatsapp.
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.template
              content:
                json: >-
                  {"type": "template","version": "1","subtype":
                  "quick_reply","template": {"title": "Hi {{1}}, thanks for your
                  order {{2}} placed on {{3}}. Your order has shipped. You can
                  get a tracking update any time by replying TRACK.","items": [{
                  "id": "1", "value": "Bob"},{ "id": "2", "value": "12345"},{
                  "id": "3", "value": "01/21/23"}],"buttons": [{ "title": "Thank
                  you"},{ "title": "I did not order this"},{ "title":
                  "TRACK"}]}}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_template_with_call_to_action_buttons:
      description: >
        Bot or Agent can send template type of message with quick reply buttons
        to whatsapp user using this type of message.

        Template must be approved by whatsapp.
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.template
              content:
                json: >-
                  {  "type": "template",  "version": "1",  "subtype":
                  "click_to_action",  "template": {"title": "Hi {{1}}, thanks
                  for your order {{2}} placed on {{3}}. Your order has shipped.
                  You can get a tracking update any time by replying
                  TRACK.","items": [  {"id": "1","value": "Bob"  },  {"id":
                  "2","value": "12345"  },  {"id": "3","value": "01/21/23" 
                  }],"buttons": [  {"title": "Call us","type": "number","value":
                  "14081234567"  },  {"title": "Visit our site","type":
                  "web","value": "https://www.egain.com/"  }]  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    request_customer_to_signin:
      description: >
        Bot or Agent can request customer to sign in, using this type of
        message.
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.authentication
              content:
                json: >-
                  {  "type": "authentication",  "version": "1", 
                  "authentication": {"version": "2.0","icon":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg","oauth2":
                  {  "responseType": "code",  "scope": ["r_liteprofile"  ], 
                  "redirectURI": "https://example.com/auth/linkedin/callback"} 
                  },  "receivedMessage": {"title": "Sign In","subtitle": "Log in
                  with your credentials"  },  "replyMessage": {"title": "Sign In
                  Success","subtitle": "You are now authenticated"  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_app:
      description: >
        Bot or Agent can send app type of request to customer using this type of
        message.

        This is typically used for sending Apple's iMessage type message
        https://developer.apple.com/imessage/
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.app
              content:
                json: >-
                  {  "type": "app",  "version": "1",  "app": {"icon":
                  "https://images-na.ssl-images-amazon.com/images/I/41yy1%2B08agL._SR38,50_.jpg","id":
                  "<app - store - id>","name": "Name of the App","url":
                  "?data=passed-to-app&data2=more-data-passed-to-app","useLiveLayout":
                  "true"  },  "receivedMessage": {"title": "Title of
                  Bubble","subtitle": "subtitle of bubble"  },  "replyMessage":
                  {"title": "Title of Bubble","subtitle": "subtitle of bubble" 
                  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_form:
      description: >
        This is applicable only for Apple Business chat channel. Bot or Agent
        can send form using this type of message.

        More info
        https://register.apple.com/resources/messages/msp-rest-api/type-interactive#form-message
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.form
              content:
                json: >-
                  {  "type": "form",  "version": "1",  "form": {"version":
                  "1.1","template": "messageForms","data": { 
                  "startPageIdentifier": "0",  "showSummary": true,  "splash":
                  {"header": "Apple Card","splashtext": "Kindly answer the
                  following questions to help us dispute this
                  transaction.","buttonTitle": "Continue","imageid": "2"  }, 
                  "pages": [{  "pageIdentifier": "0",  "type": "select", 
                  "title": "Type of Product",  "subtitle": "Was the merchandise
                  you received defective or not as the merchant described?", 
                  "multipleSelection": true,  "nextPageIdentifier": "1", 
                  "items": [{  "title": "Option 1",  "value": "option1", 
                  "identifier": "001"},{  "title": "Option 2",  "value":
                  "option2",  "identifier": "002"},{  "title": "Option 3", 
                  "value": "option3",  "identifier": "003"},{  "title": "Option
                  4",  "value": "option4",  "identifier": "004"},{  "title":
                  "Option 5",  "value": "option5",  "identifier": "005"},{ 
                  "title": "Option 6",  "value": "option6",  "identifier":
                  "006"}  ]},{  "pageIdentifier": "1",  "type": "select", 
                  "title": "Item Condition",  "subtitle": "Was the merchandise
                  you received defective or not as the merchant described?", 
                  "multipleSelection": false,  "items": [{  "title":
                  "Defective",  "value": "defective",  "identifier": "101", 
                  "nextPageIdentifier": "2"},{  "title": "Not as described", 
                  "value": "notAsDescribed",  "identifier": "102", 
                  "nextPageIdentifier": "3"}  ]},{  "pageIdentifier": "2", 
                  "type": "select",  "title": "Supporting Documents", 
                  "subtitle": "Do you have any supporting documents that
                  demonstrate that the product quality was not sufficient?", 
                  "multipleSelection": false,  "items": [{  "title": "Yes", 
                  "value": "yes",  "nextPageIdentifier": "3"},{  "title": "No", 
                  "value": "no",   "nextPageIdentifier": "3"}  ]},{ 
                  "pageIdentifier": "3",  "type": "picker",  "pickerTitle":
                  "Select Your Region",  "nextPageIdentifier": "4",  "items":
                  [{  "title": "APAC",  "value": "apac"},{  "title": "EMEA", 
                  "value": "emea"},{  "title": "LATAM",  "value": "latam"},{ 
                  "title": "NAM",  "value": "nam"}  ]},{  "pageIdentifier":
                  "4",  "type": "datePicker",  "title": "Retrieval Date", 
                  "subtitle": "What date did you receive, or expect to receive
                  the product?",  "nextPageIdentifier": "5",  "options":
                  {"startDate": "2020-02-12","maximumDate":
                  "2020-02-13","minimumDate": "2020-01-01","dateFormat":
                  "MM/dd/yyyy"  }},{  "pageIdentifier": "5",  "type": "input", 
                  "title": "Remaining Issues",  "subtitle": "Please provide
                  details about remaining issue",  "nextPageIdentifier": "6", 
                  "options": {"required": true,"inputType":
                  "multiline","maximumCharacterCount": 300,"keyboardType":
                  "UIKeyboardTypeEmailAddress"  }},{  "pageIdentifier": "6", 
                  "type": "input",  "title": "Product name",  "subtitle":
                  "Please provide name of the product",  "options": {"required":
                  false,"inputType": "singleline","maximumCharacterCount":
                  25,"keyboardType": "UIKeyboardTypePhonePad"  },  "submitForm":
                  true}  ]}  },  "images": [{  "data":
                  "base64encoded-image-file",  "imageid": "1"},{  "data":
                  "base64encoded-image-file",  "imageid": "2"}  ], 
                  "receivedMessage": {"title": "Apple Card Dispute
                  Form","subtitle": "Please fill out the following dispute
                  form.","style": "small","imageid": "1"  },  "replyMessage":
                  {"title": "Tap to view your response.","subtitle": "","style":
                  "small","imageid": "1"  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_payment_request:
      description: >
        This is applicable only for Apple Business chat channel. Bot or Agent
        can request customer to make payment using this type of message.

        More info
        https://register.apple.com/resources/messages/msp-rest-api/type-interactive#apple-pay-message
      value:
        messages:
          message:
            - messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: richMessage.payment
              content:
                json: >-
                  { "type": "payment",  "version": "1",  "data": {"images":
                  [{"url":
                  "https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Salmo_salar.jpg/320px-Salmo_salar.jpg","imageid":
                  "1"}],"payment": {"endpoints": {"paymentGatewayUrl":
                  "https://qa-messaginghub.ezdev.net/egain/notify/v1/webhooks/apple/payment/gateway"},"paymentRequest":
                  {"applePay": { "merchantCapabilities":
                  ["supports3DS","supportsDebit","supportsCredit" ],
                  "supportedNetworks": ["amex","visa","discover","masterCard"
                  ]},"countryCode": "US","currencyCode": "USD","domainName":
                  "qa-messaginghub.ezdev.net","lineItems": [ {"amount":
                  "1.00","label": "Salmon","type": "final" }, {"amount":
                  "2.00","label": "Halibut","type": "final" },{"amount":
                  "0.50","label": "Shipping","type": "final"
                  }],"requiredBillingContactFields": [
                  "post"],"requiredShippingContactFields": [ "post", "phone",
                  "email", "name"],"shippingMethods": [ {"amount":
                  "0.00","detail": "Available within an hour","identifier":
                  "in_store_pickup","label": "In-Store" }, {"amount":
                  "0.01","detail": "5-8 Business Days","identifier":
                  "flat_rate_shipping_id_2","label": "UPS" }],"total": {
                  "amount": "3.50", "label": "Sams Fish", "type": "final"}}} 
                  },  "receivedMessage": {"imageIdentifier": "1","style":
                  "large","subtitle": "$3.50 at Sams Fish","title": "Sams Fish
                  Invoice"  }}
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    link_conversation_with_existing_case:
      description: >
        At the time of escalation sender application can provide case id for
        chat activity that will be created for conversation

        It must be valid existing case id.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: escalation.transfer
              attributes:
                attribute:
                  - external: false
                    object: activity
                    name: case_id
                    value: '123456'
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    send_error:
      description: >
        Participants in conversation can send error message back to sender if
        there is failure while processing message.

        Include id and messageId of parent message in payload, so that sender
        can figure out which message has failed.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: error
              parent:
                id: 4b9ae9f9-c91c-49f9-a146-d832131606e6
                messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              content:
                json: >-
                  {"code":"400-221", "error":"Message could not be delivered
                  because media files are disabled."}
              sender:
                type: customer
                participant:
                  name: customer_name
    send_delivered_status:
      description: >
        When client app delivers message to recipient, it can inform sender
        about delivery status using this type of message.

        Include '$.parent.id' and '$.parent.messageId' of parent message in
        payload, so that sender of parent message can link it with original
        message.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: status.delivered
              parent:
                id: 4b9ae9f9-c91c-49f9-a146-d832131606e6
                messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              sender:
                type: customer
                participant:
                  name: customer_name
    send_read_status:
      description: >
        When client app receives notification from recipient that which
        indicates recipient has read the message, it can inform sender about
        that using this type of message.

        Include '$.parent.id' and '$.parent.messageId' of parent message in
        payload, so that sender of parent message can link it with original
        message.
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: status.read
              parent:
                id: 4b9ae9f9-c91c-49f9-a146-d832131606e6
                messageId: 46ea3afb-b462-2ea4-7aed-500020a648f3
              sender:
                type: customer
                participant:
                  name: customer_name
    end_conversation:
      description: >
        Any participant( customet/bot/agent) can end the conversation by sending
        message with type 'conversation.end'.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: conversation.end
              sender:
                type: customer
                participant:
                  name: custom_bot_name
    survey_from_customer:
      description: >
        At the end of conversation, customer client app can present survey
        questions to the customer, and then submit survey to conversation Hub

        Customer client app must include conversation id of conversation for
        which survey is being submitted as value of
        '$.messages.message.conversation.parent.id'
      value:
        messages:
          message:
            - messageId: 56ea3afb-b462-2ea4-7aed-500020a648f3
              conversation:
                type: survey.form
                parent:
                  id: 96ea3afb-b462-2ea4-7aed-500020a648f3
              type:
                value: text
              content:
                json: >-
                  { "question" : [{"value":"How would you rate the quality of
                  the answers you received?","answer":"5"}]}
              sender:
                type: customer
                participant:
                  name: custom_bot_name
    Custom_bot_start_conversation:
      description: >
        If customer and bot has exchanged messages outside of conversation hub
        and bot wants to escalate conversation to 

        eGain Advisor/Agent, then custom bot client application can send this
        type of message. 

        At the time of escalation, Custom bot can include bot transcript
        (messages that are exchanged between customer and bot ) 

        in message, so that agent gets context of conversation. Transcript
        messages can be passed as part of
        '$.messages.message.conversation.messages' object
      value:
        messages:
          message:
            - messageId: 9e32007c-5952-4dc0-8ac8-516c2389ae56
              conversation:
                account:
                  address: byocv3
                  channel:
                    type: byocv3
                conversationContact: phone.mobile
                lookupContact: phone.mobile
                entryPoint:
                  id: '1005'
                customer:
                  name: John smith
                  type: individual
                  attributes:
                    - name: group
                      value: eGain
                  contacts:
                    contact:
                      - type: phone
                        subType: mobile
                        address: '923456788'
                clientInfo:
                  timeOffset: 30
                  referrerName: DD
                  referrerUrl: http://egain.com
                messages:
                  message:
                    - messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                      type:
                        value: text
                      content:
                        text: I have a question related to my recent order
                      sender:
                        type: customer
                        participant:
                          name: customer_name
                      recipients:
                        recipient:
                          - type: custom_bot
                            participant:
                              name: custom_bot_name
                      status: sent
                      sent: '2022-04-25T16:21:03.817Z'
                    - messageId: da2efe76-22f1-4461-ab6d-989068608286
                      type:
                        value: text
                      content:
                        text: ok
                        redact: false
                      sender:
                        type: custom_bot
                        participant:
                          name: custom_bot_name
                      recipients:
                        recipient:
                          - type: customer
                            participant:
                              name: John smith
                      status: failed
                      sent: '2022-04-25T16:21:05.199Z'
                    - messageId: c51de57f-c07a-4154-98e1-989ecb23ab05
                      type:
                        value: text
                      content:
                        text: escalate
                        redact: false
                      sender:
                        type: customer
                        participant:
                          name: customer_name
                      recipients:
                        recipient:
                          - type: custom_bot
                            participant:
                              name: custom_bot_name
                      status: sent
                      sent: '2022-04-25T16:21:13.926Z'
              type:
                value: escalation.transfer
              content:
                text: Including agent to the conversation
                redact: false
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
              recipients:
                recipient:
                  - type: egain_agent
    bot_escalate_conversation_with_preferred_agent:
      description: >
        Bot application can escalate conversation to preferred Agent by sending
        'escalation.transfer' type message with preferred agent id or userName
        or both.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
                preferredAgent:
                  id: '1234'
                  userName: agent007
              type:
                value: escalation.transfer
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    agentAvailable:
      description: >
        Agent client application can send this type of message to inform
        Conversation Hub about agent availability for entry point.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                entryPoint:
                  id: custom.1234
              type:
                value: agent.available
              sender:
                type: custom_agent
                participant:
                  name: custom_agent_name
    agentUnavailable:
      description: >
        Agent client application can send this type of message to inform
        Conversation Hub about agent unavailability for entry point.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                entryPoint:
                  id: custom.1234
              type:
                value: agent.unavailable
              sender:
                type: custom_agent
                participant:
                  name: custom_agent_name
    softDeleteInProgress:
      description: >
        Customer client application can send this type of message to soft delete
        previously sent message.

        $.message.parent.id is the 'id' of message(to be deleted) returned by
        system in the response when that message was submitted to the system.


        If $.message.parent.id is not available then alternatively, you can send
        its client message id, $.message.parent.messaged , 

        this value must match with $.message.messageId of original message to be
        deleted.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 91822806-88c3-43b3-8eed-097b4f0d68a7
              parent:
                id: 11822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: delete.soft
              sender:
                type: customer
    softDeleteCompleted:
      description: >
        Customer client application can send this type of message to soft delete
        previously sent message on completed conversation.

        $.message.parent.id is the 'id' of message(to be deleted) returned by
        system in the response when that message was submitted to the system.


        If $.message.parent.id is not available then alternatively, you can send
        its client message id, $.message.parent.messaged , 

        this value must match with $.message.messageId of original message to be
        deleted.


        Note that you can't submit further messages on new conversation that
        gets created when you submit this message
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                account:
                  address: byocv3
                  channel:
                    type: byocv3
              parent:
                id: 11822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: delete.soft
              sender:
                type: customer
    permanentDelete:
      description: >
        Customer client application can send this type of message to permanent
        delete previously sent message.

        $.message.parent.id is the 'id' of message(to be deleted) returned by
        system in the response when that message was submitted to the system.


        If $.message.parent.id is not available then alternatively, you can send
        its client message id, $.message.parent.messaged , 

        this value must match with $.message.messageId of original message to be
        deleted.


        If you want to permanent delete message that belong to completed
        conversation, then pass $.message.conversation.account instead of
        $.message.conversation.id, 


        Note that you can't submit further messages on new conversation that
        gets created when you submit this message if the message being deleted
        belongs to completed conversation.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 91822806-88c3-43b3-8eed-097b4f0d68a7
              parent:
                id: 11822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: delete.permanent
              sender:
                type: customer
    undoSoftDelete:
      description: >
        Customer client application can send this type of message to undo soft
        delete of previously sent message.

        $.message.parent.id is the 'id' of message(deleted) returned by system
        in the response when that message was submitted to the system.


        If $.message.parent.id is not available then alternatively, you can send
        its client message id, $.message.parent.messaged , 

        this value must match with $.message.messageId of original soft deleted
        message.


        If you want to undo soft delete of message that belong to completed
        conversation, then pass $.message.conversation.account instead of
        $.message.conversation.id Refer "Soft delete message sent on completed
        conversation", 


        Note that you can't submit further messages on new conversation that
        gets created just to delete that message.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 91822806-88c3-43b3-8eed-097b4f0d68a7
              parent:
                id: 11822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: undo
              sender:
                type: customer
    Send_Custom_attributes:
      description: >
        At the time of escalation custom bot application can send values for
        custom attributes for Activity that gets created when conversation is
        escalated.

        In '$.messages.message.attributes' object custom attributes can be
        added.

        Currently egain_agent client application only supports custom attributes
        for 'activity' and 'customer' object.

        Custom attribute name must be prefixed with 'custom.', otherwise it must
        be out of box attribute of object.

        If external=true, then egain_agent application ignores attributes.
      value:
        messages:
          message:
            - messageId: 31822806-88c3-43b3-8eed-097b4f0d68a7
              conversation:
                id: 21822806-88c3-43b3-8eed-097b4f0d68a7
              type:
                value: escalation.transfer
              attributes:
                attribute:
                  - external: false
                    object: activity
                    name: subject
                    value: 'Order number : 1234'
                  - external: false
                    object: activity
                    name: custom.crmId
                    value: '123456'
              sender:
                type: custom_bot
                participant:
                  name: custom_bot_name
    Invalid_Completed_Expired_Conversation:
      description: >
        If sender sends a message with invalid conversation id or conversation
        is either expired or completed.

        If conversation is expired or invalid, sender should send same message
        again without old conversation id, 

        in that case Conversation Hub will generate new conversation.
      value:
        code: 400-630
        developerMessage: >-
          Following conversation id is invalid, completed or expired :
          <conversationId>.
    Sender_Not_Allowed_To_Send_Message_Type:
      description: When sender sends message with type which is not allowed
      value:
        code: 400-199
        developerMessage: >-
          Invalid value of attribute
          'messages.message[0].type.value'='escalation.transfer'.
    Sender_Not_Part_Of_Conversation:
      description: >-
        If sender is not part of conversation. This can happen if bot tries to
        send message on already escalated coversation
      value:
        code: 400-240
        developerMessage: 'Sender is not part of following conversation :  <conversationId>'
    Sender_Not_Allowed_To_Start_Conversation:
      description: If sender is not allowed to start conversation
      value:
        code: 403-103
        developerMessage: Sender is not allowed to start conversation.
    Forbidden:
      value:
        code: 403-178
        developerMessage: 'User is not allowed to perform the following action: <action_name>.'
    InvalidAcceptLanguage:
      value:
        code: 406-100
        developerMessage: Invalid 'Accept-Language' header value provided.
  requestBodies:
    post_authentication:
      description: Register new authentication type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostAuthenticationData'
          examples:
            OAuth:
              description: OAuth type authentication
              value:
                name: custom_bot_callback_authentication
                type: oauth2
                oauth2:
                  tokenRequestUrl: https://example.com/accesstoken
                  method: POST
                  headers:
                    - name: Content-Type
                      value: application/json
                    - name: Accept
                      value: application/json
                  payload: >-
                    { "clientId":
                    "74513d54e112464ea8e69d3d639d0c94","clientSecret":
                    "nv1GRtTAL1OcKdqKZrQBb5AqQNilgaitr@JYtsdYZvLbCHx8dRjZeCPENmo8"}
                  accessTokenPath: $.accessToken
            Basic Auth:
              description: OAuth type authentication
              value:
                name: bot-authentication
                type: basic
                basicAuth:
                  username: assistant-1
                  password: 87d0-0242ac130003
    put_authentication:
      description: Update authentication type
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutAuthenticationData'
          example:
            name: custom_bot_callback_authentication
            type: oauth2
            oauth2:
              tokenRequestUrl: https://acme.support.com/clientapp/accesstoken
              method: POST
              headers:
                - name: Content-Type
                  value: application/json
                - name: Accept
                  value: application/json
              payload: >-
                { "clientId":
                "c987cbfc-d59c-11ea-87d0-0242ac130003","clientSecret":
                "c987cde6-d59c-11ea-87d0-0242ac130003","refreshToken":
                "c987cee0-d59c-11ea-87d0-0242ac130003"}
              accessTokenPath: $.accessToken
            modified: '2021-03-28T14:29:01.516Z'
    post_client_application:
      description: Register new client application
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostClientApplicationData'
          example:
            name: custom_bot_client_application_1
            description: Client app for Eva bot
            active: true
            roles:
              - name: custom_bot
                version: v3
                callback: https://example.support.com/messaging/customBot
                notificationEmail: client_app_admin@example.com
                headers:
                  - name: X-custom-header
                    value: xyz
                authentication:
                  id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
    put_client_application:
      description: Update Client application
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutClientApplicationData'
          example:
            name: custom_bot_client_application_1
            description: Client app for Eva bot
            active: true
            roles:
              - name: custom_bot
                version: v3
                callback: https://example.support.com/messaging/customBot
                notificationEmail: client_app_admin@example.com
                authentication:
                  id: 34fbb53f-ed7f-48d4-b545-e26cc95e075d
    post_participant:
      description: Create participant
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostParticipantData'
          examples:
            Participants with Intent:
              value:
                name: custom_bot_participant
                type: custom_bot
                active: true
                application:
                  id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
                intents:
                  intent:
                    - value: order_complaints
                      displayValue: Order Complaints
                    - value: sales_enquiries
                      displayValue: Sales Enquiries
            Participants without Intent:
              value:
                name: custom_bot_participant
                type: custom_bot
                active: true
                application:
                  id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
    put_participant:
      description: Update participant
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutParticipantData'
          example:
            name: custom_bot_participant
            type: custom_bot
            active: true
            application:
              id: 9d091084-3ca8-4afc-97e1-8b0ad52fc38f
            modified: '2021-03-06T21:16:36.838Z'
    post_channel:
      description: Register new custom channel
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostChannelData'
          examples:
            Create BYOC channel:
              description: >
                This is sample payload to create BYOC channel.

                Add base64 encoded image as value of 'icon' attribute before
                creating channel.
              value:
                type: custom_channel
                icon: <base64>
                displayName: Custom Channel
                description: Custom Channel
                active: true
                restrictions:
                  inbound:
                    maxTextLength: 140
                    features:
                      - typing_events
                      - attachments
                      - richText
                    attachmentPolicy:
                      enabled: true
                      maxSize: 12345
                      type: block
                      extensions:
                        - bat
                        - exe
                  outbound:
                    maxTextLength: 140
                    systemMessages: true
                    midChatAuth: true
                    features:
                      - typing_events
                      - attachments
                      - richText
                    richMessageTypes:
                      - listpicker
                      - quickreply
                      - timepicker
                      - richlink
                    attachmentPolicy:
                      enabled: true
                      maxSize: 12345
                      type: allow
                      extensions:
                        - jpeg
                        - txt
                l10nProperties:
                  - language: en-US
                    properties:
                      - name: msg_hub_retain_and_retry
                        value: >-
                          Thank you for reaching out. We will respond to you at
                          the earliest.
                      - name: msg_hub_off_hours
                        value: >-
                          Thank you for your inquiry. Our service hours are
                          9am-5pm PST, Monday-Friday. If you are trying within
                          the service hours and still getting this message,
                          please try again after some time.
                      - name: msg_hub_invalid_content_type_to_customer
                        value: This content type is not currently supported.
                      - name: msg_hub_invalid_content_type_to_agent
                        value: This content type is not currently supported.
                      - name: msg_hub_channel_msg_failed
                        value: >-
                          Message could not be delivered. Please try again after
                          some time.
                      - name: msg_hub_blocked_file_extension
                        value: Attachment file type '{0}' is not allowed.
                      - name: msg_hub_attachment_size_exceeds_limit
                        value: >-
                          File could not be sent. It exceeded the maximum limit
                          of {0}
            Create Google Business Messaging Channel:
              description: >
                This is sample payload to create Google business messaging
                channel.
              value:
                type: google_business_messaging
                displayName: Google Business Messaging
                description: Created for PurpleNile
                icon: >-
                  iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAABlVBMVEX///8Aqkv/QDEAhvn/vQD//v////3/vAAAh/gAfPc4mPkAhfgAq0sAdfj/QS8AqUuBu/v/uACbyPz/tAD/FgD/QDT/wwAApDsAgv//KhUAgff/PSwAoTTt+fQApkH/7ev/Lx3/yAD//PEAevcArTr/9fX/w73/rqf/opv/sq3/Jw7/NiX/in//5OL/Wk3/b2T/2tn/X1X/l5H/gHf/yUz/MTj/0AD/0Gv/2Yjx+P0Ap1MAmR8Ap1f/0cv/xsP/d2z/Tjz/j4j/Y1z/npX/UEb/tLb/ZlP/Iiv/5pz/ayT/fiL/7bL/mQ7/Vi3+77//kBD/Ijn/9+H/rAT/wjz/hA//gF//8ZQ4mfnP4/yaw/v/89X/y1X/5JW01/7/34D/66kAafbptwBxwHBmqfnGtxnE7NuRsxmX169Trzbd6/5Iq0WwuBG+3f1ysDRtrvjdvABGunNLxo13zZ1KtGPa9Oqw3M4AnXYAjdEAlrCB2K8Amp0cvngArydTungAkM9hzp0ApGQAk7QAsxAAnYsAjN6u2d2u4sQKqNbhAAAPbklEQVR4nO1dC2Pa1hUWDwkwQoodMBYImQTjB8SP2HVSY7tOUndLmrar121JuqZdljKWNkn9YF2zxEu3dfzunXOuwBhLIBsJQXa/BFs2irjfPe9zrxRB4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4Pg/g9T60vxZlCS7k0cSIrwkxgkP4Zh983FI3sFkiEfvlBhbXExWYuvoHYE1m3eKolBc3J5dWJibn5+fm1uY3V6ZHlF6EloXHUimhIrTix/M79zKasnTKJWDd24vrEwX8TTwOyNDmPwI8UPFXNxeWFtSNC2fL5eV4Clky+W8ppV3l+c/WJHI0YJ/HQWaInvht+Lstd0scMt2cGPAXypKtgwnpHbmFtk/HgGGKAhUOGnxo51SspQNKqkmnaBymt7JsQIavDS/WBSaKjDUkEiC26u3NC1L41eUs7QY4ebPKThQ8lr22uz0CLhX8i+zy1kNzU4xdbFTaqfkBwTZe9l8+fpC0W8CXSAJLBErzt1K5i3p9EY5WV6dbl5u6MCiQ3HhTqmcspGYE46l3bnp1hWHCzSe7etaZ1RwDoVMM5tf+gCuJIrDR1EQVpaT5ZPhXphnObm8Ipg6P1QozpVLyinneSF+4FuDWn6uOHyZ+coyhQcgmOqHItPVrIZiHAKwSca5Ls6TA+2L2yloyQWzkPRXks3PX1wrWedmF0dWu82cqt+6ShO9civvMj/Q9WxpaZoScp8JYo42By7UZYbEMZ+fHYJMFfLQ26Vsf87FkiB+KZfnfKcHc3w7Ce7PA4pYlWRL834pqRmPJWHxTtJtbsSPJeRK8kO/tFSiLoUoTC9pKS8YmmGxNO+bIZrV+PRyyRuCzBCT86LkV7QQqZRfvF5y3f5aBFPZ5AJ+lE8MaWqLdzT3o4RJ0FRR30TICt5rSSXovhNtckzOt6bSD0CkF1ede9HTjZmTY4vpgUnD9N1UUf8AZjjHWk1O+GG4PFtUWbSogmZfiqmoz1hJZp25UVbygePIZvOaViqVNC0Px0oqaEUbT4U3khjp/U3YFm+VzwzORoBAJFvOa6nd6zvXbq9+uHr72tqd3VReK1vqAHJGFZV8rvKLa5ozgjheTSvvrC5sL043hyziMs38DuupKsopXcBWjTZPKxm+MpwrZR3Wu+VkaXlhsdgaLa0G44FUnJ5d05L5VKc7TmGqJvrHj7QHjLArLcXsBmfz+eVWd9AKxdmdfD6rKOZsoTx996K4NF1cdlDxwhn5/M5ssUdMk2bXynkzRqRIRT/0ua5H5VnoQVChhlQ5eWu72KstiPO1fYu6kORdmRf1uTcjrFh7wTaGJItdllaK3dYFgT5OwOyuxuIEU1G/WzPCshbs5WZSZW2NuixAgL7YAvlDDr8DbhUmRsNA73dnBtxMMGgVq9tkmMrnF4psyZsidzdFZc61OIfrHUxFu5/vISSJmc2dfBcJKmzJc6mbA7XGdlbz24uaK7wfdSVIC4Yl0lDn1xVxE5iwveS3F0X9EYXir37d1QDRHd4W6VTHQGcEFKdF39cqcNR3L99b77r+ktVWhXNmza1eRVefNACQ05gMX/l4PWW7CArucFVsbsxzChAg23/j834TGvT9y+HJK5+k1lOKTf2avCa2bRxyemkA6+D7ypA2L703HglHbkQ+XU91VulsU4K247ez6AM4wZ+NhwGRK+GP15FQ6pQ5YiZ6fVo4j48ZLqAOvY8MI5HI5JXffJ465W6oUaGUt/1sj/ULGPhemGSILG/89tP1k+0yFOdTSnJW8L370Adg7PcZwQhp6vi99eBJ+gbfUtoynTWyMoSRv9cSIfydxLDR1jFTssEV6oaPLENJuDoeCbchcuMTZZ2lotRr0XxPK/vGN5fDp3Hl8qfrweYGtvL186fbw4abHQwj4cnwPfCpLDYyNzPS2PsiEo50SDF845MUCxv53WHcx3Q+fDbeSY801Qwb2uzohokm7loxjISvRO59HlTKWPSOOMWrN8fDZ7UUw8aN362ntLneBKkK7BNeWsLeF5ZaSpoKYWOld3VH23/64ihKXu4D24OE1JJfBI3x98XeGSlVJ32Nr/8rdMP9cTuC8Gf8D6ikvT4b8p2JsQdj/QD+9UOvGH5to6SUpY7vUbelB0GQ8qNErE8kJrxi+J6dGaIIJ53cbIcMJ2LRvhCKxl56QA7tW5i0dTTh8OWbTi81EQv1g3g0FHvQt8Oy5iiE7RlGxr8ZDMM4CDE25jY5xk/YQ0dj6WtASyNfDoZhCLQ0ExK8qUG/7Cws2jD+xd5gGMaj8Kew4Q3Dz7ox/OPVwTCM4t/EMw96x5JFcdjO8OYAGUYTFBDdZYidia/sGUbG33esNX0yRIqJx95kNV0Yhse/cnyZvmWIDD2gB5P2dTeGdwfKcMJ1RyP1ZOg4HLqipY9cr6FoxoaCYSgaNxm6boriEDEsXHL/iRN4NWBoXT0N1A5RS5Ghy1UiXW2IfOkjb25st2cYCQ8uHoaYL/Wg6SV1yWkikcHlNNEmQ/cJDkdeCp4m7lE8FIejtmAMH7vfjMLws2fTiGJ6ivWho8/txZD1KuJ0aPEuvhLPBdcTbxp6pEeNL/buZErIsEcfpsXTRoYhs7ZwlyF9nRzvEhBvOilKcQ4mYvGuaFKJWzNEYH3oNkMyRNteGzKcdBqCJwqOZGitpCTdTMabVWbRtl/K1HTPQSaFLTKn3URrGUZD8VAs6n7bW6Tu3X3rhRmGy1+xlmMPipLw6E8JByhgyyluxTAUjY151dbfO8sv0vr25M8bvXez4Xbg55ec4CXI0JIhUCw89YggW3uKdBKM0HLNt0al2jtZlJzdfQ5nPMtkopaGCL+LPXKJ0BnQ+qGVDYYn/1JR9ZqDdNjB2hjrZz8qxC0ZglzjMS+aGAxWa8AowCd/3VJl46je+wq4qb13qIazHhSils4UFDcedz9YNGG9jh/+9rtKQA0E9IYjF9dbhuiSUUktzBClmBnbcIeOBXAvxll8X6nIshxQ05WeqZTk6MZlOOd5At2MdbwoPPWModS+nybCvEz4yYstOYCQA5sN9ly5PoMVrrO+LLRF/w5P452j6SgR2daaH76rqAHGUDWOcm4ssoOhPotmQEetCEIM8dDRgPaclBd0MPmtXFFlk2EA3em5t3hbfArL7CyNEJ1p5pl3O6869iZSkDAlCFBVQ63Sikm/FDdAhCy4W8gw9tS7PciS1Nxfyjj+8AIIyk2K6G30/ZNnXl74U6jAiketKUZDiUsu0bH+7JM9wuHJHwwgqMpNiiroqbxZ67+/gKECl3qtDRGKQy/vOhFxnzczxcnvtyonGtpU1IBRvThFid0aK11K2FphCAsL73ZANvfqUxrzYutEQVv8AoE0+NOLjkBkWd3DTNw61hMKLz3d4ikKV/F+i/Dkk+/Qh8qdMgSW+usLM2QZ6caDWJf6Ph577uU+cvST9zEkfq9CGnOWHvmbzYN+BiAJTxNWVVMTkLJ5eW8U21UTCb+oVDD+WcoQ8tPDi1LEe/AnEiGbQMGU1P2FtVMDwIvfJRPERPSMo2Gpjaq/veD14fW4ELfvs6EMH3q/0Tp3VJE7fUybDIE7KGpOau7jczThUvPbRKKLhuJmoZfSAB423EhbmyATIeY2sn5QJ4JOn2Ftnic9TmRspYdvxBMPHc9aH8jtG6otR5lsUdW36sxsHU44ezo2FfZ2gBASxWDo/ROjJaG62UVLKX2TA4Zeyzm/x4uylI2xhF1NSAwhyyk8FgZzz9G+3kVPUZDghgz9uO54MBgI/zZGqYy9EKFuerBB7TpPydFwqoZhT0/FDBW/6JWa4Nhmcgf6j1NTlg3Epgyhumcro4O4r6qRVpnBdYNqbKrVHEvG2nmK7JHmLe7wvX6Y1tU3lb9PhViDrYMoZnHoSJ8O6J4cGG5uP80k1R2qkT6uteep5hMkqBGAqzQilXrVmqobcL0Z46epDJVNHZIk7Y2jIx3M/RwSczZAsLs1ooiNdPr4VbPL2Py/O1hkaF6uelDRDRmrMNV484/MFAWGU9aIP0I5lXgwsDsb8WNqutwl7jNQ3gMuR39dq+esxparVw9UXVfZZCHHN1u/TDFSpywQ05xM9Fm/DRKn/OhTwDP01lLMcChT1QPHh41qvd6imavXG43asZoG8aE2oGdSsYaeMf45dTYo4m/QzQxIhCKlp/WKYVNetGspyAWHj9qaVitHxwdvCQf7RxX4lUG8SNR0Hh4YMz+BT+00Q9y+jl3SAd79h6ZoqAESQC9JmmzhlU7rhLRBrtjqX6rym5+jU7SY3S7DTGFj0HffSmiKpFhOoRInKkvQPm1PU9/8DGGjzd3gUWGi/3umzgnw+Yd6eyfKCVrTIdtrOFxyRv7XVFsKHo1HCy/Fgd/nj592uIl25lyKDmcBjPHf/8GWaWtfRmFsg2UJA+UoYpUBCep5GXYRH3sf50ye+ZGFDWKYyTxrfeYgAfNZ39fVHrlbh3ycnERudcb4+5SZ2mRY98mfp1HkjpEii2euQsYEJ55BRY3Hnvv5qI36kS5T58JdgjhrxsyPFDZwF5ufD1eq72+i73efIfjomZ9/KcRpu6x/91DD1OYOdUq7XGZI5jjz5iezJvRLiJRmYFx0XU0pnQuo6Tf/ZfdH+/Y0EapjpZpuuC1E0gpIzBvsAVl+P+RMqFYwMAZc8agquWYqSvSj6nA8xAAD47EeOFeS2oUh1olUMGIvaxj4MWvM1TbT7vgbVm5BsNg8zJmba4YBMIrqvjvWKLNsXsd9coKXjxc4B5gzADEaeqBXA84JQyCYTh/WW30rv/kJQmtjaXV/03DB2ajyplGV2FUd7B0fGEiS1SMo32UWrs/heKibE2CLyqqhV175TcYSTJC5GpojOftzOFaWMVACL+vqoYNNjv6AaVSuVgG3Sg4j4LBeYj05XAowdP1tfVgf+CaZe0dhdI19Ix0wrJfBbbSUOqtp/QgiBF3MZzKWwBajaD55VqoeqroecNiHYyTTusyWAERhSJ8tydx6M0JL9cZrfVPHtdSeqxvwSm/qW4d1Jj9xmPxnd+QaB0dG2jAMM0/p1EzWW8TOcOVkcWPUUG/UjrcgfgMLtEtKzWWVmh4yNcLTcuW41qgPYnXeAzBryuWA5msVFJGg67p5AKI7OGzUmW6OiFqeRdte01y92qjVXr16+/bVq1eNRtW0OgJZ8EiSpN2GYuv/7Dj7PmmnyLzLQEfmJsQWEQsSJ7Y3ugQ5ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODg4ODjeJfwPBW3IvLn7DRAAAAAASUVORK5CYII=
                restrictions:
                  outbound:
                    maxTextLength: 3000
                    systemMessages: false
                    midChatAuth: false
                    richMessageTypes:
                      - listpicker
                      - quickreply
                    features:
                      - attachments
                      - typing_events
                    attachmentPolicy:
                      enabled: true
                      maxSize: 5242880
                      type: allow
                      extensions:
                        - jpeg
                        - jpg
                        - png
            Create Twilio SMS channel:
              description: |
                This is sample payload to create Twilio SMS channel.
              value:
                type: sms_twilio
                displayName: SMS
                description: Created for PurpleNile
                icon: >-
                  iVBORw0KGgoAAAANSUhEUgAAAEQAAAA+CAYAAACSqr0VAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAYFSURBVHhe5ZjPa11FFMffX2OSrf4D3XdbFFKhgtSFBVEqQRehdiEFCy7UpLRg3ASkC9NU2o2QRWlMunFjDLQosUpoUrSFQEJLIhnPOTNnfpyZuW/ue/e9e6MXvnzv5/6YO/fMyfe9vN7E5JsKNTmFflZNEoNLTvlEIbfpIMkkyROabUHyMjcPzcZ5MsRusrgfME2ylPV+E+oVdYJ0vDnFXXaQdsnOqSBuJfuLBreCAZJc6DiBrI++E3Lq0STwQf/TzAj4lWSHwMlG2Dg+zLK38pLNxMpY71tuUK5D6jje3HUHaZccF9Hnygyhwa3ghiQXOj4w62ZSwMEk8V7D41J1h+BFJdymgySTJGcywzGMozMEAG+2GpSN4+CWvZWXTC4YlGa9b3mEKssQvLjrDtIuOS6i5EnulPSnDAsuSHKh4wOybiYFzJPi43aSLSnsEDxYwm06SDJJcmFmhDw9TIYYx8EseysvmVwwKM163/IYlc4QPNl1B2mXHBdRsp8Z0r0MgQN23+dCxwGzbiYFTA+2DELvkMoypE0HSSZJHjAzaN92SK0MMY43WvZWXjK5YFCa9b7lFqU7BKHrzh1g2RWPnSW5KjO0u05JZEih4wBZ55XvfmZIpTOkTQdJJkluKDMkV2QIDMCT8I8bptXGa5jJBYPSrPcttylRtNYy5NSp99TCwl11+/aqWl6+H/uy5Ptqaememp39Wo/jSbJb8ZznOiXokD6ON2RddIJlELrQa6++rdZ+3FDHx8eq7vby5aH66svvkuMOJVOcVjrk3LlP1e7uc/OK9bf1tV9g8jAer7DRIJnBPGU46JBxZcZbjRTEjVlLomiST2SHrMmC2BUvdZcZ0vMZghdkPdcpIHTQG69fUnfvrKmHD/8IdPPmSrsdwuLiCB5Jh5w//5na2Xlmph9u+DLNZAgsgnipQTJDcs++jOwM4lwnVGfGHeiM3CcIvsxYO0QULcvGR9Ih+Dee29bXm+uQ3EvFnuuUadEpfobggaznOgWELoQTzm1j7xAWF0Oy8LF3yObm7+rMmVm1vf2XOVJ/W1n5iSbfRGbwdZkMyXVCdWb4nYJc1SF7e/vqw4tzan7+ljo4eGGOlm2YS1tbT9Q7ENr8vEhcjLqMDhp7h+D26NGf9LFM10f/teqinj49Qx/TvB0eHqn5uVtu8pWe65TY4wzBneilRCdYBqH3UVWH8La//0I9eLBJ/7Sl9PFH16kT+OM7KEiJuBiS+/gIOuRs3w7pt+GfBn6Bw+8ZF979nIqCBZmbW9KTZ9mVjbk0MyTbDqETsjNARSxU0iFVG2bL5cvf2PE+ubSgnj59rq5e/TZ4DomLUZfRSV5RQSPJkBs3vldHR/+Y16u/bWxs0U8EyZdIuvdSAcee6wzRIWLla2aGFL7M6urPA/3egd9PPnj/i+S4leJiSC5xFnADHeKKSQ5ivggfrztP/javqtTjx7tecLpfwliLiz/Qpw9NFMfhlWTZlY05XPnyzJAcZgioiGvot1+3qRgYjJXfH0rFxajL6KyAXRFRI8kQchA6FmRv74CCkR5sjvM+MU+SxZx17yUCjj3XCTnv0YWJzJCTHlRXriyqmZlryXNDiYshucRZAUPRwIfvEJBkkuQ6v4GymPk6j8OVHzwzpJdlSJckiphldFbArogpbi5DQNodsyLGh/vHmLPuTTrg2Es7Iec6Q0By0p0TF0NyibMChqL55wzX7xCQZJLkVKfggyuYJkUeM69gmt0K12Xp6QzpkqKiZRidFbArYpbt/jAZAtIuOS5qlzNDus2QzqtvET1nBQxF889ZDr1/h4AkkySf0MyYwmd7rDOkS4qKlmF6kRS7ImbZ7mvmoiCXZwhIu2TnLMn04Er3Jh1w7MUrX9fx2eDdzZBs8RLOChiK5p+znHcsStwhIMkkyf+RzIgyhAZoU1ycfpxykitilu2+Zl0Eyfq6fIaAtEt2zpJMD6p0b9IBx84rJ3lox2cnvDsZYotT4KyAoWj+OcvljkWhgtAK184MYBzIO3YSM6P9DsEHl3DKSa6IWbb7mvXLSubrfJ5W/wJN5IImcA7afwAAAABJRU5ErkJggg==
                restrictions:
                  outbound:
                    maxTextLength: 10000
                    systemMessages: false
                    midChatAuth: false
                    richMessageTypes:
                      - listpicker
                      - quickreply
                    features:
                      - attachments
                    attachmentPolicy:
                      enabled: true
                      maxSize: 524288
                      type: allow
                      extensions:
                        - jpeg
                        - jpg
                        - png
                l10nProperties:
                  - language: en-US
                    properties:
                      - name: msg_hub_retain_and_retry
                        value: >-
                          Thank you for reaching out. We will respond to you at
                          the earliest.
                      - name: msg_hub_off_hours
                        value: >-
                          Thank you for your inquiry. Our service hours are
                          9am-5pm PST, Monday-Friday. If you are trying within
                          the service hours and still getting this message,
                          please try again after some time.
                      - name: msg_hub_invalid_content_type_to_customer
                        value: This content type is not currently supported.
                      - name: msg_hub_invalid_content_type_to_agent
                        value: This content type is not currently supported.
                      - name: msg_hub_channel_msg_failed
                        value: >-
                          Message could not be delivered. Please try again after
                          some time.
                      - name: msg_hub_blocked_file_extension
                        value: Attachment file type '{0}' is not allowed.
                      - name: msg_hub_attachment_size_exceeds_limit
                        value: >-
                          File could not be sent. It exceeded the maximum limit
                          of {0}
                      - name: msg_hub_sms_optout_response
                        value: >-
                          You have successfully been unsubscribed. You will not
                          receive any more messages from this number. Reply
                          START to resubscribe.
            Create Whatsapp channel:
              description: |
                This is sample payload to create whatsapp channel.
              value:
                type: whatsapp
                displayName: WhatsApp
                description: Created for PurpleNile
                icon: >-
                  PD94bWwgdmVyc2lvbj0iMS4wIiA/PjxzdmcgaGVpZ2h0PSI1Ni42OTNweCIgaWQ9IkxheWVyXzEiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDU2LjY5MyA1Ni42OTM7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCA1Ni42OTMgNTYuNjkzIiB3aWR0aD0iNTYuNjkzcHgiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+Cgkuc3Qwe2ZpbGwtcnVsZTpldmVub2RkO2NsaXAtcnVsZTpldmVub2RkO30KPC9zdHlsZT48Zz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDYuMzgwMiwxMC43MTM4Yy00LjY1MTItNC42NTY1LTEwLjgzNjUtNy4yMjItMTcuNDI2Ni03LjIyNDdjLTEzLjU3ODUsMC0yNC42MywxMS4wNTA2LTI0LjYzNTMsMjQuNjMzMyAgIGMtMC4wMDE5LDQuMzQyLDEuMTMyNSw4LjU4LDMuMjg4NCwxMi4zMTU5bC0zLjQ5NSwxMi43NjU3bDEzLjA1OTUtMy40MjU3YzMuNTk4MiwxLjk2MjYsNy42NDk1LDIuOTk3MSwxMS43NzI2LDIuOTk4NWgwLjAxICAgYzAuMDAwOCwwLTAuMDAwNiwwLDAuMDAwMiwwYzEzLjU3NzEsMCwyNC42MjkzLTExLjA1MTcsMjQuNjM1LTI0LjYzNDdDNTMuNTkxNCwyMS41NTk1LDUxLjAzMTMsMTUuMzcwMSw0Ni4zODAyLDEwLjcxMzh6ICAgIE0yOC45NTM3LDQ4LjYxNjNoLTAuMDA4M2MtMy42NzQtMC4wMDE0LTcuMjc3Ny0wLjk4ODYtMTAuNDIxNS0yLjg1NDFsLTAuNzQ3Ni0wLjQ0MzdsLTcuNzQ5NywyLjAzMjhsMi4wNjg2LTcuNTU1OCAgIGwtMC40ODY5LTAuNzc0OGMtMi4wNDk2LTMuMjYtMy4xMzIxLTcuMDI4LTMuMTMwNS0xMC44OTY5YzAuMDA0NC0xMS4yODk0LDkuMTktMjAuNDc0LDIwLjQ4NDItMjAuNDc0ICAgYzUuNDY5LDAuMDAxNywxMC42MTAxLDIuMTM0NCwxNC40NzYsNi4wMDQ3YzMuODY1OCwzLjg3MDMsNS45OTM2LDkuMDE0OCw1Ljk5MTQsMTQuNDg1OSAgIEM0OS40MjQ4LDM5LjQzMDcsNDAuMjM5NSw0OC42MTYzLDI4Ljk1MzcsNDguNjE2M3oiLz48cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDAuMTg1MSwzMy4yODFjLTAuNjE1NS0wLjMwODEtMy42NDE5LTEuNzk3LTQuMjA2MS0yLjAwMjZjLTAuNTY0Mi0wLjIwNTQtMC45NzQ2LTAuMzA4MS0xLjM4NDksMC4zMDgxICAgYy0wLjQxMDMsMC42MTYxLTEuNTksMi4wMDI3LTEuOTQ5MSwyLjQxMzZjLTAuMzU5LDAuNDEwNi0wLjcxODIsMC40NjIzLTEuMzMzNiwwLjE1MzljLTAuNjE1NS0wLjMwODEtMi41OTg5LTAuOTU4LTQuOTUtMy4wNTUxICAgYy0xLjgzLTEuNjMyMy0zLjA2NTMtMy42NDc5LTMuNDI0NS00LjI2NDNjLTAuMzU5LTAuNjE2MS0wLjAzODItMC45NDkyLDAuMjctMS4yNTYyYzAuMjc2OS0wLjI3NTksMC42MTU2LTAuNzE4OSwwLjkyMzQtMS4wNzg0ICAgYzAuMzA3Ny0wLjM1OTMsMC40MTAzLTAuNjE2MywwLjYxNTUtMS4wMjY4YzAuMjA1Mi0wLjQxMDksMC4xMDI3LTAuNzcwNC0wLjA1MTMtMS4wNzg0ICAgYy0wLjE1MzktMC4zMDgxLTEuMzg0OS0zLjMzNzktMS44OTc4LTQuNTcwNmMtMC40OTk4LTEuMjAwMS0xLjAwNzItMS4wMzc1LTEuMzg1MS0xLjA1NjYgICBjLTAuMzU4NS0wLjAxNzktMC43Njk0LTAuMDIxNi0xLjE3OTctMC4wMjE2cy0xLjA3NzMsMC4xNTQxLTEuNjQxNCwwLjc3MDJjLTAuNTY0MiwwLjYxNjMtMi4xNTQ1LDIuMTA1Ni0yLjE1NDUsNS4xMzUxICAgYzAsMy4wMjk5LDIuMjA1Nyw1Ljk1NjksMi41MTM1LDYuMzY3NmMwLjMwNzcsMC40MTEsNC4zNDA1LDYuNjI4MiwxMC41MTUzLDkuMjk0NWMxLjQ2ODYsMC42MzQzLDIuNjE1MiwxLjAxMywzLjUwOTEsMS4yOTY2ICAgYzEuNDc0NiwwLjQ2ODYsMi44MTY1LDAuNDAyNCwzLjg3NzEsMC4yNDM5YzEuMTgyNy0wLjE3NjcsMy42NDE5LTEuNDg5LDQuMTU0OC0yLjkyNjdjMC41MTMtMS40MzgsMC41MTMtMi42NzA2LDAuMzU5LTIuOTI3MiAgIEM0MS4yMTEsMzMuNzQzMyw0MC44MDA2LDMzLjU4OTIsNDAuMTg1MSwzMy4yODF6Ii8+PC9nPjwvc3ZnPg==
                restrictions:
                  outbound:
                    maxTextLength: 1600
                    systemMessages: false
                    midChatAuth: false
                    richMessageTypes:
                      - listpicker
                      - quickreply
                      - template
                    features:
                      - attachments
                      - delivery_receipts
                    customerServiceWindow:
                      durationMinutes: 1440
                      continueMessageTypes:
                        - template
                    attachmentPolicy:
                      enabled: true
                      maxSize: 5242880
                      type: allow
                      extensions:
                        - jpeg
                        - jpg
                        - png
                        - pdf
                l10nProperties:
                  - language: en-US
                    properties:
                      - name: msg_hub_retain_and_retry
                        value: >-
                          Thank you for reaching out. We will respond to you at
                          the earliest.
                      - name: msg_hub_off_hours
                        value: >-
                          Thank you for your inquiry. Our service hours are
                          9am-5pm PST, Monday-Friday. If you are trying within
                          the service hours and still getting this message,
                          please try again after some time.
                      - name: msg_hub_invalid_content_type_to_customer
                        value: This content type is not currently supported.
                      - name: msg_hub_invalid_content_type_to_agent
                        value: This content type is not currently supported.
                      - name: msg_hub_channel_msg_failed
                        value: >-
                          Message could not be delivered. Please try again after
                          some time.
                      - name: msg_hub_blocked_file_extension
                        value: Attachment file type '{0}' is not allowed.
                      - name: msg_hub_attachment_size_exceeds_limit
                        value: >-
                          File could not be sent. It exceeded the maximum limit
                          of {0}
    put_channel:
      description: Update channel
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutChannelData'
          example:
            type: custom_channel
            icon: <base64>
            displayName: Custom Channel
            description: Custom Channel
            active: true
            modified: '2021-06-11T23:14:41.836Z'
            restrictions:
              inbound:
                maxTextLength: 140
                features:
                  - typing_events
                  - attachments
                  - richText
                attachmentPolicy:
                  enabled: true
                  maxSize: 12345
                  type: block
                  extensions:
                    - bat
                    - exe
              outbound:
                maxTextLength: 140
                systemMessages: true
                midChatAuth: true
                features:
                  - typing_events
                  - attachments
                  - richText
                richMessageTypes:
                  - listpicker
                  - quickreply
                  - timepicker
                  - richlink
                attachmentPolicy:
                  enabled: true
                  maxSize: 12345
                  type: block
                  extensions:
                    - bat
                    - exe
            l10nProperties:
              - language: en-US
                properties:
                  - name: msg_hub_retain_and_retry
                    value: >-
                      Thank you for reaching out. We will respond to you at the
                      earliest.
                  - name: msg_hub_off_hours
                    value: >-
                      Thank you for your inquiry. Our service hours are 9am-5pm
                      PST, Monday-Friday. If you are trying within the service
                      hours and still getting this message, please try again
                      after some time.
                  - name: msg_hub_invalid_content_type_to_customer
                    value: This content type is not currently supported.
                  - name: msg_hub_invalid_content_type_to_agent
                    value: This content type is not currently supported.
                  - name: msg_hub_channel_msg_failed
                    value: >-
                      Message could not be delivered. Please try again after
                      some time.
                  - name: msg_hub_blocked_file_extension
                    value: Attachment file type '{0}' is not allowed.
                  - name: msg_hub_attachment_size_exceeds_limit
                    value: >-
                      File could not be sent. It exceeded the maximum limit of
                      {0}
    post_orchestration:
      description: Register new conversation orchestration
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostOrchestrationData'
          examples:
            With Bot:
              value:
                name: default_orchestration
                description: Created for Custom channel
                active: true
                applications:
                  botConfiguration:
                    forwardTranscript: true
                    bots:
                      - id: a09dddd6-394b-4039-86bc-a5dd89ee5e8d
                        participant:
                          id: a09dddd6-394b-4039-86bc-a5dd89ee5e8d
                        onEscalation:
                          agent:
                            id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
                  customerConfiguration:
                    customer:
                      id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
            Without Bot:
              value:
                name: default_orchestration
                applications:
                  customerConfiguration:
                    customer:
                      id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                  agentConfiguration:
                    agents:
                      - id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
    put_orchestration:
      description: Update orchestration
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutOrchestrationData'
          example:
            name: default_orchestration
            description: Created for custom channel.
            active: true
            modified: '2021-06-11T23:14:41.836Z'
            applications:
              botConfiguration:
                forwardTranscript: true
                bots:
                  - id: a09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    participant:
                      id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
                    onEscalation:
                      agent:
                        id: c09dddd6-394b-4039-86bc-a5dd89ee5e8d
              customerConfiguration:
                customer:
                  id: b09dddd6-394b-4039-86bc-a5dd89ee5e8d
    post_account:
      description: Register new account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PostAccountData'
          examples:
            Create account for BYOC channel:
              description: |
                This is sample payload for BYOC channel account
              value:
                name: order_account
                address: '123456789'
                channel:
                  id: 45a095f4-d0ee-4220-a689-22b541c58f67
                chatConfigurations:
                  timeout: 30
                  defaultLanguage: en-US
                  onAgentUnavailability: off_hours
                  allowLogoutWithOpenChats: false
                  allowQueueTransferOnAgentUnavailability: false
                  orchestration:
                    id: c37e975f-6b2f-490f-9cac-dfa05499f744
                  entryPoint:
                    id: '1001'
            Create account for Google Business Messaging channel:
              description: >
                This is sample payload for Google Business Messaging channel
                channel account.

                Replace address value with real Google Business Messaging
                'google_business_messaging_agent', for example
                'brands/4e16c0b7-fbfe-4f07-bae9-e8b8289d4891/agents/776426e8-98cb-41c9-97fa-f88ee133fa9d'.

                If there is custom agent name set, that can be used as well as
                value of address.

                For more info refer
                https://developers.google.com/business-communications/business-messages/guides/how-to/agents
              value:
                name: order_account
                address: <google_business_messaging_agent>
                channel:
                  id: 45a095f4-d0ee-4220-a689-22b541c58f67
                chatConfigurations:
                  timeout: 30
                  defaultLanguage: en-US
                  onAgentUnavailability: off_hours
                  orchestration:
                    id: c37e975f-6b2f-490f-9cac-dfa05499f744
                  entryPoint:
                    id: '1001'
            Create account for Twilio SMS channel:
              description: |
                This is sample payload for Twilio SMS channel account.
              value:
                name: order_account
                address: +1234xxxxxxx
                attributes:
                  - name: accountSid
                    value: <account_sid>
                  - name: authToken
                    value: <auth_token>
                channel:
                  id: 45a095f4-d0ee-4220-a689-22b541c58f67
                chatConfigurations:
                  timeout: 30
                  defaultLanguage: en-US
                  onAgentUnavailability: off_hours
                  orchestration:
                    id: c37e975f-6b2f-490f-9cac-dfa05499f744
                  entryPoint:
                    id: '1001'
            Create account for WhatsApp channel:
              description: |
                This is sample payload for WhatsApp channel account.
              value:
                name: order_account
                address: 1234xxxxxxx
                attributes:
                  - name: accountSid
                    value: <account_sid>
                  - name: authToken
                    value: <auth_token>
                channel:
                  id: 45a095f4-d0ee-4220-a689-22b541c58f67
                chatConfigurations:
                  timeout: 30
                  defaultLanguage: en-US
                  onAgentUnavailability: off_hours
                  orchestration:
                    id: c37e975f-6b2f-490f-9cac-dfa05499f744
                  entryPoint:
                    id: '1001'
    put_account:
      description: Update account
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PutAccountData'
          example:
            name: order_account
            address: '123456789'
            modified: '2021-03-28T14:29:01.516Z'
            channel:
              id: 45a095f4-d0ee-4220-a689-22b541c58f67
            chatConfigurations:
              timeout: 30
              defaultLanguage: en-US
              onAgentUnavailability: off_hours
              orchestration:
                id: c37e975f-6b2f-490f-9cac-dfa05499f744
              entryPoint:
                id: '1001'
    post_send_message:
      description: Send Message
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RequestData'
          examples:
            Customer Start conversation:
              $ref: '#/components/examples/Customer_to_Conversation_Hub'
            Reply from Custom bot:
              $ref: '#/components/examples/Custom_bot_to_Conversation_Hub'
            Escalate conversation from bot to agent:
              $ref: '#/components/examples/bot_escalate_conversation'
            Handoff conversation from agent to bot:
              $ref: '#/components/examples/agent_escalate_conversation'
            Send typing event:
              $ref: '#/components/examples/customer_start_typing'
            Reply from eGain Agent:
              $ref: '#/components/examples/eGain_Agent_to_Conversation_Hub'
            Sending attachments:
              $ref: '#/components/examples/sending_attachments'
            Update Customer info:
              $ref: '#/components/examples/update_customer_info'
            Send Listpicker:
              $ref: '#/components/examples/send_listpicker'
            Send Listpicker With Images:
              $ref: '#/components/examples/send_listpicker_with_images'
            Send Timepicker:
              $ref: '#/components/examples/send_timepicker'
            Send Rich Link:
              $ref: '#/components/examples/send_richlink'
            Send Quick Replies:
              $ref: '#/components/examples/send_quick_reply'
            Send Template:
              $ref: '#/components/examples/send_template'
            Send Template with quick reply buttons:
              $ref: '#/components/examples/send_template_with_quick_reply_buttons'
            Send Template with call to action buttons:
              $ref: '#/components/examples/send_template_with_call_to_action_buttons'
            Request customer to sign in:
              $ref: '#/components/examples/request_customer_to_signin'
            Send iMessage:
              $ref: '#/components/examples/send_app'
            Send Form:
              $ref: '#/components/examples/send_form'
            Send Apple pay request:
              $ref: '#/components/examples/send_payment_request'
            Link Conversation with existing case:
              $ref: '#/components/examples/link_conversation_with_existing_case'
            Send Error:
              $ref: '#/components/examples/send_error'
            Send Delivered Status:
              $ref: '#/components/examples/send_delivered_status'
            Send Read Status:
              $ref: '#/components/examples/send_read_status'
            End conversation:
              $ref: '#/components/examples/end_conversation'
            Survey from customer:
              $ref: '#/components/examples/survey_from_customer'
            Bot Start conversation:
              $ref: '#/components/examples/Custom_bot_start_conversation'
            Escalate To Preferred Agent:
              $ref: >-
                #/components/examples/bot_escalate_conversation_with_preferred_agent
            Agent Available:
              $ref: '#/components/examples/agentAvailable'
            Agent Unavailable:
              $ref: '#/components/examples/agentUnavailable'
            Soft Delete Message sent on in progress conversation:
              $ref: '#/components/examples/softDeleteInProgress'
            Soft delete message sent on completed conversation:
              $ref: '#/components/examples/softDeleteCompleted'
            Permanent Delete Message:
              $ref: '#/components/examples/permanentDelete'
            Undo Soft Delete:
              $ref: '#/components/examples/undoSoftDelete'
            Sending Custom Attributes:
              $ref: '#/components/examples/Send_Custom_attributes'
  parameters:
    id:
      name: id
      in: path
      description: id of object
      required: true
      style: simple
      explode: false
      schema:
        type: string
        minLength: 36
        maxLength: 36
      example: 7b6c5fff-036e-4a40-b68a-a67c592fc079
    parameters-id:
      name: id
      in: path
      description: id of object
      required: true
      style: simple
      explode: false
      schema:
        type: string
        maxLength: 255
      example: '1001'
  callbacks:
    customBotRequestData:
      '{callback url registered for Custom Bot}':
        post:
          description: |
            From Conversation Hub to custom bot.
          requestBody:
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/CallbackRequestData'
                examples:
                  Conversation Hub To CustomBot:
                    value:
                      metadata:
                        attributes:
                          - name: version
                            value: v1
                        messages:
                          message:
                            - id: 262839d2-7cb3-4b38-90cd-5989a56e5d44
                              messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                              type:
                                value: text
                              conversation:
                                id: 7251b0be-7662-4ed8-838d-ac0860106cc3
                              content:
                                text: hi
                                redact: false
                              sender:
                                type: customer
                                participant:
                                  name: John smith
                              recipients:
                                recipient:
                                  - type: custom_bot
                                    participant:
                                      name: custom_bot_participant
                              created: '2021-04-02T19:59:07.654Z'
          responses:
            '202':
              description: Accepted
    agentRequestData:
      '{callback url registered for Agents}':
        post:
          description: |
            From Conversation Hub to eGain Agent.
          requestBody:
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/CallbackRequestData'
                examples:
                  Escalation from custom bot:
                    value:
                      metadata:
                        attributes:
                          - name: version
                            value: v1
                      messages:
                        message:
                          - id: eaaf7fff-3d20-4144-abd0-2ba34a42cc3a
                            messageId: 56713d9c-db83-412a-904d-a414eb5ec1e4
                            conversation:
                              id: e21888f4-779d-4506-84ba-0e68b6583b07
                              account:
                                id: 07eb8acc-cfa5-4b55-a421-c07fddfe3dc8
                                modified: '2022-07-09 20:01:15.521'
                                address: '1000'
                                channel:
                                  type: custom.teams
                                  id: a630387b-c303-414d-8d95-f0d406864292
                                  modified: '2022-07-09 20:01:15.487'
                              conversationContact: phone.mobile
                              lookupContact: phone.mobile
                              entryPoint:
                                id: '1000'
                              customer:
                                name: John smith
                                type: individual
                                attributes:
                                  - name: group
                                    value: eGain
                                contacts:
                                  contact:
                                    - type: phone
                                      subType: mobile
                                      address: '123456788'
                              clientInfo:
                                timeOffset: 30
                                referrerName: DD
                                referrerUrl: http://egain.com
                              messages:
                                message:
                                  - id: 72b2299e-f55b-4e7f-a5a2-18db0bdc5f78
                                    messageId: 859fcf09-8c1e-443a-8d3f-8f6a5373616a
                                    type:
                                      value: text
                                    content:
                                      text: >-
                                        I have a question related to my recent
                                        order.
                                      redact: false
                                    sender:
                                      type: customer
                                    recipients:
                                      recipient:
                                        - type: custom_bot
                                    status: sent
                                    created: '2022-07-09 20:01:24.512'
                                    sent: '2022-07-09 20:01:24.517'
                                  - id: 9afff176-3bce-4cfb-b28e-3639bcc35cd4
                                    messageId: 011a4f9a-3b80-4023-b926-acdb49d24eab
                                    type:
                                      value: text
                                    content:
                                      text: Advisor will be with you shortly.
                                      redact: false
                                    sender:
                                      type: custom_bot
                                      participant:
                                        name: Eva
                                    recipients:
                                      recipient:
                                        - type: customer
                                          participant:
                                            name: John smith
                                    status: sent
                                    created: '2022-07-09 20:01:24.331'
                                    sent: '2022-07-09 20:01:24.449'
                            type:
                              value: escalation.transfer
                            sender:
                              type: custom_bot
                            recipients:
                              recipient:
                                - type: egain_agent
                            created: '2022-07-09 20:01:24.521'
                  Reply from customer:
                    value:
                      metadata:
                        attributes:
                          - name: version
                            value: v1
                      messages:
                        message:
                          - id: 262839d2-7cb3-4b38-90cd-5989a56e5d44
                            messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                            type:
                              value: text
                            conversation:
                              id: 7251b0be-7662-4ed8-838d-ac0860106cc3
                            content:
                              text: hi
                              redact: false
                            sender:
                              type: customer
                              participant:
                                name: John smith
                            recipients:
                              recipient:
                                - type: egain_agent
                            created: '2021-04-02T19:59:07.654Z'
          responses:
            '202':
              description: Accepted
    customerRequestData:
      '{callback url registered for Customer}':
        post:
          description: |
            From Conversation Hub to customer.
          requestBody:
            content:
              application/json:
                schema:
                  $ref: '#/components/schemas/CallbackRequestData'
                examples:
                  Conversation Hub To Customer:
                    value:
                      metadata:
                        attributes:
                          - name: version
                            value: v1
                      messages:
                        message:
                          - id: 262839d2-7cb3-4b38-90cd-5989a56e5d44
                            messageId: 96ea3afb-b462-2ea4-7aed-500020a648f3
                            type:
                              value: text
                            conversation:
                              id: 7251b0be-7662-4ed8-838d-ac0860106cc3
                            content:
                              text: hi
                              redact: false
                            sender:
                              type: egain_agent
                              participant:
                                name: John
                            recipients:
                              recipient:
                                - type: customer
                            attachments:
                              attachment:
                                - id: 862839d2-7cb3-4b38-90cd-5989a56e5d44
                                  name: test.jpg
                                  size: 1234
                                  url: >-
                                    https://messaging.egain.cloud/egain/notify/v3/assets/download?signature=ZXlKMGVYQWlPaUpLVjFRaUxDSmhiR2NpT2lKSVV6STFOaUo5LmV5SmhkV1FpT2lKa05EVmhOVEJqTVRWak5tTTBPRGcyWWpSaU
                            created: '2021-04-02T19:59:07.654Z'
          responses:
            '202':
              description: Accepted
