Retrieve Messages Collection

CUSTOM-IMPORTANT

Apps have limited access to messages! Only the ones sent to the whole network are retrievable.

CUSTOM-ENDPOINT

GET https://api.speakap.io/networks/:eid/messages/

CUSTOM-AUTHORIZATION

Permissions: get_network_timeline, get_group_timelines

CUSTOM-REQUEST

  • URI: /networks/{networkEID}/messages/
  • Method: GET
  • Content-Type: application/vnd.speakap.api-v1.8.2+json+hal
  • Authentication: OAuth 2.0

Parameters

NameTypeDescription
networkEIDEIDNetwork EID

Filters

Besides the Timeline Collection filters, these are also supported:

NameTypeDescription
date_sincedatetimeSince 1.6.7 Excludes all messages older than this date offset
date_untildatetimeSince 1.6.7 Excludes all messages newer than this date offset
eidEIDsReturns only specific messages, see Multi-GET
file_typestringOnly the file type messages of the given type are returns
parentEIDFilters all comments for a specific parent update
qstringFilters all messages in a network matching the specified terms
typestringLimits the collection to messages of a certain message type
statusstringdraft or published: Returns the messages having one of these two statuses

Sorting

NameTypeDescription
createddatetimeSince 1.6.7 Order by the date of creation of a message

Examples

The collection endpoint can be used to search for messages within a certain time frame and matching a query at the same time.

Let's say we're interested in all messages matching two buzzwords:

https://api.speakap.io/networks/1234567890abcdef/messages/abcdef0123456789/?q=Synergy%20AND%20Robust

As you can see the search query supports Apache Lucene's Query syntax!

Suppose we're only interested in last year's messages:

https://api.speakap.io/networks/1234567890abcdef/messages/abcdef0123456789/?q=Synergy%20AND%20Robust&date_since=2017-01-01&date_until=2017-12-31

Depending on permissions the result would be "Messages sent to the entire network in 2017", "Messages sent to groups in 2017" or "Messages sent to both groups and the entire network in 2017".

Response

StatusData
200Returns a collection of Message resources
403Unauthorized: returns an Error object