PUT /api/client_devices

register a device to the current logged in user. Client devices are referenced by registration_id and notification_type

Success Response Code: 204

Params

Param name Description
registration_id
required

id for the device


Value: Must be a String
notification_type
optional

notification type (default='main')


Value: Must be one of: <code>main</code>, <code>conversations</code>.
client_device
optional

Value: Must be a Hash
client_device[push_enabled]
optional

whether any pushes go to this device


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[push_conversation_activity]
optional

whether this device should receive push notifications for conversations


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[push_mentions]
optional

whether this device should receive push notifications for @ mentions


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[push_announcements]
optional

whether this device should receive push notifications for broadcast messages


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[push_replies]
optional

whether this device should receive push notifications for message replies


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[push_hashtags]
optional

whether this device should receive push notifications for subscribed hashtags


Value: Must be one of: <code>true</code>, <code>false</code>.
client_device[os_version]
optional

the OS version of the registered device (if applicable)


Value: Must be a String
client_device[client_version]
optional

the version of the app on the registered device (if applicable)


Value: Must be a String

Example Curl Commands

curl -X PUT -v --basic -u "emily@socialcast.com:demo" https://demo.socialcast.com/api/client_devices.json -F "registration_id=token-1" -F "client_device[push_replies]=true"