ComRaidComRaid Docs
API referenceMobile

Replace the push token on an existing subscription

Identity-preserving token rotation. Requires a matching subscription_credential (credential-less Endpoints return 401). Inactive Subscriptions return 409 (`subscription_inactive`). Keeps subscription_id, contact association, verification, and delivery history. Another active holder of the new token is made Inactive. Also refreshes Subscription and Contact Properties when provided (does not increment session_count).

POST
/mobile/subscriptions/{id}/token

Identity-preserving token rotation. Requires a matching subscription_credential (credential-less Endpoints return 401). Inactive Subscriptions return 409 (subscription_inactive). Keeps subscription_id, contact association, verification, and delivery history. Another active holder of the new token is made Inactive. Also refreshes Subscription and Contact Properties when provided (does not increment session_count).

Authorization

mobileAppId
headerX-ComRaid-App-Id<token>

Publishable mobile app id (cr_app_...)

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
token*string
platform*string
Value in"android""ios"
provider?string
Value in"fcm""apns"
apns_environment?string
Value in"sandbox""production"
app_version?string
sdk_version?string
locale?string
timezone?string
language?string
country?string
device?
metadata?
subscription_credential*string

Required ownership credential for this subscription

Response Body

Token replaced (or refreshed when unchanged)

application/json
  1. response
subscription_id*string
Formatuuid
anonymous*boolean
verified*boolean
platform*string
Value in"android""ios"
provider*string
Value in"fcm""apns"
token_version*integer
Example Request
curl -X POST 'https://api.comraid.io/mobile/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/token' \  -H 'Content-Type: application/json' \  -d '{  "token": "new-fcm-or-apns-token",  "platform": "android",  "provider": "fcm",  "subscription_credential": "high-entropy-secret"}'
Example Response
{  "subscription_id": "aa11a4c2-a467-43db-b413-c4ab0f5cf627",  "anonymous": true,  "verified": true,  "platform": "android",  "provider": "fcm",  "token_version": 0}