Ramadan Last 10 Nights Campaign

Used by thousands of students worldwide - help us reach 150 members

... / 150 members...
APIAnnouncements

Announcements

/announcements

Site-wide announcements published by the Sharh team. Clients can fetch the single currently active announcement; creating and managing announcements is restricted to administrators and is not part of the public API.

GET/announcements/active

Get the currently active announcement

Auth optional

Returns the most recently created announcement that is marked active, or `{ "announcement": null }` when there is none. A Bearer token is accepted but does not change the response. When the announcement has an image, `imageUrl` is added as a presigned S3 URL valid for 1 hour; `imageKey` is `null` and `imageUrl` is absent for announcements without an image. `createdBy` is the ObjectId of the admin who created it.

Errors

  • 500JSON `{ "message": "Error fetching active announcement", "error": "..." }`.
Request
curl -X GET "https://app.ummahspot.com/announcements/active" \
  -H "Authorization: Bearer $SHARH_TOKEN"
Response · 200
{
  "announcement": {
    "_id": "66b2d4e5f6a7b80012345680",
    "title": "New book: Sharh al-Aqaid",
    "body": "The full translation with commentary is now available in the library.",
    "imageKey": "announcements/images/<uuid>-banner.png",
    "isActive": true,
    "createdBy": "665f1c2e9b1d4a0012ab0001",
    "createdAt": "2026-09-15T08:00:00.000Z",
    "updatedAt": "2026-09-15T08:00:00.000Z",
    "__v": 0,
    "imageUrl": "https://<bucket>.s3.amazonaws.com/announcements/images/<uuid>-banner.png?X-Amz-Signature=..."
  }
}