put
https://{host}/notifications/
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 to1to mark as read, or0to 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-tokenheader is set with a valid token. -
Only notifications belonging to the authenticated user can be updated.
-
The
readquery parameter must be either0or1.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
