Attach a contact identity to a subscription
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).
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).
mobileAppIdX-ComRaid-App-Id<token>Publishable mobile app id (cr_app_...)
id*stringuuidapplication/json- body
external_user_id*stringProduct-owned contact identity
subscription_credential?stringRequired once the subscription has been issued a credential
jwt?stringRS256 JWT for Identity verification (iss=comraid:{project_id}, aud=comraid:identity, kid, iat, exp≤10m). Required when the project enforces identity verification.
Logged in
application/json- response
subscription_id*stringuuidcontact_id*stringuuidexternal_user_id*stringanonymous*falsefalseverified*booleanTrue when this login presented a valid Identity verification JWT
curl -X POST 'https://api.comraid.io/mobile/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/login' \ -H 'Content-Type: application/json' \ -d '{ "external_user_id": "user_123", "subscription_credential": "high-entropy-secret", "jwt": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImFjbWUtMjAyNiJ9..."}'{ "subscription_id": "0a1b2c3d-4e5f-6789-abcd-ef0123456789", "contact_id": "9f8e7d6c-5b4a-3210-9876-543210fedcba", "external_user_id": "user_123", "anonymous": false, "verified": true}Register or refresh a device subscription (FCM token) POST
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).
Replace the push token on an existing subscription POST
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).