Skip to main content

Documentation Index

Fetch the complete documentation index at: https://285e39fd5e337e58f16290.sightscreen.app/llms.txt

Use this file to discover all available pages before exploring further.

Endpoint reference

MethodRouteAuthPurpose
POST/devicesUserRegister or update a device
DELETE/devices/:deviceTokenUserUnregister a device
POST/devices/push-to-start-tokenUserRegister push-to-start token
POST/admin/notifications/pushAdminSend a manual push notification
GET/admin/notifications/usersAdminList users with push tokens
GET/admin/notifications/subscriptionsAdminList notification subscriptions

Device registration

See the Device registration business flow for the full end-to-end journey.

POST /devices User

Register or update a device for push notifications (APNs). Sightscreen supports multi-device — a user can have multiple devices registered simultaneously. There is no single-device enforcement.
deviceToken
string
required
The APNs device token from the iOS app.
platform
string
required
Device platform. Currently only ios is supported.
deviceId
string
required
The identifierForVendor from iOS. Used to uniquely identify the physical device across token rotations.
osVersion
string
The iOS version running on the device (e.g., 18.3.1). Stored for diagnostics and compatibility targeting.
appVersion
string
The Sightscreen app version (e.g., 2.1.0). Stored for diagnostics and feature gating.
{
  "deviceToken": "abc123def456...",
  "platform": "ios",
  "deviceId": "E621E1F8-C36C-495A-93FC-0C247A3E6E5F",
  "osVersion": "18.3.1",
  "appVersion": "2.1.0"
}
If a device with the same deviceId already exists for this user, the record is updated (new token, updated osVersion/appVersion, refreshed lastSeenAt). Otherwise a new device record is created.

Device TTL

Device records have a TTL of 90 days from the lastSeenAt timestamp. Devices that have not called POST /devices within 90 days are automatically expired by DynamoDB TTL. This prevents stale tokens from accumulating.

DELETE /devices/:deviceToken User

Unregister a device. Call this on logout or when the user disables notifications.
deviceToken
string
required
The APNs device token to remove.

POST /devices/push-to-start-token User

Register a push-to-start token for iOS Live Activities. This token allows the backend to start a Live Activity on the device without the app being in the foreground.
pushToStartToken
string
required
The push-to-start token from the iOS app.
matchId
string
required
The match this token is associated with.

Admin notifications

POST /admin/notifications/push Admin

Send a manual push notification to one or more users.
title
string
required
Notification title.
body
string
required
Notification body text.
userIds
string[]
Target specific users. Omit to broadcast to all users with push tokens.
matchId
string
Associate the notification with a match (for deep linking).
Broadcasting to all users sends to every registered device across all of a user’s devices. Use with care.

GET /admin/notifications/users Admin

List users who have registered push notification tokens.

GET /admin/notifications/subscriptions Admin

List all active notification subscriptions (match follows with push enabled).