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

Delete User Notification (By ChatEventId)

Immediately deletes a user notification.

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

Immediately deletes a user notification. Unless your workflow specifically implements access to read notifications, you should delete notifications after they are consumed.

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 to be deleted.
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 the notification belongs to used to ensure a user can't delete another user's notification.

Example: u-8842
chateventid path
string TalkLabs ID required

Required. The chat event ID used to locate the notification to delete.

Response

Status codes

Every JSON response uses the API result envelope.

200 OK: success data is the deleted UserNotification, or absent if there was nothing to delete. ApiResult
400 BadRequest: chateventid 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": "deleted",
  "errors": {},
  "data": {
    "kind": "notification",
    "id": "602457645617e108441660e8",
    "added": "2021-02-10T22:00:04.3587267Z",
    "userid": "bobsmith2",
    "ts": 637485912043587300,
    "whenread": null,
    "isread": false,
    "notificationtype": "chatquote",
    "chatroomid": "600d78d45617e20e34c39dd5",
    "chatroomcustomid": "new-york-city-club",
    "commentconversationid": "",
    "commentconversationcustomid": "",
    "chateventid": "602457645617e108441660e7",
    "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.