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 inapps/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;| nullmeans 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.
| Query | Type | Required | Notes |
|---|---|---|---|
status | pending | approved | rejected | unpublished | no | Defaults to pending — the review queue. |
cursor | string | no | The nextCursor from the previous page. Omit for the first. |
limit | number | no | Rows per page. Defaults to 20, capped at 50. |
Returns 200 → Page<WebsitePostResponse> — see Paging
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed 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
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed 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 parameter | Type | Notes |
|---|---|---|
postId | string |
Returns 200 → WebsitePostResponse
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such post, or it has been deleted or hidden. |
409 | The 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 parameter | Type | Notes |
|---|---|---|
postId | string |
Body — WebsiteReasonDto (optional)
Returns 200 → WebsitePostResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such post, or it has been deleted or hidden. |
409 | The 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 parameter | Type | Notes |
|---|---|---|
postId | string |
Body — WebsiteReasonDto (optional)
Returns 200 → WebsitePostResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such post, or it has been deleted or hidden. |
409 | The 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.
| Query | Type | Required | Notes |
|---|---|---|---|
cursor | string | no | The nextCursor from the previous page. Omit for the first. |
limit | number | no | Posts per page. Defaults to 9, capped at 24. |
Returns 200 → Page<OfficeUpdateResponse> — see Paging
| Error | When |
|---|---|
400 | The 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 parameter | Type | Notes |
|---|---|---|
postId | string |
Returns 200 → OfficeUpdateResponse
| Error | When |
|---|---|
404 | Not approved for the website, deleted, or no such post. |
Data models
WebsitePostResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
content | string | Plain 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. |
tags | string[] | |
isAnnouncement | boolean | |
images | OfficeUpdateImageResponse[] | |
videos | OfficeUpdateVideoResponse[] | |
recognition | OfficeUpdateRecognitionResponse | null | |
author | PublicPersonResponse | |
createdAt | string ISO 8601 | |
publishedAt | string ISO 8601 | null | When it last went on the website. Null unless it is there now. |
status | pending | approved | rejected | unpublished | |
review | WebsiteReviewResponse | null | The last decision. Null until the post has been reviewed once. |
notShownPublicly | poll | documents[] | Parts of the post the website leaves out. |
OfficeUpdateImageResponse
| Field | Type | Notes |
|---|---|---|
url | string | The 1200px rendition, signed and valid for about a day. |
thumbnailUrl | string | null | The 400px rendition, or null when the original was already smaller. |
width | number | null | |
height | number | null |
OfficeUpdateVideoResponse
| Field | Type | Notes |
|---|---|---|
url | string | Signed and valid for about a day. Supports range requests. |
mimeType | string | |
posterUrl | string | null |
OfficeUpdateRecognitionResponse
| Field | Type | Notes |
|---|---|---|
category | teamwork | innovation | above_and_beyond | leadership | customer_focus | learning | |
message | string | Empty when nothing was written. |
recipient | PublicPersonResponse |
PublicPersonResponse
| Field | Type | Notes |
|---|---|---|
name | string | |
title | string | Empty when they have not set one. |
image | string | null | Signed and short-lived. Fetch it with the page; do not store it. |
WebsiteReviewResponse
| Field | Type | Notes |
|---|---|---|
reviewedAt | string ISO 8601 | |
reviewer | string | null | The super admin's name, or the x-reviewer a service call gave. |
reason | string | null | Given on reject or unpublish. Null on approve. |
WebsiteCountsResponse
| Field | Type | Notes |
|---|---|---|
pending | number | |
approved | number | |
rejected | number | |
unpublished | number |
WebsiteReasonDto
| Field | Type | Notes |
|---|---|---|
reason? | string | ≤ 500 chars |
OfficeUpdateResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
content | string | Plain 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. |
tags | string[] | |
isAnnouncement | boolean | |
images | OfficeUpdateImageResponse[] | |
videos | OfficeUpdateVideoResponse[] | |
recognition | OfficeUpdateRecognitionResponse | null | |
author | PublicPersonResponse | |
createdAt | string ISO 8601 | |
publishedAt | string ISO 8601 | null | When it last went on the website. Null unless it is there now. |