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 Pagination and supports Portfolio Access Tokens.
Request
[PlatformAddress]/api/connector/v1/messages/getAll
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"MessageThreadIds": [
"7f9325f6-ef44-4911-89a8-ae51010a5aa4",
"8d02142f-31cf-4115-90bf-ae5200c7a1ba"
],
"CreatedUtc": {
"StartUtc": "2022-03-03T00:00:00Z",
"EndUtc": "2022-03-14T00:00:00Z"
},
"EnterpriseIds": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"4d0201db-36f5-428b-8d11-4f0a65e960cc"
],
"Limitation": {
"Count": 100
}
}
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.
EnterpriseIds
array of string
optional, max 1000 items
Unique identifiers of the Enterprises. If not specified, the operation returns data for all enterprises within scope of the Access Token.
MessageThreadIds
array of string
required, max 1000 items
Unique identifiers of MessageThread
s from where to return messages.
Limitation
required
Limitation on the quantity of data returned and optional Cursor for the starting point of data.
Response
{
"Messages": [
{
"Id": "4bfe4675-98a9-4428-9ea9-ae5300dbaa93",
"MessageThreadId": "7f9325f6-ef44-4911-89a8-ae51010a5aa4",
"Text": "Text of the message",
"Sender": {
"Discriminator": "Application",
"Value": null
},
"CreatedUtc": "2022-03-09T13:19:46Z"
}
],
"Cursor": "7f9325f6-ef44-4911-89a8-ae51010a5aa4"
}
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
Id
string
required
Unique identifier of the message.
MessageThreadId
string
required
Unique identifier of the MessageThread
to which the message belongs to.
Text
string
required
Text of the message.
CreatedUtc
string
required
Creation date and time of the message in UTC timezone in ISO 8601 format.
Sender
Value
any
optional
Additional information about the sender. Currently not used and always null
.
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
{
"ClientToken": "E0D439EE522F44368DC78E1BFB03710C-D24FB11DBE31D4621C4817E028D9E1D",
"AccessToken": "C66EF7B239D24632943D115EDE9CB810-EA00F8FD8294692C940F6B5A8F9453D",
"Client": "Sample Client 1.0.0",
"Messages": [
{
"MessageThreadId": "7f9325f6-ef44-4911-89a8-ae51010a5aa4",
"Text": "Text of the message",
"Identifier": "Message 1"
}
]
}
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.
Message parameters
MessageThreadId
string
required
Unique identifier of the MessageThread
to which the message should be added.
Text
string
required
Text of the message.
Identifier
string
optional
Identifier of the message to be created.
Response
{
"Messages": [
{
"Identifier": "Message 1",
"Message": {
"Id": "4bfe4675-98a9-4428-9ea9-ae5300dbaa93",
"MessageThreadId": "7f9325f6-ef44-4911-89a8-ae51010a5aa4",
"Text": "Text of the message",
"Sender": {
"Discriminator": "Application",
"Value": null
},
"CreatedUtc": "2022-03-09T13:19:46Z"
}
}
]
}
Added message
Identifier
string
optional
Identifier of the created message.
Last updated
Was this helpful?