Read
PUT /conversations/:conversation/read
A Conversation can be marked as read for a user without doing so for other users.
Examples
Marking the conversation read immediately
Request
PUT /conversations/Pvwqm5G/read
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X PUT /conversations/Pvwqm5G/read
Response
Status
200
Response Type
Example Body
{
"@type": "Conversation",
"id": "/conversations/JYnJBY",
"@context": "/contexts/Conversation.jsonld",
"slug": "JYnJBY",
"currentState": "closed",
"account": "/accounts/marks_llc",
"requestingUserInfo": {
"@type": "ConversationUserInfo",
"id": "/conversations/JYnJBY/user_info",
"@context": "/contexts/ConversationUserInfo.jsonld",
"read": true,
"readToTimelinePosition": "2018-07-01T01:02:03.000Z",
"starred": false,
"assigned": false
},
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"assignedContact": null,
"associatedContacts": "/conversations/JYnJBY/associated_contacts",
"participants": "/conversations/JYnJBY/participants",
"assignments": "/conversations/JYnJBY/assignments",
"reopenConversation": null,
"closeConversation": "/conversations/JYnJBY/close",
"readConversation": "/conversations/JYnJBY/read",
"unreadConversation": "/conversations/JYnJBY/read",
"starConversation": "/conversations/JYnJBY/star",
"unstarConversation": "/conversations/JYnJBY/star",
"blockConversation": "/conversations/Pvwqm5/block",
"unblockConversation": null,
"subscribeConversation": null,
"unsubscribeConversation": "/conversations/Pvwq8zp/subscribe",
"timeline": "/conversations/JYnJBY/timeline",
"unanswered": false,
"unsubscribed": false,
"blocked": false,
"stats": "/conversations/Pvwqm5G/stats",
"assignContact": "/conversations/Pvwqm5G/assign_contact",
"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"
}
}
Marking the conversation read with a position
Request
PUT /conversations/Pvwqm5G/read
Body
{ "ts": "2018-07-01T01:02:03.000Z" }
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X PUT /conversations/Pvwqm5G/read
-d '{ "ts": "2018-07-01T01:02:03.000Z" }'
Response
Status
200
Response Type
Example Body
{
"@type": "Conversation",
"id": "/conversations/JYnJBY",
"@context": "/contexts/Conversation.jsonld",
"slug": "JYnJBY",
"currentState": "closed",
"account": "/accounts/marks_llc",
"requestingUserInfo": {
"@type": "ConversationUserInfo",
"id": "/conversations/JYnJBY/user_info",
"@context": "/contexts/ConversationUserInfo.jsonld",
"read": true,
"readToTimelinePosition": "2018-07-01T01:02:03.000Z",
"starred": false,
"assigned": false
},
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"assignedContact": null,
"associatedContacts": "/conversations/JYnJBY/associated_contacts",
"participants": "/conversations/JYnJBY/participants",
"assignments": "/conversations/JYnJBY/assignments",
"reopenConversation": null,
"closeConversation": "/conversations/JYnJBY/close",
"readConversation": "/conversations/JYnJBY/read",
"unreadConversation": "/conversations/JYnJBY/read",
"starConversation": "/conversations/JYnJBY/star",
"unstarConversation": "/conversations/JYnJBY/star",
"blockConversation": "/conversations/Pvwqm5/block",
"unblockConversation": null,
"subscribeConversation": null,
"unsubscribeConversation": "/conversations/Pvwq8zp/subscribe",
"timeline": "/conversations/JYnJBY/timeline",
"unanswered": false,
"unsubscribed": false,
"blocked": false,
"stats": "/conversations/Pvwqm5G/stats",
"assignContact": "/conversations/Pvwqm5G/assign_contact",
"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"
}
}