Conversations
GET /contacts/:contact/conversations
A single Contact may have had Conversations with different Users across your Accounts.
Examples
Get Conversations
Request
GET /contacts/DQeeO69/conversations
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /contacts/DQeeO69/conversations
Response
Status
200
Response Type
Example Body
{
"@type": "ConversationCollection",
"@context": "/contexts/ConversationCollection.jsonld",
"id": "/contacts/DQeeO69/conversations",
"members": [
{
"@type": "ConversationWithAccount",
"@context": "/contexts/ConversationWithAccount.jsonld",
"id": "/conversations/Pvwqm5G",
"phoneNumber": "+13035555678",
"formattedPhoneNumber": "(303) 555-5678",
"slug": "Pvwqm5G",
"currentState": "open",
"unanswered": false,
"unsubscribed": false,
"blocked": false,
"account": {
"@type": "Account",
"@context": "/contexts/Account.jsonld",
"id": "/accounts/my_account",
"name": "Example Account"
},
"latestPreviewableItem": {
"@type": "Message",
"id": "/messages/06oyogE",
"@context": "/contexts/Message.jsonld",
"direction": "in",
"body": "He once made a weeping willow laugh",
"formattedBody": "<div>He once made a weeping willow laugh</div>",
"deliveryState": "received",
"displayTimestamp": "2018-07-24T20:59:32.156Z",
"timelinePosition": "2018-07-24T20:59:32.156Z",
"conversation": "/conversations/JYnJBY",
"sender": null,
"attachments": {
"@context": "/contexts/hydra:Collection.jsonld",
"@type": "hydra:Collection",
"id": "/messages/joZqVWd/attachments",
"members": [],
"totalItems": 0
},
"friendlyStateDescription": "Inbound Message Received",
"retryAllowed": false,
"retry": null,
"latestEventAt": "2018-07-24T20:59:32.156Z",
"flags": [],
"source": "textus"
},
"nextScheduledMessage": null,
"requestingUserInfo": {
"@type": "ConversationUserInfo",
"@context": "/contexts/ConversationUserInfo.jsonld",
"id": "/conversations/Pvwqm5G/user_info",
"read": false,
"readToTimelinePosition": null,
"starred": false,
"assigned": true
},
"participants": "/conversations/Pvwqm5G/participants",
"assignedContact": {
"id": "/contacts/Vled2N",
"@type": "Contact",
"@context": "/contexts/Contact.jsonld",
"name": "Jamel Hirthe",
"firstName": "Jamel",
"lastName": "Hirthe",
"phones": {
"id": "/contacts/Vled2N/phones",
"@type": "hydra:Collection",
"@context": "/contexts/hydra:Collection.jsonld",
"totalItems": 1,
"members": [
{
"@type": "ContactPhone",
"id": "/contact_phones/mxvbRw",
"@context": "/contexts/ContactPhone.jsonld",
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"extension": null,
"type": "Mobile",
"deliverabilityStatus": "unknown",
"contact": "/contacts/DQeeO69"
}
]
},
"notes": "/contacts/DQeeO69/notes",
"conversations": "/contacts/DQeeO69/conversations",
"data": {},
"createdAt": "2020-01-06T21:49:58.312Z",
"formattedData": {}
},
"associatedContacts": "/conversations/Pvwqm5G/associated_contacts",
"readConversation": "/conversations/Pvwqm5G/read",
"unreadConversation": "/conversations/Pvwqm5G/read",
"starConversation": "/conversations/Pvwqm5G/star",
"unstarConversation": "/conversations/Pvwqm5G/star",
"reopenConversation": null,
"closeConversation": "/conversations/Pvwqm5G/close",
"blockConversation": "/conversations/Pvwqm5G/block",
"unblockConversation": null,
"subscribeConversation": null,
"unsubscribeConversation": "/conversations/Pvwqm5G/subscribe",
"timeline": "/conversations/Pvwqm5G/timeline",
"stats": "/conversations/Pvwqm5G/stats",
"assignments": "/conversations/JYnJBY/assignments",
"assignContact": "/conversations/Pvwqm5G/assign_contact"
}
],
"totalItems": 1,
"view": {
"@type": "hydra:PartialCollectionView",
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"id": "/contacts/DQeeO69/conversations",
"first": "/contacts/DQeeO69/conversations",
"next": null,
"previous": null
}
}