Skip to main content
POST

Overview

Assigns multiple devices to a single customer in one request. This is the bulk variant for assigning devices — use this when provisioning several devices for the same customer. Features:
  • Assign multiple devices to one customer in a single call
  • Auto-creates the customer if they don’t exist
  • Optional auto-create for devices (requires deviceType)
  • Reports which devices were newly assigned, already assigned, or skipped

Authentication

string
required
Your organization’s API key

Request Body

string
required
The email address of the customer to assign devices to. Must be a valid email format.
array
required
Array of device identifiers (e.g., serial numbers, MAC addresses) to assign. Must be a non-empty array.
boolean
default:false
If true, creates devices automatically if they don’t exist in the system. Defaults to false.
string
Required when autoCreateDevices is true. Specifies the device type (e.g., “sensor”, “Thermostat”, “Gateway”).

Response

boolean
Indicates if the operation was successful
string
Description of the operation result
string
The unique identifier of the customer in Telemetron
boolean
Indicates whether the customer was created during this operation
array
Array of devices that were newly assigned in this request
array
Array of devices that were already assigned to this customer (no-op)
array
Array of device identifier strings that were not found in the system (when autoCreateDevices is false)

Examples

Basic Bulk Assignment

With Auto-Create Devices

Response

Status Codes

Implementation Notes

  • Idempotent: Devices already assigned to the customer are reported in alreadyAssigned — no duplicates are created
  • Auto-create customer: The customer is automatically created if they don’t exist
  • Partial success: The response details which devices were assigned, already assigned, or skipped, allowing you to handle each case
  • Skipped devices: When autoCreateDevices is false, unknown device identifiers are returned in the skipped array
Required: When autoCreateDevices is true, you must provide deviceType or the request will fail with a 400 error.