Skip to content

Update Announcement

Update an existing announcement.

Endpoint

INFO

PUT /api/v1/dashboard/announcements/{announcement}

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
announcementintegerAnnouncement ID

Request Body

ParameterTypeRequiredDescription
titlestringNoAnnouncement title
messagestringNoAnnouncement content
typestringNoType: info, warning, promo
statusstringNoStatus: draft, published, archived
ends_atstringNoEnd datetime

Example Request

bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/announcements/1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{
    "ends_at": "2024-02-15T23:59:59Z"
  }'

Response

Success (200)

json
{
  "success": true,
  "message": "Announcement updated",
  "data": {
    "id": 1,
    "title": "New Electric Vehicle Fleet",
    "ends_at": "2024-02-15T23:59:59Z",
    "updated_at": "2024-01-15T00:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Daakey Car Sharing Platform