Skip to API content
TalkLabs API Docs v3
Recipes
PUT Users & notifications

Set Notification Read Status (by ChatEventId)

Unless your workflow must support use of read notifications, use DELETE USER NOTIFICATION by Chat Event Id instead.

PUT /api/v3/{appid}/user/users/{userid}/notification/notificationsbyid/chateventid/{chateventid}/update

Unless your workflow must support use of read notifications, use DELETE USER NOTIFICATION by Chat Event Id instead.

  • This marks a notification as being in READ status.
  • That will prevent the notification from being returned in a call to List User Notifications unless the default filters are overridden.
  • Notifications that are marked as read will be automatically deleted after some time.
  • Only call this once per event. Only call this for events of type ChatReply or ChatQuote.

URL Arguments

  • userid : (required) The ID of the user marking the notification as read. This is used to ensure a user can't mark another user's notification as read.
  • chateventid : (required) The unique ID of the chateventid to use to locate the notification being updated.
  • read : (required) The read status (true/false) for the notification. You can pass false to mark the notification as unread.
Request

Parameters

Values in the path and query string.

appid path
string TalkLabs ID required

The application the user belongs to.

Example: your-app-id
userid path
string customer-defined required

Required. The user marking the notification used to ensure a user can't mark another user's notification.

Example: u-8842
chateventid path
string TalkLabs ID required

Required. The chat event ID used to locate the notification being updated.

read query
boolean

Required. The read status true/false to set. Pass false to mark the notification unread again.

Example: true
Response

Status codes

Every JSON response uses the API result envelope.

200 OK: success data is the updated UserNotification. ApiResult
400 BadRequest: chateventid or read was not provided. ApiResult
403 Forbidden: request is not authorized with a valid token, or the token does not match this appid. ApiResult
500 Internal Server Error ApiResult
Example response · 200
{
  "message": "updated",
  "errors": {},
  "data": {
    "kind": "notification",
    "id": "602456955617e108441660dc",
    "added": "2021-02-10T21:56:37.2243706Z",
    "userid": "bobsmith2",
    "ts": 637485909972243700,
    "whenread": "2021-02-10T21:58:01.9942603Z",
    "isread": true,
    "notificationtype": "chatquote",
    "chatroomid": "600d78d45617e20e34c39dd5",
    "chatroomcustomid": "new-york-city-club",
    "commentconversationid": "",
    "commentconversationcustomid": "",
    "chateventid": "602456955617e108441660db",
    "commentid": ""
  }
}
Search all 118 endpoints Try “join room”, “moderate”, or “POST”.
Request environment

Connect your application

These values fill request examples and the API console. They stay in this browser tab and are never sent to TalkLabs until you run a request.

Credentials are stored in sessionStorage, not in cookies or analytics.