API ReferenceAdmin: Announcements
Per-segment recipient counts for announcements.
Authorization
bearerAuth AuthorizationBearer <token>
AdonisJS access-token guard (middleware.auth({ guards: ["api"] })). Send Authorization: Bearer <oat_…> (issued by /auth/register, /auth/login, /auth/social/{google,apple}, or /auth/guest).
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/admin/announcements/segments"{ "data": { "segments": [ { "value": "all", "recipientCount": 1240 }, { "value": "owners", "recipientCount": 86 } ] }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "AUTH_REQUIRED", "message": "Authentication is required to access this resource." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}{ "error": { "code": "FORBIDDEN", "message": "You are not allowed to perform this action." }, "meta": { "requestId": "req_01jq8z1mxc0e0v6r3xj0a8h9k7" }}Pending-job count per queue. GET
Reads queue depth from the configured queue driver (BullMQ via @adonisjs/queue). Queues whose probe fails (Redis down, etc.) report `ok: false` and `pending: null` so the rest of the response still renders.
Broadcast an announcement to a user segment. POST
Sends an in-app announcement (inbox + realtime feed, not push) to every reachable user in the segment (`all` / `customers` / `owners`). Fan-out runs in a background job; audited. Requires super_admin or admin.