Register or refresh a device subscription (FCM token)
Registers a push token (201) or refreshes an owned active row (200). Present subscription_credential to update in place. Without ownership of an existing active token that already has a credential, ComRaid deactivates the previous endpoint (last-writer-wins) and issues a new subscription_id plus credential. A credential-less Endpoint (API / Dashboard / CSV import) holding the same token is taken over in place: same subscription_id and Contact, with a newly issued subscription_credential. subscription_credential is returned only when newly issued. Accepts Contact Properties (locale, timezone, language, country) and Subscription Properties (app_version, sdk_version, device.os/os_version/model). Create sets first_app_version and session_count=1; refresh updates current_* Properties and preserves first_app_version (does not increment session_count).
Registers a push token (201) or refreshes an owned active row (200). Present subscription_credential to update in place. Without ownership of an existing active token that already has a credential, ComRaid deactivates the previous endpoint (last-writer-wins) and issues a new subscription_id plus credential. A credential-less Endpoint (API / Dashboard / CSV import) holding the same token is taken over in place: same subscription_id and Contact, with a newly issued subscription_credential. subscription_credential is returned only when newly issued. Accepts Contact Properties (locale, timezone, language, country) and Subscription Properties (app_version, sdk_version, device.os/os_version/model). Create sets first_app_version and session_count=1; refresh updates current_* Properties and preserves first_app_version (does not increment session_count).
mobileAppIdX-ComRaid-App-Id<token>Publishable mobile app id (cr_app_...)
application/json- body
platform*string"android""ios"token*stringFCM registration token or APNs device token
provider?stringWhen omitted, android defaults to fcm and ios defaults to apns. Use provider=fcm with platform=ios for Firebase Messaging registration tokens. APNs is not valid for android.
"fcm""apns"apns_environment?stringRequired when provider is apns (or ios without an explicit fcm provider)
"sandbox""production"app_version?stringSubscription Property current_app_version (and first_app_version on create). Also stored under metadata.app_version for legacy clients.
sdk_version?stringSubscription Property sdk_version
locale?stringContact Property locale (BCP 47), e.g. en-US
timezone?stringContact Property timezone (IANA), e.g. America/New_York
language?stringContact Property language (ISO 639), e.g. en
country?stringContact Property country (ISO 3166-1 alpha-2), e.g. US
device?Device facts. Recognized keys os, os_version, model become Subscription Properties; the whole object is also stored under metadata.device.
metadata?Free-form metadata merged with device and app_version (not Properties)
subscription_credential?stringOwnership secret issued at registration. Required to refresh the same subscription in place once issued. Omit on first register.
Existing owned token refreshed (same subscription_id)
application/json- response
subscription_id*stringuuidcontact_id?stringAnonymous or known Contact bound to this Subscription
uuidchannel*"push""push"subscription_credential?stringReturned only when newly issued; store securely on device
anonymous*booleanTrue when the Contact has no external_user_id yet
platform*string"android""ios"provider?string"fcm""apns"curl -X POST 'https://api.comraid.io/mobile/subscriptions' \ -H 'Content-Type: application/json' \ -d '{ "platform": "android", "token": "fcm-registration-token", "app_version": "1.2.0", "device": { "model": "Pixel 8", "os_version": "14" }}'{ "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627", "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598", "channel": "push", "subscription_credential": "string", "anonymous": true, "platform": "android", "provider": "fcm"}List notification categories for the app GET
Previous Page
Attach a contact identity to a subscription POST
Upserts a contact for external_user_id and binds this subscription. Requires a matching subscription_credential (credential-less Endpoints return 401). Inactive Subscriptions return 409 (`subscription_inactive`). When the project has identity_verification_required, jwt (RS256 JWT for Identity verification) is mandatory and must verify. When optional, omit jwt for an unverified bind, but any supplied invalid jwt is rejected (never downgraded).