Mark the conversation as read
const url = 'https://chat.work.optidata.cloud/api/chats/36/messages/view';const options = {method: 'POST', 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 POST \ --url https://chat.work.optidata.cloud/api/chats/36/messages/view \ --header 'Authorization: Bearer <token>'Moves the caller’s read marker to the latest message, which clears the conversation’s unread count and any pending mention badge.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the conversation.
Responses
Section titled “ Responses ”The read marker was moved.
Minimal acknowledgement returned by several write operations.
object
Example
{ "success": true}Missing, malformed or expired authentication key.
Authentication failures — and a few permission denials — use an error
key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not a participant of the conversation, or lacks the role the operation requires.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given conversation.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}