Actions60
- Alarm Actions
- Asset Actions
- Customer Actions
- Dashboard Actions
- Device Actions
- Entity Group Actions
- Relation Actions
- Telemetry Actions
Device → Create
AI-generatedSummary
Create a new device or update an existing device in ThingsBoard using field parameters or a full JSON payload.
Inputs
- Input Mode — Choose whether to define the device using form fields ('Params') or a full JSON object ('Full JSON').
- Name (required) — The name of the device. Required when Input Mode is set to Params.
- Type — Device type corresponding to a device profile name in ThingsBoard.
- Label — Optional descriptive label for the device.
- Customer ID — ID of the customer to assign the device to.
- Access Token — Optional custom access token for device authentication; autogenerated by ThingsBoard if omitted.
- Device JSON (required) — Full ThingsBoard device JSON object payload. Required when Input Mode is set to Full JSON; include an 'id' field to update an existing device.
Output shape
a single record
Returns the complete created or updated ThingsBoard device object, including system-generated properties such as id, tenantId, customerId, and createdTime.
Examples
Example 1: Create a basic device using field parameters
Set Input Mode to Params, Name to 'Sensor-01', and Type to 'Thermometer'.
Example 2: Create a device assigned to a customer with a custom access token
Set Input Mode to Params, Name to 'Gateway-01', Customer ID to '784f394c-42b6-435a-983c-b7beff2784f9', and Access Token to 'custom-token-123'.
Example 3: Update an existing device using a JSON payload
Set Input Mode to Full JSON and provide the device object JSON including its ID.