Devices

Register (or refresh) a mobile device for push notifications

Idempotent: re-posting the same token bumps last_seen_at and refreshes metadata. Stale tokens are auto-deleted after 30 days of inactivity via TTL. The push-dispatch worker also removes tokens that APNs reports as 410 Gone.

post/devices

Request

  • Base URL: https://www.sociahive.com/api/v1
  • URL: https://www.sociahive.com/api/v1/devices
  • Auth: one of:
    • API key in header X-API-Key
    • OAuth 2 (authorization code, authorization URL /api/oauth/authorize, token URL /api/oauth/token, scopes: devices:write)

Request body

tokenstring required

APNs device token (64-char hex) or FCM registration token. Treated as a credential — never echoed back in responses.

platform'ios' | 'android' required
app_versionstring required
localestring required
apns_environment'production' | 'sandbox'

Set to "sandbox" for dev/TestFlight builds. Defaults to "production".

Example request

{
  "app_version": "1.0.0 (12)",
  "locale": "en-US"
}

Response

Device registered

Example response

{
  "data": {
    "id": "507f1f77bcf86cd799439011"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.