Connector API
Search…
Messages

Get all messages

Get all messages belonging to the specified Message threads. Messages can only be returned for message threads you have created. Note this operation uses the Limitation property to implement a form of data pagination and thus limit the quantity of items returned.

Request

[PlatformAddress]/api/connector/v1/messages/getAll
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"MessageThreadIds": [
6
"c1478ff9-80b7-4ea2-94fc-ae4e009e1463"
7
],
8
"CreatedUtc": {
9
"StartUtc": "2022-03-03T00:00:00Z",
10
"EndUtc": "2022-03-14T00:00:00Z"
11
},
12
"Limitation":{
13
"Cursor": "e7f26210-10e7-462e-9da8-ae8300be8ab7",
14
"Count": 10
15
}
16
}
Copied!
Property
Type
Contract
Description
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
MessageThreadIds
array of string
required, max 1000 items
Unique identifiers of Message threads from where to return messages.
CreatedUtc
optional, max length 1 months
Interval in which the Message was created.
Limitation
required
Limitation on the quantity of message data returned (using cursor pagination).

Response

1
{
2
"Messages": [
3
{
4
"Id": "4bfe4675-98a9-4428-9ea9-ae5300dbaa93",
5
"MessageThreadId": "8d02142f-31cf-4115-90bf-ae5200c7a1ba",
6
"Text": "Text of the message",
7
"Sender": {
8
"Discriminator": "Application"
9
},
10
"CreatedUtc": "2022-03-09T13:19:46Z"
11
}
12
],
13
"Cursor": "8d02142f-31cf-4115-90bf-ae5200c7a1ba"
14
}
Copied!
Property
Type
Contract
Description
Messages
array of Messages
required
The filtered messages.
Cursor
string
optional
Unique identifier of the last and hence oldest message returned. This can be used in Limitation in a subsequent request to fetch the next batch of older messages.

Message

Property
Type
Contract
Description
Id
string
required
Unique identifier of the message.
MessageThreadId
string
required
Unique identifier of the Message thread which the message belongs to.
Text
string
required
Text of the message.
Sender
Sender
required
The sender of the message.
CreatedUtc
string
required
Creation date and time of the message in UTC timezone in ISO 8601 format.

Sender

Property
Type
Contract
Description
Discriminator
required
The source of the message, either the enterprise or the client application.

Sender discriminator

  • Enterprise - the message was created by an employee of the enterprise
  • Application - the message was created by the third party application

Add messages

Add the specified messages to the specified Message threads. You can only add messages to message threads that you have created.

Request

[PlatformAddress]/api/connector/v1/messages/add
1
{
2
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
3
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
4
"Client": "Sample Client 1.0.0",
5
"Messages": [
6
{
7
"Text": "Text of the message",
8
"MessageThreadId": "8d02142f-31cf-4115-90bf-ae5200c7a1ba",
9
"Identifier": "Message 1"
10
}
11
]
12
}
Copied!
Property
Type
Contract
Description
ClientToken
string
required
Token identifying the client application.
AccessToken
string
required
Access token of the client application.
Client
string
required
Name and version of the client application.
Messages
array of Message parameters
required
Messages to be added.

Message parameters

Property
Type
Contract
Description
Text
string
required
Text of the message.
ThreadId
string
required
Unique identifier of the Message thread to which the message should be added.
Identifier
string
optional
Identifier of the message to be created.

Response

1
{
2
"Messages": [
3
{
4
"Identifier": "Message 1",
5
"Message": {
6
"Id": "4bfe4675-98a9-4428-9ea9-ae5300dbaa93",
7
"ThreadId": "8d02142f-31cf-4115-90bf-ae5200c7a1ba",
8
"Text": "Text of the message",
9
"Sender": {
10
"Discriminator": "Application"
11
},
12
"CreatedUtc": "2022-03-09T13:19:46Z"
13
}
14
}
15
]
16
}
Copied!
Property
Type
Contract
Description
Messages
array of Added messages
required
Collection of created messages.

Added Message

Property
Type
Contract
Description
Identifier
string
optional
Identifier of the created message.
Message
string
Message
Message that was added to the Message thread.