Mark a channel as read
POST
/v1/communities/{id}/channels/{channelId}/read
const url = 'https://api.gampeon.com/v1/communities/1/channels/1/read';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"messageId":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/communities/1/channels/1/read \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "messageId": 1 }'Up to messageId (default: the newest message). Never moves backwards.
Not available with access tokens.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Community ID
channelId
required
integer
Channel ID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
messageId
integer
Example generated
{ "messageId": 1}Responses
Section titled “Responses”Read state
Media typeapplication/json
object
lastReadId
required
integer
Example generated
{ "lastReadId": 1}Error codes: invalid_field
Media typeapplication/json
object
error
required
Machine-readable error code, for example not_found or rate_limited.
string
message
Human-readable detail. Only present for some errors.
string
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
Media typeapplication/json
object
error
required
Machine-readable error code, for example not_found or rate_limited.
string
message
Human-readable detail. Only present for some errors.
string
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed
Media typeapplication/json
object
error
required
Machine-readable error code, for example not_found or rate_limited.
string
message
Human-readable detail. Only present for some errors.
string
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
Media typeapplication/json
object
error
required
Machine-readable error code, for example not_found or rate_limited.
string
message
Human-readable detail. Only present for some errors.
string
Example generated
{ "error": "example", "message": "example"}