Device Registration

In order to be able to send notifications to a smartphone user, we need the app to register with Ziik

Register App Device

# Register app device
curl -i -X POST "https://example.ziik.io/api/devices"
  -d '{"device":"thisisadeviceID","os":"iOS"}'

The above command returns 204 No Content on successful registration.

HTTP/1.0 204 No Content

This endpoint registers a device ID with the current user and specifies which smartphone OS family is used.

TIP

A user can have multiple device IDs registered, but a device ID can only be registered to one user. Registering the same device ID to a new user will remove it from the previous user.

HTTP Request

POST https://example.ziik.io/api/devices

Request Parameters

ParameterTypeRequiredDescription
deviceStringYesDevice ID
osStringYes'iOS' or 'android'

Permissions Required

  • Authenticated user

Unregister App Device

# Unregister app device
curl -i -X DELETE "https://example.ziik.io/api/devices"
  -d '{"device":"thisisadeviceID"}'

The above command returns 204 No Content on successful unregistration.

HTTP/1.0 204 No Content

This endpoint unregisters a device ID from the current user.

HTTP Request

DELETE https://example.ziik.io/api/devices

Request Parameters

ParameterTypeRequiredDescription
deviceStringYesDevice ID

Permissions Required

  • Authenticated user