Skip to main content
POST
/
api
/
ext-v1
/
deviceAssignment
/
unassignDevicesFromOwner
curl -X POST https://admin.telemetron.ai/api/ext-v1/deviceAssignment/unassignDevicesFromOwner \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "john.doe@example.com",
    "deviceIdentifiers": ["SN-001", "SN-002"]
  }'
{
  "success": true,
  "message": "Successfully unassigned 1 device(s) from customer",
  "customerId": "cust_abc123",
  "unassignedDevices": ["SN-001"],
  "skipped": ["SN-002"],
  "devicesRemaining": ["SN-003"]
}

Overview

Removes multiple device-to-customer assignments in a single request. This is the bulk variant for unassigning devices — use this when removing several devices from the same customer at once. Both the device and customer records remain in the system; only the associations are removed.
After unassignment, device telemetry will no longer route to this customer. Reassign devices to a new owner if they are still active.

Authentication

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

Request Body

customerEmail
string
required
The email address of the customer to unassign devices from. Must be a valid email format.
deviceIdentifiers
array
required
Array of device identifiers (e.g., serial numbers, MAC addresses) to unassign. Must be a non-empty array.

Response

success
boolean
Indicates if the operation was successful
message
string
Description of the operation result
customerId
string
The unique identifier of the customer
unassignedDevices
array
Array of device identifier strings that were successfully unassigned
skipped
array
Array of device identifier strings that were not assigned to this customer (no-op)
devicesRemaining
array
Full list of device identifiers still assigned to the customer after the operation

Examples

Bulk Unassignment

curl -X POST https://admin.telemetron.ai/api/ext-v1/deviceAssignment/unassignDevicesFromOwner \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "john.doe@example.com",
    "deviceIdentifiers": ["SN-001", "SN-002"]
  }'

Response

{
  "success": true,
  "message": "Successfully unassigned 1 device(s) from customer",
  "customerId": "cust_abc123",
  "unassignedDevices": ["SN-001"],
  "skipped": ["SN-002"],
  "devicesRemaining": ["SN-003"]
}
curl -X POST https://admin.telemetron.ai/api/ext-v1/deviceAssignment/unassignDevicesFromOwner \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "customerEmail": "john.doe@example.com",
    "deviceIdentifiers": ["SN-001", "SN-002"]
  }'
{
  "success": true,
  "message": "Successfully unassigned 1 device(s) from customer",
  "customerId": "cust_abc123",
  "unassignedDevices": ["SN-001"],
  "skipped": ["SN-002"],
  "devicesRemaining": ["SN-003"]
}

Status Codes

CodeDescription
200Devices successfully unassigned from customer
400Invalid request (missing required fields or empty array)
401Invalid or missing API key
404Customer not found in your organization
500Internal server error

Implementation Notes

  • Non-destructive: Customer and device records persist; only the assignments are removed
  • Partial success: The response details which devices were unassigned vs. skipped, so you can handle each case
  • Skipped devices: Devices not currently assigned to the customer are returned in the skipped array
  • Remaining devices: The devicesRemaining array shows the full list of devices still assigned after the operation

Common Use Cases

  • Bulk device returns: Unassign all returned devices from a customer in one call
  • Account decommissioning: Remove all device assignments when closing a customer account
  • Fleet reassignment: Unassign devices from one owner before reassigning to another
Bulk Transfer Pattern: Unassign devices from old owner with this endpoint → Assign to new owner with Assign Devices to Owner.