Skip to content

API Reference

The PushWard API is a REST API for managing iOS Live Activities via Apple Push Notification service (APNs).

Base URL

https://api.pushward.app

Authentication

All endpoints (except /health) require a Bearer token in the Authorization header:

Authorization: Bearer hlk_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345

Tokens use the hlk_ prefix (integration keys). Create them in the iOS app's settings screen and copy the value once — only the SHA-256 hash is stored server-side, so tokens cannot be recovered if lost. See Authentication for scopes and slug-restriction rules.

Activity State Machine

Activities follow a state machine with two client-visible states:

StateDescription
endedInactive (default on creation)
ongoingActive Live Activity running on device

State Transitions

Transitions are triggered via PATCH /activities/{slug}:

FromToPush Action
endedongoingPush-to-start (starts Live Activity)
ongoingongoingPush update (updates content)
ongoingendedPush end (dismisses after 4 hours)
Info

Activities may also enter an internal preempted state when the server evicts the lowest-priority activity to stay under the ongoing limit. Clients cannot set preempted directly — patch the activity back to ongoing to restart it.

Priority and Eviction

Each activity has a priority (0-10, default 0). When the ongoing activity limit (default 5) is exceeded, the server evicts the lowest-priority, oldest activity. Evicted activities transition to preempted and can be restarted.

Rate Limiting

All API endpoints are rate-limited per IP address:

EndpointLimit
Auth endpoints (POST /auth/*)10 requests per minute
All other endpoints200 requests per minute
Warning

Exceeding the rate limit returns HTTP 429 Too Many Requests with an application/problem+json body (code: "rate_limit.exceeded") plus a Retry-After response header and a retry_after_ms extension. Back off accordingly. See Errors for the full Problem Details shape.

Endpoints

SectionDescription
AuthenticationToken management and user profile
ActivitiesCreate, list, update, and delete activities
NotificationsSend inbox notifications with optional APNs push delivery