---
title: "SyncSubscription"
method: POST
path: "/subscription/sync/{id}"
tags: ["Subscriptions"]
---

# SyncSubscription

`POST /subscription/sync/{id}`

Sync subscription

## Path parameters

- `id` string, required

## Request body

- object
  - `subscriptionId` string — <p>Synchronize/update an existing subscription</p>
  - `endpoint` string — <p>Web push subscription endpoint (for Web Push)</p>
  - `publicKey` string — <p>Public key for web push notifications</p>
  - `authSecret` string — <p>Auth secret for web push notifications</p>
  - `apnsToken` string — <p>Apple Push Notification Services token (for iOS Apps or Mac OS Safari)</p>
  - `fcmToken` string — <p>Google / Firebase Cloud Messaging token (for Android Apps)</p>
  - `fcmId` string — <p>Google / Firebase Cloud Messaging Sender ID (for Android Apps)</p>
  - `emailAddress` string — <p>Email address (for Email channels). Can be changed by specifying the <code>uniqueIdentifier</code> field.</p>
  - `emailOptInFormId` string — <p>Email Opt In Form ID (for Email channels)</p>
  - `emailOptInConfirmationIgnored` boolean — <p>Ignore double opt-in for email subscriptions topics - This lets you assign topics directly even if double opt-in is enabled</p>
  - `emailConfirmed` boolean — <p>Set to <code>true</code> to directly confirm email contact without having to click the confirmation link in the double-opt-in email</p>
  - `phoneNumber` string — <p>Phone number (for SMS channels)</p>
  - `phoneConfirmed` boolean — <p>Set to <code>true</code> to directly confirm phone contact without having to click the confirmation link in the double-opt-in SMS</p>
  - `customAttributes` object — <p>Object of custom attributes (Object Key = Attribute ID, Object value = Attribute value)</p>
  - `topics` string[] — <p>Array of Topic IDs</p>
  - `addTopics` boolean — <p>Only add specified Topic IDs instead of overriding them</p>
  - `isEditTopics` boolean — <p>Email only - Necessary to override Topic IDs instead of only adding them</p>
  - `browserType` string, required — <p>Browser name (Chrome, Firefox, ... or your app's name e.g. CleverPush)</p>
  - `browserVersion` string, required — <p>Browser / Mobile SDK version</p>
  - `appVersion` string, required — <p>Mobile app version</p>
  - `platformName` string, required — <p>OS name (e.g. Windows, iOS, Android, ...)</p>
  - `platformVersion` string, required — <p>OS version</p>
  - `iosLiveActivityId` string — <p>Live Activity ID (Only for iOS)</p>
  - `iosLiveActivityToken` string — <p>Live Activity Token (Only for iOS)</p>
  - `uniqueIdentifier` string — <p>Field to identify existing subscription with. By default, a suitable field will be chosen automatically based on the channel type. Possible values: &quot;customAttributes.user_id&quot;, &quot;customAttributes.member_id&quot;, &quot;subscriptionId&quot;.</p>
  - `updateOnly` boolean — <p>If used it will not create new subscription it will only update existing subscription</p>

## Response `200`

Success (Updated):

- object
  - `id` string, required — <p>The Subscription ID</p>

## Other responses

- `201` — Success (Created):
- `400` — Error (Channel not found):
- `404` — Error (Update Only):

---

[API](https://skmtc.dev/cleverpush/apis/cleverpush-api-reference.md) · [All operations](https://skmtc.dev/cleverpush/apis/cleverpush-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cleverpush/cleverpush-api-reference/revisions/64ed799d2f1b/schema)
