POST
/
subscriptions.json
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 1e0bad9d9830c038ea19f12d83fca4e984012bba" \
-d '{  
  "notification_channel":"apns",
  "push_token":{  
    "environment":"development",
    "client_identification_sequence":"1054929587f29c856fa0137f634cc0a5ec77901f4baaf2f3c1785d05ae114455",
    "bundle_identifier":"com.quickblox.myawesomeapp"
  },
  "device":{  
    "platform":"ios",
    "udid":"2343af3433aa3a4fsv"
  }
}' \
https://api.quickblox.com/subscriptions.json
[
  {
    "subscription": {
      "id": 59715257,
      "device": {
        "udid": "2343af3433aa3a4fsv",
        "client_identification_sequence": "1054929587f29c856fa0137f634cc0a5ec77901f4baaf2f3c1785d05ae114455",
        "platform": {
          "name": "ios"
        },
        "bundle_identifier": "com.quickblox.myawesomeapp"
      },
      "notification_channel": {
        "name": "apns"
      }
    }
  }
]

A single user can have up to 10 subscriptions on different devices.

Body Parameters

notification_channel
string
required
Declare which notification channels could be used to notify user about events. Possible values are: apns, apns_voip, gcm, and email.
push_token
object
device
object

Headers

QB-Token
string
required
A user or application session token. See our Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.

Responses

curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 1e0bad9d9830c038ea19f12d83fca4e984012bba" \
-d '{  
  "notification_channel":"apns",
  "push_token":{  
    "environment":"development",
    "client_identification_sequence":"1054929587f29c856fa0137f634cc0a5ec77901f4baaf2f3c1785d05ae114455",
    "bundle_identifier":"com.quickblox.myawesomeapp"
  },
  "device":{  
    "platform":"ios",
    "udid":"2343af3433aa3a4fsv"
  }
}' \
https://api.quickblox.com/subscriptions.json
[
  {
    "subscription": {
      "id": 59715257,
      "device": {
        "udid": "2343af3433aa3a4fsv",
        "client_identification_sequence": "1054929587f29c856fa0137f634cc0a5ec77901f4baaf2f3c1785d05ae114455",
        "platform": {
          "name": "ios"
        },
        "bundle_identifier": "com.quickblox.myawesomeapp"
      },
      "notification_channel": {
        "name": "apns"
      }
    }
  }
]