Super People Docs
API Reference

Office Updates

Approving posts for the public Office Updates page on superlabs.co, and the two public routes that page reads.

Approving posts for the public Office Updates page on superlabs.co, and the two public routes that page reads.

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 — Office Updates.

Endpoints

GET /api/v1/admin/website-posts — Posts by website status

Newest first. Each item is exactly what the public page would show, plus the status and the last review.

QueryTypeRequiredNotes
statuspending | approved | rejected | unpublishednoDefaults to pending — the review queue.
cursorstringnoThe nextCursor from the previous page. Omit for the first.
limitnumbernoRows per page. Defaults to 20, capped at 50.

Returns 200 → Page<WebsitePostResponse> — see Paging

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.

GET /api/v1/admin/website-posts/counts — How many posts are in each website status

Returns 200 → WebsiteCountsResponse

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

POST /api/v1/admin/website-posts/{postId}/approve — Put a post on the website

From pending, rejected or unpublished. It appears on superlabs.co on the next request.

Path parameterTypeNotes
postIdstring

Returns 200 → WebsitePostResponse

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such post, or it has been deleted or hidden.
409The post is not in a state this decision can be made from — message says why.

POST /api/v1/admin/website-posts/{postId}/reject — Keep a post off the website

From pending or unpublished. A post that is on the website is unpublished instead.

Path parameterTypeNotes
postIdstring

Body — WebsiteReasonDto (optional)

Returns 200 → WebsitePostResponse

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 post, or it has been deleted or hidden.
409The post is not in a state this decision can be made from — message says why.

POST /api/v1/admin/website-posts/{postId}/unpublish — Take a post off the website

From approved. The post itself stays in the feed.

Path parameterTypeNotes
postIdstring

Body — WebsiteReasonDto (optional)

Returns 200 → WebsitePostResponse

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 post, or it has been deleted or hidden.
409The post is not in a state this decision can be made from — message says why.

GET /api/v1/public/office-updates — Approved posts for the website

Public. Newest first. Only posts a super admin approved.

QueryTypeRequiredNotes
cursorstringnoThe nextCursor from the previous page. Omit for the first.
limitnumbernoPosts per page. Defaults to 9, capped at 24.

Returns 200 → Page<OfficeUpdateResponse> — see Paging

ErrorWhen
400The request was rejected. message is an array of field errors when validation failed.

GET /api/v1/public/office-updates/{postId} — One approved post

Public. A post that is not approved answers exactly as one that does not exist.

Path parameterTypeNotes
postIdstring

Returns 200 → OfficeUpdateResponse

ErrorWhen
404Not approved for the website, deleted, or no such post.

Data models

WebsitePostResponse

FieldTypeNotes
idstring
contentstringPlain text. Mentions are already names, never @[id] tokens; hashtags stay in the text and are also listed in tags. Render as text with line breaks kept — never as HTML.
tagsstring[]
isAnnouncementboolean
imagesOfficeUpdateImageResponse[]
videosOfficeUpdateVideoResponse[]
recognitionOfficeUpdateRecognitionResponse | null
authorPublicPersonResponse
createdAtstring ISO 8601
publishedAtstring ISO 8601 | nullWhen it last went on the website. Null unless it is there now.
statuspending | approved | rejected | unpublished
reviewWebsiteReviewResponse | nullThe last decision. Null until the post has been reviewed once.
notShownPubliclypoll | documents[]Parts of the post the website leaves out.

OfficeUpdateImageResponse

FieldTypeNotes
urlstringThe 1200px rendition, signed and valid for about a day.
thumbnailUrlstring | nullThe 400px rendition, or null when the original was already smaller.
widthnumber | null
heightnumber | null

OfficeUpdateVideoResponse

FieldTypeNotes
urlstringSigned and valid for about a day. Supports range requests.
mimeTypestring
posterUrlstring | null

OfficeUpdateRecognitionResponse

FieldTypeNotes
categoryteamwork | innovation | above_and_beyond | leadership | customer_focus | learning
messagestringEmpty when nothing was written.
recipientPublicPersonResponse

PublicPersonResponse

FieldTypeNotes
namestring
titlestringEmpty when they have not set one.
imagestring | nullSigned and short-lived. Fetch it with the page; do not store it.

WebsiteReviewResponse

FieldTypeNotes
reviewedAtstring ISO 8601
reviewerstring | nullThe super admin's name, or the x-reviewer a service call gave.
reasonstring | nullGiven on reject or unpublish. Null on approve.

WebsiteCountsResponse

FieldTypeNotes
pendingnumber
approvednumber
rejectednumber
unpublishednumber

WebsiteReasonDto

FieldTypeNotes
reason?string≤ 500 chars

OfficeUpdateResponse

FieldTypeNotes
idstring
contentstringPlain text. Mentions are already names, never @[id] tokens; hashtags stay in the text and are also listed in tags. Render as text with line breaks kept — never as HTML.
tagsstring[]
isAnnouncementboolean
imagesOfficeUpdateImageResponse[]
videosOfficeUpdateVideoResponse[]
recognitionOfficeUpdateRecognitionResponse | null
authorPublicPersonResponse
createdAtstring ISO 8601
publishedAtstring ISO 8601 | nullWhen it last went on the website. Null unless it is there now.

On this page