iOS 实时活动的 REST API 参考
PushWard API 是一个 REST API,通过 Apple Push Notification service (APNs) 管理 iOS 实时活动。
Base URL
https://api.pushward.appAuthentication
All endpoints (except /health) require a Bearer token in the Authorization header:
Authorization: Bearer hlk_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345Tokens are hlk_ integration keys created in the iOS app's settings screen — see Authentication for the key format, scopes, and slug-restriction rules.
Activity State Machine
Activities follow a state machine with two client-visible states:
| State | Description |
|---|---|
ended | Inactive (default on creation) |
ongoing | Active Live Activity running on device |
State Transitions
Transitions are triggered via PATCH /activities/{slug}:
| From | To | Push Action |
|---|---|---|
ended | ongoing | Push-to-start (starts Live Activity) |
ongoing | ongoing | Push update (updates content) |
ongoing | ended | Push end (dismisses after 4 hours) |
信息
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.
Rate limits, quotas, and the eviction rule live on the Limits page.
Endpoints
| Section | Description |
|---|---|
| Authentication | Token management and user profile |
| Activities | Create, list, update, and delete activities |
| Notifications | Send inbox notifications with optional APNs push delivery |
| Widgets | Create, update, and delete Home Screen widgets |
| Send transactional email to verified recipients |