Super People Docs
API Reference

Events

Company events: list what is coming up, add, reschedule and remove.

Company events: list what is coming up, add, reschedule and remove.

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.

Endpoints

GET /api/v1/events — Upcoming events

Soonest first, past events excluded. A plain array capped by limit, not a page.

QueryTypeRequiredNotes
limitnumbernoRows per page. Defaults to 20, capped at 50.

Returns 200 → CompanyEventResponse[]

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

POST /api/v1/events — Add an event

Open to anyone signed in, the same way posting is. Send startsAt as ISO 8601 with the device’s offset — it is stored as timestamptz, so an event created in one timezone reads correctly in another.

Body — WriteEventDto

Returns 201 → CompanyEventResponse

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.

PATCH /api/v1/events/{eventId} — Reschedule an event

Only the time may change. Renaming or moving it is a different event — create that one and remove this. Requires canManage on the event.

Path parameterTypeNotes
eventIdstring

Body — RescheduleEventDto

Returns 200 → CompanyEventResponse

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 event.

DELETE /api/v1/events/{eventId} — Remove an event

Your own, or anything if you are a super admin.

Path parameterTypeNotes
eventIdstring

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 event.

Data models

CompanyEventResponse

FieldTypeNotes
idstring
titlestring
startsAtstring ISO 8601Stored with its offset, so it reads correctly in any timezone.
endsAtstring ISO 8601 | null
locationstringEmpty string when unset, never null.
createdByMentionResponse
canManagebooleanWhether the viewer may reschedule or remove this one — their own event, or anything if they are a super admin. Drive the edit affordance off this rather than comparing ids yourself.

MentionResponse

FieldTypeNotes
idstring
namestring
imagestring | null

WriteEventDto

FieldTypeNotes
titlestring≤ 120 chars
startsAtstringISO 8601, sent by the browser with its offset. Stored as timestamptz, so an event scheduled in one timezone reads correctly in another.
endsAt?string
location?string≤ 120 chars

RescheduleEventDto

FieldTypeNotes
startsAtstring
endsAt?string

On this page