Skip to main content
POST
/
api
/
v2
/
admin
/
announcements
/
{id}
/
dismiss
curl -X POST "https://api.example.com/api/v2/admin/announcements/1/dismiss" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Tenant-ID: your-tenant-id"
const response = await fetch('/api/v2/admin/announcements/1/dismiss', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Tenant-ID': 'your-tenant-id'
  }
});

const data = await response.json();
{
  "success": true,
  "message": "Announcement dismissed"
}
{
  "success": false,
  "message": "Announcement not found"
}

Headers

Authorization
string
required
Bearer token for authentication
X-Tenant-ID
string
required
The tenant ID to scope the announcement

Path Parameters

id
integer
required
The unique identifier of the announcement to dismiss

Response

success
boolean
Indicates if the request was successful
message
string
Success message
curl -X POST "https://api.example.com/api/v2/admin/announcements/1/dismiss" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "X-Tenant-ID: your-tenant-id"
const response = await fetch('/api/v2/admin/announcements/1/dismiss', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'X-Tenant-ID': 'your-tenant-id'
  }
});

const data = await response.json();
{
  "success": true,
  "message": "Announcement dismissed"
}
{
  "success": false,
  "message": "Announcement not found"
}

Notes

  • This endpoint creates or updates an announcement_reads record for the current user
  • Sets the dismissed flag to true and dismissed_at timestamp to the current time
  • Dismissed announcements will not appear in the /active endpoint results
  • If the announcement is already dismissed, the operation is idempotent
  • Only announcements belonging to the specified tenant can be dismissed
  • Dismissing an announcement also automatically marks it as read