Converations
GET /:account/conversation_filters/:conversation_filter/conversations{?q}
A Conversation Filter is a set of rules used to match a subset of Conversations, and this endpoint is used to retrieve those matching Conversations. They are normally ordered by most-recent-message within the Conversation, and support pagination
Examples
Getting the conversation filter’s conversations
Request
GET /my_account/conversation_filters/you/conversations
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /my_account/conversation_filters/you/conversations
Response
Status
200
Response Type
Example Body
{
"@type": "ConversationCollection",
"id": "/my_account/conversation_filters/you/conversations",
"@context": "/contexts/ConversationCollection.jsonld",
"totalItems": 1,
"members": [
{
"@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": false,
"readToTimelinePosition": null,
"starred": false,
"assigned": true
},
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"assignedContact": null,
"associatedContacts": "/conversations/JYnJBY/associated_contacts",
"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,
"participants": "/conversations/JYnJBY/participants",
"assignments": "/conversations/kY1QwY/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"
}
],
"view": {
"@type": "hydra:PartialCollectionView",
"id": "/my_account/conversation_filters/you/conversations",
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"first": "/my_account/conversation_filters/you/conversations",
"next": null,
"previous": null
}
}
Searching conversations
Request
GET /my_account/conversation_filters/search/conversations?q=13035551234
Example
$ curl -i -H Accept:"application/vnd.textus+jsonld" \
-H Authorization:"Bearer {token}" \
-X GET /my_account/conversation_filters/search/conversations?q=13035551234
Response
Status
200
Response Type
Example Body
{
"@type": "ConversationCollection",
"id": "/my_account/conversation_filters/search/conversations?q=13035551234",
"@context": "/contexts/ConversationCollection.jsonld",
"totalItems": 1,
"members": [
{
"@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": false,
"readToTimelinePosition": null,
"starred": false,
"assigned": false
},
"phoneNumber": "+13035551234",
"formattedPhoneNumber": "(303) 555-1234",
"assignedContact": null,
"associatedContacts": "/conversations/JYnJBY/associated_contacts",
"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,
"participants": "/conversations/JYnJBY/participants",
"assignments": "/conversations/kY1QwY/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"
}
],
"view": {
"@type": "hydra:PartialCollectionView",
"id": "/my_account/conversation_filters/search/conversations?q=13035551234",
"@context": "/contexts/hydra:PartialCollectionView.jsonld",
"first": "/my_account/conversation_filters/search/conversations?q=13035551234",
"next": null,
"previous": null
}
}