Replace {subdomain}
in the endpoints below with your Vitally subdomain.
You can find your subdomain in the URL used to log into Vitally (i.e., https://yoursubdomain .vitally.io
The Conversation object
List Conversations GET
Paginated list of Conversations, ordered by updatedAt
.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/conversations
EU Data Center:
Copy https://rest.vitally-eu.io/resources/conversations
Paginated list of Conversations for a single Account, ordered by updatedAt
.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/accounts/:accountId/conversations
EU Data Center:
Copy https://rest.vitally-eu.io/resources/accounts/:accountId/conversations
Paginated list of Conversations for a single Organization, ordered by updatedAt
.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/organizations/:organizationId/conversations
EU Data Center:
Copy https://rest.vitally-eu.io/resources/organizations/:organizationId/conversations
Note: The above Conversations GET requests do not include Messages. Messages for a Conversation are retrieved separately.
Params (see Pagination )
Example Request
Copy GET https://{subdomain}.rest.vitally.io/resources/conversations?limit=10&from=cursor
Example Response
Copy {
"results" : [
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
"externalId" : "11" ,
"externalUrl" : "https://externalsystem.com/11" ,
"subject" : "Subject" ,
"traits" : {
"expansionOpportunity" : true ,
}
}
] ,
"next" : "c29tZWJhc2U2NA=="
}
Create A Conversation POST
Create a new conversation with associated Messages.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/conversations
EU Data Center:
Copy https://rest.vitally-eu.io/resources/conversations
Request Body
Example
Copy POST https: //{subdomain}.rest.vitally.io/resources/conversations
{
"externalId" : "thread-100" ,
"subject" : "Regarding your account" ,
"messages" : [{
"externalId" : "message-101" ,
"message" : "<p>Just checking in.</p>"
"from" : { "type" : "admin" , "id" : "xxxx-xxxxx-xxxxxxxx-xxxxxxxx" } ,
"to" : [
{ "type" : "user" , "id" : "xxxx-xxxxx-xxxxxxxx-xxxxxxxx" }
]
}] ,
"traits" : {
"dealArr" : 100000
}
}
Update A Conversation PUT
Update an existing conversation with associated Messages. New messages can be inserted and existing ones will be updated by externalId
.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/conversations/:id
EU Data Center:
Copy https://rest.vitally-eu.io/resources/conversations/:id
Request Body
Example
Copy PUT https: //{subdomain}.rest.vitally.io/resources/conversations/:id
{
"subject" : "Thanks for the heads up!" ,
"messages" : [{
"externalId" : "message-102" ,
"message" : "<p>Thanks for the heads up!</p>"
"from" : { "type" : "user" , "id" : "xxxx-xxxxx-xxxxxxxx-xxxxxxxx" } ,
"to" : [
{ "type" : "admin" , "id" : "xxxx-xxxxx-xxxxxxxx-xxxxxxxx" }
]
}] ,
"traits" : {
"dealArr" : 100000
}
}
Get A Conversation GET
Retrieves a Conversation including all Messages.
US Data Center (default):
Copy https://{subdomain}.rest.vitally.io/resources/conversations/:id
EU Data Center:
Copy https://rest.vitally-eu.io/resources/conversations/:id
Example Request
Copy GET https://{subdomain}.rest.vitally.io/resources/conversations/:id
Example Response
Copy {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
"externalId" : "11" ,
"externalUrl" : "https://external.com/11" ,
"subject" : "Subject" ,
"messages" : [
{
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
"type" : "outbound" ,
"externalId" : "12345" ,
"conversationId" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ,
"message" : "<p>Hello there</p>" ,
"timestamp" : "2020-12-04T18:37:55.000Z" ,
"from" : {
"type" : "admin" ,
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
} ,
"to" : [
{
"type" : "user" ,
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
] ,
"cc" : [] ,
"bcc" : []
}
] ,
"traits" : {
"outreachCampaignId" : "abc123"
}
}
Last updated 2 months ago