Skip to main content
POST

Overview

This endpoint allows you to update the metadata (properties) for up to 1,000 devices in a single request. Devices are identified by their serial/identifier and scoped to your organization via API key.
This performs a full replacement of deviceMetadata for each device — it does not merge with existing metadata. To preserve existing properties, the caller must include them in the payload.
  • Only existing devices are updated; no devices are created. Unrecognized identifiers are reported as not_found.
  • All matching devices are updated in a single SQL statement for efficiency.
  • updatedAt is set to the current time for all updated devices.

Authentication

string
required
Your organization’s API key

Request Body

Record<string, Record<string, unknown>>
required
Object mapping device identifiers (serials) to their new metadata properties. Each value must be a JSON object.

Constraints

  • devices must contain at least 1 entry
  • Maximum 1,000 devices per request
  • Each metadata value must be a JSON object (not null, array, or primitive)
  • Identifier keys are trimmed of leading/trailing whitespace before matching

Response

200 OK — Success

boolean
Always true on a 200 response.
number
Count of devices that were found and updated.
number
Count of identifiers that matched no device in the organization.
BulkMetadataResponseItem[]
Per-identifier result in the same order as the input keys.

BulkMetadataResponseItem

400 Bad Request

Possible messages:

401 Unauthorized

500 Internal Server Error

Examples

Status Codes