Post Read Notification

Mark Notification as Read/Unread

This endpoint updates the read status of a specific notification for the authenticated user. It is typically used to mark a notification as read or unread in the user's notification center.


HTTP Method and URL

PUT {{host}}/notifications/:notification_id?read=0


Authentication Requirements

Requires a valid user authentication token (user-token) to be included in the request headers.


Path and Query Parameters

  • Path Parameter:

    • notification_id (string, required): The unique identifier of the notification to update.
  • Query Parameter:

    • read (integer, required): Set to 1 to mark as read, or 0 to mark as unread.

Example Request

PUT {{host}}/notifications/12345?read=1
Headers:
  user-token: <your_token>

Example Successful Response

{
  "success": true,
  "message": "Notification status updated successfully."
}

Error Responses

  • 401 Unauthorized:

    • Missing or invalid authentication token.
  • 404 Not Found:

    • Notification with the specified ID does not exist.
  • 400 Bad Request:

    • Invalid or missing parameters.

Usage Notes

  • Ensure the user-token header is set with a valid token.

  • Only notifications belonging to the authenticated user can be updated.

  • The read query parameter must be either 0 or 1.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
integer

0 | 1

Body Params
Response

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!