curl -X GET "https://api.example.com/api/v2/admin/announcements/active" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": [
{
"id": 1,
"tenant_id": "tenant-123",
"title": "System Maintenance Scheduled",
"summary": "We will be performing scheduled maintenance on our servers.",
"content": "Our servers will be undergoing scheduled maintenance on Sunday, December 15th from 2:00 AM to 4:00 AM EST. During this time, you may experience brief service interruptions.",
"type": "warning",
"priority": 1,
"status": "published",
"is_public": false,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"attachment_type": null,
"attachment_url": null,
"attachment_metadata": null,
"created_at": "2024-12-11T09:30:00Z",
"is_read": false,
"is_dismissed": false
},
{
"id": 2,
"tenant_id": "tenant-123",
"title": "New Feature Release",
"summary": "We have released exciting new features!",
"content": "Check out our new dashboard improvements and enhanced reporting capabilities.",
"type": "success",
"priority": 0,
"status": "published",
"is_public": false,
"expires_at": null,
"topic": "FEATURES",
"attachment_type": "link",
"attachment_url": "https://example.com/features",
"attachment_metadata": {
"button_text": "Learn More"
},
"created_at": "2024-12-11T14:30:00Z",
"is_read": true,
"is_dismissed": false
}
]
}
Retrieve all active (published and not expired) announcements for the current tenant with read status
curl -X GET "https://api.example.com/api/v2/admin/announcements/active" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": [
{
"id": 1,
"tenant_id": "tenant-123",
"title": "System Maintenance Scheduled",
"summary": "We will be performing scheduled maintenance on our servers.",
"content": "Our servers will be undergoing scheduled maintenance on Sunday, December 15th from 2:00 AM to 4:00 AM EST. During this time, you may experience brief service interruptions.",
"type": "warning",
"priority": 1,
"status": "published",
"is_public": false,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"attachment_type": null,
"attachment_url": null,
"attachment_metadata": null,
"created_at": "2024-12-11T09:30:00Z",
"is_read": false,
"is_dismissed": false
},
{
"id": 2,
"tenant_id": "tenant-123",
"title": "New Feature Release",
"summary": "We have released exciting new features!",
"content": "Check out our new dashboard improvements and enhanced reporting capabilities.",
"type": "success",
"priority": 0,
"status": "published",
"is_public": false,
"expires_at": null,
"topic": "FEATURES",
"attachment_type": "link",
"attachment_url": "https://example.com/features",
"attachment_metadata": {
"button_text": "Learn More"
},
"created_at": "2024-12-11T14:30:00Z",
"is_read": true,
"is_dismissed": false
}
]
}
Show announcement
info, warning, success, alert0 for normal, 1 for highpublished for active announcements)image, link, buttoncurl -X GET "https://api.example.com/api/v2/admin/announcements/active" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": [
{
"id": 1,
"tenant_id": "tenant-123",
"title": "System Maintenance Scheduled",
"summary": "We will be performing scheduled maintenance on our servers.",
"content": "Our servers will be undergoing scheduled maintenance on Sunday, December 15th from 2:00 AM to 4:00 AM EST. During this time, you may experience brief service interruptions.",
"type": "warning",
"priority": 1,
"status": "published",
"is_public": false,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"attachment_type": null,
"attachment_url": null,
"attachment_metadata": null,
"created_at": "2024-12-11T09:30:00Z",
"is_read": false,
"is_dismissed": false
},
{
"id": 2,
"tenant_id": "tenant-123",
"title": "New Feature Release",
"summary": "We have released exciting new features!",
"content": "Check out our new dashboard improvements and enhanced reporting capabilities.",
"type": "success",
"priority": 0,
"status": "published",
"is_public": false,
"expires_at": null,
"topic": "FEATURES",
"attachment_type": "link",
"attachment_url": "https://example.com/features",
"attachment_metadata": {
"button_text": "Learn More"
},
"created_at": "2024-12-11T14:30:00Z",
"is_read": true,
"is_dismissed": false
}
]
}
publishedis_read and is_dismissed fields are specific to the authenticated user