Super People Docs
API Reference

Announcements

Super admin announcements: the scrolling bar and popup in the app, the public route superlabs.co reads for its own bar, and managing them.

Super admin announcements: the scrolling bar and popup in the app, the public route superlabs.co reads for its own bar, and managing them.

Generated from the OpenAPI spec by npm run docs:api -w api. Do not edit this page — change the decorators in apps/api/src/ and regenerate.

Conventions

  • Auth — a session on every route: the cookie on web, the bearer token on mobile. See Authentication.
  • Errors — every non-2xx response has the body described in Errors.
  • Types — a ? after a field name means it is optional; | null means it is present but may be null.
  • Guide — Announcements.

Endpoints

GET /api/v1/announcements/active — Announcements live for you right now

Those sent to everyone and those naming you, within their dates. Newest first. Which you have closed is kept by the client, not here.

Returns 200 → ActiveAnnouncementResponse[]

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.

GET /api/v1/public/announcements — Announcements live on the website

Public. Only those a super admin put on the website.

Returns 200 → ActiveAnnouncementResponse[]

GET /api/v1/admin/announcements — Every announcement

Super admins only. Live first, then scheduled, then ended.

Returns 200 → AdminAnnouncementResponse[]

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.

POST /api/v1/admin/announcements — Put up an announcement

Super admins only. Up to 200 characters, emoji welcome. It needs somebody to show to: the website, everyone, or named people.

Body — AnnouncementDto

Returns 201 → AdminAnnouncementResponse

ErrorWhen
400The request was rejected. message is an array of field errors when validation failed.
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.

PUT /api/v1/admin/announcements/{announcementId} — Rewrite an announcement

Super admins only. Replaces every field. Anybody who closed it sees it again, since the words may have changed.

Path parameterTypeNotes
announcementIdstring

Body — AnnouncementDto

Returns 200 → AdminAnnouncementResponse

ErrorWhen
400The request was rejected. message is an array of field errors when validation failed.
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such announcement.

DELETE /api/v1/admin/announcements/{announcementId} — Delete an announcement

Super admins only.

Path parameterTypeNotes
announcementIdstring

Returns 204 → no body

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such announcement.

POST /api/v1/admin/announcements/{announcementId}/end — Take an announcement down now

Super admins only. Sets its end to now and keeps it in the list.

Path parameterTypeNotes
announcementIdstring

Returns 200 → AdminAnnouncementResponse

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such announcement.

Data models

ActiveAnnouncementResponse

FieldTypeNotes
idstring
messagestring
linkUrlstring | null
linkLabelstring | nullWhat the link reads, e.g. "Know more". Null when there is no link.
displaybar | popup | both
endsAtstring ISO 8601 | null
updatedAtstring ISO 8601Key a dismissal on this along with id: an edit shows it again.

AdminAnnouncementResponse

FieldTypeNotes
idstring
messagestring
linkUrlstring | null
linkLabelstring | nullWhat the link reads, e.g. "Know more". Null when there is no link.
displaybar | popup | both
endsAtstring ISO 8601 | null
updatedAtstring ISO 8601Key a dismissal on this along with id: an edit shows it again.
onWebsiteboolean
toEveryoneboolean
importantbooleanAlso sent as a notification when it goes live.
notifiedAtstring ISO 8601 | nullWhen that notification went out; null until it has.
recipientsMentionResponse[]
startsAtstring ISO 8601
statusscheduled | live | ended
authorMentionResponse | null
createdAtstring ISO 8601

MentionResponse

FieldTypeNotes
idstring
namestring
imagestring | null

AnnouncementDto

FieldTypeNotes
messagestringThe words, emoji welcome. Counted in characters as a person sees them, so an emoji is one. · ≤ 200 chars
linkUrl?string | nullWhere "Know more" goes. Empty or null for no link.
linkLabel?string | nullWhat the link reads. Defaults to "Know more". · ≤ 40 chars
displaybar | popup | both
onWebsitebooleanAlso on the public superlabs.co website.
toEveryonebooleanEvery signed-in member.
important?booleanAlso send it as a notification — the bell and a push — to the people it is for, once, when it goes live. Website visitors are not notified.
recipientIdsstring[]Particular people, on top of — or instead of — everyone.
startsAt?string | nullWhen it starts showing. Omitted: now on create, unchanged on edit.
endsAt?string | nullThe "date till". Null runs until it is ended by hand.

On this page