ComRaidComRaid Docs
API referenceMobile

Upsert Contact Attributes for a logged-in Subscription

Upserts Attributes on the Subscription's Contact. Requires App ID auth and a valid subscription credential (credential-less Endpoints return 401). Inactive Subscriptions return 409 (`subscription_inactive`). The Contact must be logged in (have an external_user_id); anonymous Subscriptions are rejected. JWT is not accepted on this call — use Login first. Same attribute upsert semantics as PUT /contacts/{external_user_id}/attributes, including JSON `null` to remove an Attribute.

PUT
/mobile/subscriptions/{id}/attributes

Upserts Attributes on the Subscription's Contact. Requires App ID auth and a valid subscription credential (credential-less Endpoints return 401). Inactive Subscriptions return 409 (subscription_inactive). The Contact must be logged in (have an external_user_id); anonymous Subscriptions are rejected. JWT is not accepted on this call — use Login first. Same attribute upsert semantics as PUT /contacts/{external_user_id}/attributes, including JSON null to remove an Attribute.

Authorization

mobileAppId
headerX-ComRaid-App-Id<token>

Publishable mobile app id (cr_app_...)

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
subscription_credential*string
attributes*

Free-form Customer-supplied Attribute key/value pairs. Keys ≤ 128 chars; values ≤ 4KB serialized; ≤ 200 keys per Contact. JSON null removes that Attribute.

Response Body

Updated

application/json
  1. response
contact_id?string
Formatuuid
external_user_id?string
updated_attributes?array<string>

Present when attributes were included in the request

Example Request
curl -X PUT 'https://api.comraid.io/mobile/subscriptions/497f6eca-6276-4993-bfeb-53cbbbba6f08/attributes' \  -H 'Content-Type: application/json' \  -d '{  "subscription_credential": "string",  "attributes": {}}'
Example Response
{  "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598",  "external_user_id": "string",  "updated_attributes": [    "string"  ]}