Create Device to Send Push Notifications
This request creates a device for sending out push notifications.
post | /push/devices |
Sample
A sample POST request to create a device:
curl -X POST \
'https://api.carrierx.com/core/v2/push/devices' \
-H 'Content-Type: application/json' \
--data-binary '{"application_sid":"b3edc875-f73c-4c48-895a-8697b92b8d07", "type":"ios", "token":"1111"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'
Response
200
status code with a serialized copy of the Device object:
{
"application_sid": "b3edc875-f73c-4c48-895a-8697b92b8d07",
"application_version": "",
"device_sid": "56d485ae-0693-421a-91eb-6b02b152573a",
"environment": "production",
"os_version": "",
"partner_sid": "e00430c3-a7d0-4666-ab5c-f7202448382f",
"token": "1111",
"type": "ios"
}
Required Scopes
To create a Device object, the partner must have one of the following scopes enabled:
push.manage
push.create
Query Arguments
Parameter | Data Type | Description |
---|---|---|
reuse | boolean | Whether the system will search for an existing device with the same parameters (i.e., token , type and environment ).
true . |
Body Arguments
JSON representation of the fields and values of the Device object to be created.
note
Note that the environment
value will be set to production
unless otherwise specified.
Required fields to create a device are:
device_sid
token
type
Refer to this table to view all fields that appear in the Device object.