Get
GET /conversations/:conversation
A Conversation is a series of messages exchanged between a Contact and one or more Users.
Examples
Getting the conversation
Request
GET /conversations/Pvwqm5G
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /conversations/Pvwqm5G
Response
Status
200
Response Type
Example Body
{
"@type": "Conversation",
"id": "/conversations/kY1QwY",
"@context": "/contexts/Conversation.jsonld",
"slug": "kY1QwY",
"currentState": "open",
"account": "/accounts/sanford.llc",
"requestingUserInfo": "/conversations/kY1QwY/user_info",
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"assignedContact": null,
"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"
},
"associatedContacts": {
"@type": "ContactCollection",
"id": "/conversations/kY1QwY/associated_contacts",
"@context": "/contexts/hydra:Collection.jsonld",
"totalItems": 1,
"members": [
{
"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": {
"@type": "hydra:Collection",
"id": "/contacts/DQeeO69/notes",
"@context": "/contexts/hydra:Collection.jsonld",
"totalItems": 0,
"members": []
},
"conversations": "/contacts/DQeeO69/conversations",
"data": {},
"createdAt": "2020-01-06T21:49:58.312Z",
"formattedData": {}
}
]
},
"participants": {
"@type": "hydra:Collection",
"id": "/conversations/kY1QwY/participants",
"@context": "/contexts/hydra:Collection.jsonld",
"totalItems": 1,
"members": [
{
"@type": "User",
"@context": "/contexts/User.jsonld",
"id": "/users/wqyODPA",
"name": "Chuck Norris",
"firstName": "Chuck",
"lastName": "Norris",
"email": "chuck@textus.example",
"avatar": null,
"automatedActor": false,
"hasPassword": false,
"discarded": false,
"settings": {
"customSettings": {}
},
"memberships": "/users/wqyODPA/memberships"
}
]
},
"assignments": "/conversations/kY1QwY/assignments",
"assignContact": "/conversations/kY1QwY/assign_contact",
"reopenConversation": null,
"closeConversation": "/conversations/kY1QwY/close",
"readConversation": "/conversations/kY1QwY/read",
"unreadConversation": "/conversations/kY1QwY/read",
"starConversation": "/conversations/kY1QwY/star",
"unstarConversation": "/conversations/kY1QwY/star",
"blockConversation": "/conversations/Pvwqm5/block",
"unblockConversation": null,
"subscribeConversation": null,
"unanswered": false,
"unsubscribeConversation": "/conversations/Pvwq8zp/subscribe",
"unsubscribed": false,
"timeline": {
"@type": "hydra:Collection",
"id": "/conversations/kY1QwY/timeline",
"@context": "/contexts/hydra:Collection.jsonld",
"latestPosition": "2020-05-21T20:07:20.862Z",
"totalItems": 3,
"members": [
{
"@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"
},
{
"@type": "Message",
"id": "/messages/QNDkpL",
"@context": "/contexts/Message.jsonld",
"direction": "out",
"body": "Chuck Norris doesn't use web standards as the web will conform to him.",
"formattedBody": "<div>Chuck Norris doesn't use web standards as the web will conform to him.</div>",
"displayTimestamp": "2018-07-24T20:59:32.156Z",
"timelinePosition": "2018-07-24T20:59:32.156Z",
"deliveryState": "delivered",
"conversation": "/conversations/kY1QwY",
"sender": "/users/hikvlD",
"attachments": {
"@context": "/contexts/hydra:Collection.jsonld",
"@type": "hydra:Collection",
"id": "/messages/joZqVWd/attachments",
"members": [],
"totalItems": 0
},
"friendlyStateDescription": "Message Delivered",
"retryAllowed": false,
"retry": null,
"latestEventAt": "2018-07-24T20:59:32.156Z",
"flags": [],
"source": "textus"
},
{
"@type": "ConversationEvent",
"id": "/conversation_events/Pvwqm5G",
"@context": "/contexts/ConversationEvent.jsonld",
"type": "open",
"displayTimestamp": "2018-10-30T21:01:43.498Z",
"timelinePosition": "2018-10-30T21:01:43.498Z",
"conversation": "/conversations/Pvwqm5G",
"user": null,
"assignee": null
}
],
"view": {
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"@type": "hydra:PartialCollectionView",
"id": "/conversations/kY1QwY/timeline",
"first": "/conversations/kY1QwY/timeline",
"next": null,
"previous": null
}
},
"blocked": false,
"stats": "/conversations/Pvwqm5G/stats"
}