Skip to main content
POST

Overview

This endpoint allows you to create a new device or update an existing one using its unique identifier. When a device with the given identifier already exists, the provided fields will be updated. When no device exists with that identifier, a new device is created.
  • New devices require both identifier and type.
  • Existing devices can be updated by providing identifier along with any fields to change (type, properties).

Authentication

x-api-key
string
required
Your organization’s API key

Request Body

identifier
string
required
A unique identifier for the device. Must be a non-empty string.
type
string
The device type (e.g., "sensor", "gateway", "controller"). Required when creating a new device. Optional when updating an existing device.
properties
object
Optional metadata object containing additional device properties.

Response

success
boolean
Indicates whether the operation was successful.
message
string
A human-readable message describing the result.
deviceId
string
The unique ID of the created or updated device.
identifier
string
The identifier of the device.
type
string | null
The device type.

Examples

Create a New Device

Update an Existing Device

Response

Status Codes

CodeDescription
200Device successfully created or updated
400Validation error (missing or invalid fields, invalid JSON)
401Authentication error (missing or invalid API key)
500Internal server error