Navigation

Update device metadata

Update metadata for an existing device. Supply the unique device ID issued when you attach a device.

Parameters


metadata_fields object

The custom metadata to be appended to the pre-existing device metadata.


Returns


Returns a success message.
POST /v2/device/:id/metadata
import axios from 'axios';

const { data } = await axios.post(
  'https://api.rupt.dev/v2/device/DEVICE_ID/metadata',
  { metadata_fields: { key: "value" } },
  { headers: { Authorization: `Bearer ${API_SECRET}` } }
);
Response
{ 
  "success": true
}