curl -X GET "https://api.example.com/api/v2/admin/announcements?page=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": {
"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_push_enabled": true,
"is_public": false,
"scheduled_at": null,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"push_status": "success",
"sent_at": "2024-12-11T10:00:00Z",
"attachment_type": null,
"attachment_url": null,
"created_by": 1,
"creator": {
"id": 1,
"name": "Admin User",
"email": "[email protected]"
},
"created_at": "2024-12-11T09:30:00Z",
"updated_at": "2024-12-11T10:00:00Z"
}
],
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Retrieve all announcements for the current tenant with pagination support
curl -X GET "https://api.example.com/api/v2/admin/announcements?page=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": {
"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_push_enabled": true,
"is_public": false,
"scheduled_at": null,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"push_status": "success",
"sent_at": "2024-12-11T10:00:00Z",
"attachment_type": null,
"attachment_url": null,
"created_by": 1,
"creator": {
"id": 1,
"name": "Admin User",
"email": "[email protected]"
},
"created_at": "2024-12-11T09:30:00Z",
"updated_at": "2024-12-11T10:00:00Z"
}
],
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}
Show data
Show announcement
info, warning, success, alert0 for normal, 1 for highdraft, scheduled, published, archivedpending, success, failedimage, link, buttoncurl -X GET "https://api.example.com/api/v2/admin/announcements?page=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "X-Tenant-ID: your-tenant-id"
{
"success": true,
"data": {
"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_push_enabled": true,
"is_public": false,
"scheduled_at": null,
"expires_at": "2024-12-16T00:00:00Z",
"topic": "SYSTEM",
"push_status": "success",
"sent_at": "2024-12-11T10:00:00Z",
"attachment_type": null,
"attachment_url": null,
"created_by": 1,
"creator": {
"id": 1,
"name": "Admin User",
"email": "[email protected]"
},
"created_at": "2024-12-11T09:30:00Z",
"updated_at": "2024-12-11T10:00:00Z"
}
],
"current_page": 1,
"last_page": 1,
"per_page": 20,
"total": 1
}
}