Skip to main content
POST
Create a Device

Authorizations

Authorization
string
header
required

A user API token, or a product API key created in a product's settings.

A product API key only works on the routes for its own product, under /api/orgs/{org_name}/products/{product_name}, and on /api/devices/{identifier} for that product's devices. What it may do there is decided by the role it holds, the same way a member's role decides what they may do.

Path Parameters

org_name
string
required

Organization Name

product_name
string
required

Product Name

Body

application/json

Device creation request body

POST body for creating a Device in the product in the path. Fields not listed here are ignored.

The device's fields are also read from the top level of the body when it has no device object.

device
object
shared_secret
boolean

Also create the device's own shared secret, in the same transaction. The key and secret are returned as data.shared_secret, the only time the secret is returned. When device shared secrets are not enabled on this platform, the request is refused and no device is created.

Response

Device Response

Response schema for a created Device

data
Device · object
Example: