List Announcements
Retrieve a paginated list of announcements.
Endpoint
INFO
GET /api/v1/dashboard/announcements
Headers
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
type | string | - | Filter: info, warning, promo |
status | string | - | Filter: draft, published, archived |
page | integer | 1 | Page number |
per_page | integer | 15 | Items per page |
Example Request
bash
curl -X GET "https://api.daakey.com/api/v1/dashboard/announcements?status=published" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}"Response
Success (200)
json
{
"success": true,
"message": "Announcements retrieved",
"data": [
{
"id": 1,
"title": "New Electric Vehicle Fleet",
"message": "Check out our new Tesla Model 3 vehicles!",
"type": "info",
"status": "published",
"target": "all",
"views_count": 1250,
"starts_at": "2024-01-01T00:00:00Z",
"ends_at": "2024-01-31T23:59:59Z",
"created_at": "2024-01-01T00:00:00Z"
}
],
"meta": {
"current_page": 1,
"last_page": 1,
"per_page": 15,
"total": 1
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}