Skip to content

Devices

Vadim Sokoltsov edited this page Apr 6, 2017 · 1 revision

POST /api/v1/devices

Authorization required

Creates new device to authorization

Request parameters

  • token - type: string - device authorizations token

Errors

token - can't be blank

Request example

POST /api/v1/devices HTTP/1.1
Host: dockerhost:3000
Content-Type: application/json
uprogresstoken: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MX0.DeefNqb69orzcJu8RIq9ClD4ZPTOF1R6yC1ABiBB6BY
Cache-Control: no-cache

{
	"device": {
		"token": "12345"
	}
}

Success response example

{
  "success": true
}

Failed response example

{
  "errors": {
    "token": [
      "can't be blank"
    ]
  }
}

Clone this wiki locally