Read messages after the caller's last read, or after a message ID
GET
/api/v1/messages
const url = 'https://deck.example.com/api/v1/messages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://deck.example.com/api/v1/messages \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”source
string
after
A message ID: read after it without moving the session’s mark. Left out: after the session’s last read.
integer format: int64
A message ID: read after it without moving the session’s mark. Left out: after the session’s last read.
limit
integer format: uint32
Responses
Section titled “Responses”quietdeck messages: messages after the caller’s last read (new), or after a message ID.
Media typeapplication/json
quietdeck messages: messages after the caller’s last read (new), or after a message ID.
object
messages
required
Array<object>
A message the deck keeps.
object
body
required
string
channel
required
string
channel_name
required
string
external_id
required
string
id
required
integer format: int64
node
required
The node that read it.
string
received_at
required
string
sender
required
string
sent_at
required
string
source
required
string
more
required
More messages wait after these: ask again.
boolean
Example generated
{ "messages": [ { "body": "example", "channel": "example", "channel_name": "example", "external_id": "example", "id": 1, "node": "example", "received_at": "example", "sender": "example", "sent_at": "example", "source": "example" } ], "more": true}default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}