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

Two token types are supported:

PrefixTypeAccess
hla_API TokenFull access to all endpoints
hlk_Integration KeyScoped -- activity:update (default) or activity:manage

See Authentication for details on obtaining and managing tokens.

Activity State Machine

Activities follow a state machine with three states:

StateDescription
ENDEDInactive (default on creation)
ONGOINGActive Live Activity running on device
PREEMPTEDServer-evicted due to priority limits

State Transitions

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

FromToPush Action
ENDEDONGOINGPush-to-start (starts Live Activity)
ONGOINGONGOINGPush update (updates content)
ONGOINGENDEDPush end (dismisses after 4 hours)
PREEMPTEDONGOINGPush-to-start (restarts activity)
ENDEDENDEDNo push (no-op)
Info

PREEMPTED is server-internal and cannot be set via the API. It is applied automatically when the ONGOING activity limit is exceeded.

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 {"error": "rate limit exceeded"}. Back off and retry after the limit window resets.

Endpoints

SectionDescription
AuthenticationToken management and user profile
ActivitiesCreate, list, update, and delete activities
Integration KeysScoped keys for external services
Activity SharingShare activities with other users via share codes or pattern-based sharing