Skip to content

Conversation Manager APIs

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.

Download OpenAPI description
Languages
Servers
Production Server
https://api.egain.cloud/conversation/conversationmgr/v3

Authentication

Use this API to register client callback Authentication methods using oAuth or Basic Authentication.

Operations

Client Application

Use this API to register external client applications where we send and receive messages.

Operations

Participant

Use this API to register Bots. You can register multiple Bots for each client application.

Operations

Channel

Use this API to register and define channel parameters which is used for chat messages.

Operations

Orchestration

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

Operations

Account

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

Operations

Conversation

Use this API to send messages through the Conversation Manager.

Operations

Assets

Use this API to upload/download Assets like attachments.

Operations

Create Asset

Request

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

Security
oAuthClient(Required scopes:
https://api.egain.cloud/auth/.de...
)
Bodyapplication/jsonrequired
channelobjectrequired
channel.​typestring[ 1 .. 255 ] charactersrequired

Channel type.

senderobjectrequired

recipient client application type

sender.​typestringrequired

type of recipient client application

Enum"custom_bot""customer""egain_agent""egain_bot""custom_agent"
Example: "customer"
namestring[ 1 .. 255 ] charactersrequired

Name of an asset with an extension.

sizeinteger[ 1 .. 10485760 ]required
curl -i -X POST \
  https://api.egain.cloud/conversation/conversationmgr/v3/assets \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "channel": {
      "type": "sms"
    },
    "sender": {
      "type": "customer"
    },
    "name": "bird.jpg",
    "size": 17245
  }'

Responses

OK

Bodyapplication/json
idstring= 36 characters

Unique id generated for asset.

contentUrlExpirystring(date-time)

Signed URL expiry time in GMT

Example: "2020-08-11T03:19:21.070Z"
contentUrlstring

URL to upload or download the content

Response
application/json
{ "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" }

Get Asset

Request

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

Security
oAuthClient(Required scopes:
https://api.egain.cloud/auth/.de...
)
Path
idstring<= 255 charactersrequired

id of object

Example: 1001
curl -i -X GET \
  https://api.egain.cloud/conversation/conversationmgr/v3/assets/1001 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
idstring= 36 characters

Unique id generated for asset.

namestring[ 1 .. 255 ] characters

name of asset with extension.

sizeinteger<= 2147483648
contentTypestring
contentUrlExpirystring(date-time)

Signed URL expiry time in GMT

Example: "2020-08-11T03:19:21.070Z"
contentUrlstring

URL to upload or download the content

Response
application/json
{ "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" }

Delete Asset

Request

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.

Security
oAuthClient(Required scopes:
https://api.egain.cloud/auth/.de...
)
Path
idstring<= 255 charactersrequired

id of object

Example: 1001
curl -i -X DELETE \
  https://api.egain.cloud/conversation/conversationmgr/v3/assets/1001 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

No Content

Response
No content