Push Sample Requests
Recipient ("to") Address Format
Using contact as recipient |
"to": "contact:MtvI9VNHFpTC6hiBJOXPm" |
---|---|
Using contact group as recipients | "to": "group:JghtypeokhiBJOXPmTREUxc" |
Using device token along with application ID |
"to": "push:etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7hwCPfcir5ynmKiMSplJcpEwy0y kOYv86ocFhTJzav37ZCILAFEvaTDHs eHUFbJD751r8tozRmAHHQKy-smZVjrXG2QCT5me3gOsqClqn_11JGXBGvEXOCmh BjkrRYo8v-@scg-push-msg-for-demo-apps@FCM"
"to": "push:etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7hwCPfcir5ynmKiMSplJcpEwy0y kOYv86ocFhTJzav37ZCILAFEvaTDHs eHUFbJD751r8tozRmAHHQKy-smZVjrXG2QCT5me3gOsqClqn_11JGXBGvEXOCmh BjkrRYo8v-@scg-push-msg-for-demo-apps@APN"
|
Using device token |
"to": "psh:fcm@x7kYRtLG8MVwV8igNzOnv6@etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7 hwCPfcir5ynmKiMSplJcpEwy0ykOYv86ocFhTJzav37ZCILAFEvaTDHseHUFbJD751r8tozRm AHHQKy-smZVjrXG2QCT5me3gOsqClqn_11JGXBGvEXOCmhBjkrRYo8v-"
"to": "psh:apn@x7kYRtLG8MVwV8igNzOnv6@etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7hw CPfcir5ynmKiMSplJcpEwy0ykOYv86ocFhTJzav37ZCILAFEvaTDHseHUFbJD751r8tozRmAHHQ Ky-smZVjrXG2QCT5me3gOsqClqn_11JGXBGvEXOCmhBjkrRYo8v- |
Group of recipients |
"to": [ [ "contact:MtvI9VNHFpTC6hiBJOXPm", "push:etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7hwCPfcir5ynmKiMSplJcpEwy0ykOYv86ocFhT Jzav37ZCILAFEvaTDHseHUFbJD751r8tozRmAHHQKy-smZVjrXG2QCT5me3gOsqClqn_11JGXB GvEXOCmhBjkrRYo8v-@scg-push-msg-for-demo-apps@FCM", "psh:fcm@x7kYRtLG8MVwV8igNzOnv6@etSsTpXCSCGdOMc6AHtb7e:APA91bGeJk7hwCPfcir5 ynmKiMSplJcpEwy0ykOYv86ocFhTJzavUFbJD751r8tozRmAHHQKy-smZVjrXG2QCT5me3gOsqCl qn_11JGXBGvEXOCmhBjkrRYo8v-" ] |
Push Notification Types
Use Case | API Sample | Behavior |
---|---|---|
Send OS push notification |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
Notification will be recieved and processed by the device OS. Push notifications of type "os" will be delivered to the phone even if the mobile application is not open to recieve it. |
Send in-app push notification |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
Notification will be recieved within the application. |
Send silent push notification
|
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
No notification in device notification area, content goes to the Inbox. |
Badge Management
Use Case | API Sample | Behavior |
---|---|---|
Use auto badge increment |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
The badge count will be automatically incremented by 1.
|
Specify badge value to be set |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
The badge count will be set to the number specified.
|
Sound Management
Use Case | API Sample | Behavior |
---|---|---|
Use default sound |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
System sounds will be played upon receipt of push notification. |
Use speicified sound file |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ |
|
Media Attachments
Use Case | API Sample | Behavior |
---|---|---|
Pass an array orf media attachments |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ "attachments": [ "dRqR9h7QjD8BV5kycyfpp7" }' |
The application will receive the attachment IDs and would have to download the same onto the device. |
Body Extensions
Use Case | API Sample | Behavior |
---|---|---|
Deep Links |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ "body_extensions": [ content": "https://google.com/helloworld.html" }' |
Deep links are content URLs. |
Application Data |
curl --location --request POST 'http://api.syniverse.com/scg-external-api/api/v1/messaging/messages' \ "body_extensions": [ content": "app:data" }' |
Application data is passed as a string object for the application to interpret. |
Refer to additional information available on the Syniverse Knowledge Base on how to pass additional application data for Apple Push Notifications (APN).