curl -X POST "https://api.example.com/api/v2/admin/announcements/1/read" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
const response = await fetch('/api/v2/admin/announcements/1/read', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'X-Tenant-ID': 'your-tenant-id'
}
});
const data = await response.json();
{
"success": true,
"message": "Announcement marked as read"
}
{
"success": false,
"message": "Announcement not found"
}
Announcements
Mark Announcement as Read
Mark a specific announcement as read by the current user
POST
/
api
/
v2
/
admin
/
announcements
/
{id}
/
read
curl -X POST "https://api.example.com/api/v2/admin/announcements/1/read" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
const response = await fetch('/api/v2/admin/announcements/1/read', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'X-Tenant-ID': 'your-tenant-id'
}
});
const data = await response.json();
{
"success": true,
"message": "Announcement marked as read"
}
{
"success": false,
"message": "Announcement not found"
}
Headers
Path Parameters
Response
curl -X POST "https://api.example.com/api/v2/admin/announcements/1/read" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
const response = await fetch('/api/v2/admin/announcements/1/read', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TOKEN',
'X-Tenant-ID': 'your-tenant-id'
}
});
const data = await response.json();
{
"success": true,
"message": "Announcement marked as read"
}
{
"success": false,
"message": "Announcement not found"
}
Notes
- This endpoint creates or updates an
announcement_readsrecord for the current user - If the announcement is already marked as read, the operation is idempotent
- The
read_attimestamp is set to the current time - Only announcements belonging to the specified tenant can be marked as read