API reference

Notifications

In-app broadcasts, email and Web Push.

Overview

Century delivers in-app notifications and broadcasts, transactional email, and Web Push to registered browser endpoints. Push uses standard VAPID: fetch the public key, subscribe in the browser, register the subscription.

  • Email delivery is transactional and triggered by platform events — there is no public send-email endpoint.
  • SMS is used only for phone OTP verification; there is no general SMS API.

Not implemented

Do not build against these
  • Developer-triggered SMS sends
  • Developer-triggered email templates

Endpoints

8 operations available to your account.

listNotifications

Bearer token required

Caller's inbox.

Endpoint
GET/_serverFn/listNotifications
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X GET https://centuryvtu.com/_serverFn/listNotifications \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -G

Runs against Production using your own signed-in session. No shared or secret credential is used.

markAllNotificationsRead

Bearer token required

Mark all as read.

Endpoint
POST/_serverFn/markAllNotificationsRead
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X POST https://centuryvtu.com/_serverFn/markAllNotificationsRead \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

markNotificationRead

Bearer token required

Mark one as read.

Endpoint
POST/_serverFn/markNotificationRead
Request body
FieldTypeRequired
iduuidYes
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X POST https://centuryvtu.com/_serverFn/markNotificationRead \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"data":{"id":"00000000-0000-0000-0000-000000000000"}}'
Example response
{ ok: true }

listBroadcasts

Bearer token required

List active broadcasts.

Endpoint
GET/_serverFn/listBroadcasts
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X GET https://centuryvtu.com/_serverFn/listBroadcasts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -G

Runs against Production using your own signed-in session. No shared or secret credential is used.

votePoll

Bearer token required

Vote in a broadcast poll.

Endpoint
POST/_serverFn/votePoll
Request body
FieldTypeRequired
pollIduuidYes
optionIduuidYes
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X POST https://centuryvtu.com/_serverFn/votePoll \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"data":{"pollId":"00000000-0000-0000-0000-000000000000","optionId":"00000000-0000-0000-0000-000000000000"}}'
Example response
{ ok: true }

getPushPublicKey

No authentication

VAPID public key for Web Push.

Endpoint
GET/_serverFn/getPushPublicKey
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X GET https://centuryvtu.com/_serverFn/getPushPublicKey \
  -H "Content-Type: application/json" \
  -G

Runs against Production using your own signed-in session. No shared or secret credential is used.

savePushSubscription

Bearer token required

Register a push endpoint.

Endpoint
POST/_serverFn/savePushSubscription
Request body
FieldTypeRequired
endpointstringYes
p256dhstringYes
authstringYes
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X POST https://centuryvtu.com/_serverFn/savePushSubscription \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"data":{"endpoint":"string","p256dh":"string","auth":"string"}}'
Example response
{ ok: true }

deletePushSubscription

Bearer token required

Delete a push endpoint.

Endpoint
POST/_serverFn/deletePushSubscription
Request body
FieldTypeRequired
endpointstringYes
Response codes
401Unauthorized – missing or invalid bearer token.
400Validation failed – input did not match the schema.
429Rate limited – slow down and retry.
500Server error – reported and logged with an error ID.
curl -X POST https://centuryvtu.com/_serverFn/deletePushSubscription \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"data":{"endpoint":"string"}}'
Example response
{ ok: true }