Get
/api/v1/subscriptions.get
Get the room notification subscription details and the latest updates. Note that the unread counter value depends on your settings in the Manage > Workspace > General section.
Changelog
| Version | Description |
|---|---|
| 8.8.0 | Added the threadDrafts field |
| 0.60.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
updatedSince
string
Date and time from which to fetch changes. Format: ISO 8601 datetime. Optional seconds, optional milliseconds, optional timezone, always with colon time separators.
Example2017-11-25T15:08:17.248Z
Responses
200
OK
Success Example
{
"update": [
{
"t": "c",
"ts": "2017-11-25T15:08:17.249Z",
"name": "general",
"fname": null,
"rid": "GENERAL",
"u": {
"_id": "EoyAmF4mxx5HxJHJB",
"username": "rocket.cat",
"name": "Rocket Cat"
},
"open": true,
"alert": true,
"unread": 1,
"userMentions": 1,
"groupMentions": 0,
"_updatedAt": "2017-11-25T15:08:17.249Z",
"_id": "5ALsG3QhpJfdMpyc8"
}
],
"remove": [],
"success": true
}object
update
Array of object (Subscription)
object
_id
string
open
boolean
alert
boolean
unread
integer
userMentions
integer
groupMentions
integer
ts
string
rid
string
name
string
fname
string | null
t
string
u
object
_id
string
username
string
name
string
_updatedAt
string
ls
string
E2EKey
string
draft
string
The unfinished message draft for the room.
threadDrafts
object
The unfinished thread reply drafts, keyed by the ID of each thread's main message.
property*
string additionalProperties
remove
Array of object
object
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string