---
title: "Device (by mac) Metadata"
method: PUT
path: "/v2/partition/{partitionId}/account/{accountId}/device/{macAddress}/metadata"
tags: ["Account Device"]
---

# Device (by mac) Metadata

`PUT /v2/partition/{partitionId}/account/{accountId}/device/{macAddress}/metadata`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/device/{macAddress}/metadata`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/device/:macAddress/metadata/put.ts> (a function with typed inputs; its response is checked against the schema)

Use to update device (mac) metadata.  This endpoint is used primarily to add <a href="#/~operation/Reference%20Resources/getSideCarTypes">SideCars</a> to your device. MacAddress, partitionId, accountId, deviceTypeId, and id are all immutable fields. Changing the provisionerType is currently not supported. Updating the adminPassword will only have an effect if the partition's Device Configuration setting (DevCon) does not supply an adminPassword. The DevCon settings can only be altered by an Alianza Admin.

## Path parameters

- `accountId` string, required
- `macAddress` string, required
- `partitionId` string, required

## Request body

- DeviceMetadataX
  - `macAddress` string: The 48-bit hexadecimal address assigned to the device by the manufacturer.
  - `partitionId` string: ID of partition, reference to <a href="#/~schema/Account">account.partitionId</a>
  - `accountId` string: ID of account, refers to <a href="#/~schema/Account">account.id</a>
  - `deviceTypeId` string: The deviceTypeId identifies the equipment and the features that the device supports. Refers to <a href="#/~schema/DeviceTypeX">deviceType.id</a>. See also: <a href="#/~operation/Reference%20Resources/getDeviceTypes">Get All DeviceType</a> and <a href="#/~operation/Reference%20Resources/getDeviceTypeById">GetDeviceType</a>
  - `sideCarTypeId` string: The sideCarTypeId identifies the equipment and the features of the side car device. Refers to <a href="#/~schema/SideCarTypeX">sideCarType.id</a>. See also: <a href="#/~operation/Reference%20Resources/getSideCarTypes">Get All SideCar types</a> and <a href="#/~operation/Reference%20Resources/getSideCarTypeById">Get SideCarType</a>
  - `numSideCars` integer: The number of side cars assigned to this device.
  - `adminPassword` string: If an admin password is supplied here, it will be applied to the device if a partition level setting is not present. The partition level setting can only be modified by an Alianza Admin. The partition level setting (Devcon - short for device configuration) is almost always supplied, making most uses of this field irrelevant. The adminPassword set by Devcon is NOT reported in this field.
  - `provisionerType` 'ALIANZA' | 'PHONISM': Indicates what entity is responsible for provisioning the device. ALIANZA - Alianza is responsible for provisioning the device. PHONISM - Phonism, a third party service, is responsible for provisioning the device.
  - `id` string: This field always refers to the macAddress.

## Response `200`

Successful operation

- DeviceMetadataX
  - `macAddress` string: The 48-bit hexadecimal address assigned to the device by the manufacturer.
  - `partitionId` string: ID of partition, reference to <a href="#/~schema/Account">account.partitionId</a>
  - `accountId` string: ID of account, refers to <a href="#/~schema/Account">account.id</a>
  - `deviceTypeId` string: The deviceTypeId identifies the equipment and the features that the device supports. Refers to <a href="#/~schema/DeviceTypeX">deviceType.id</a>. See also: <a href="#/~operation/Reference%20Resources/getDeviceTypes">Get All DeviceType</a> and <a href="#/~operation/Reference%20Resources/getDeviceTypeById">GetDeviceType</a>
  - `sideCarTypeId` string: The sideCarTypeId identifies the equipment and the features of the side car device. Refers to <a href="#/~schema/SideCarTypeX">sideCarType.id</a>. See also: <a href="#/~operation/Reference%20Resources/getSideCarTypes">Get All SideCar types</a> and <a href="#/~operation/Reference%20Resources/getSideCarTypeById">Get SideCarType</a>
  - `numSideCars` integer: The number of side cars assigned to this device.
  - `adminPassword` string: If an admin password is supplied here, it will be applied to the device if a partition level setting is not present. The partition level setting can only be modified by an Alianza Admin. The partition level setting (Devcon - short for device configuration) is almost always supplied, making most uses of this field irrelevant. The adminPassword set by Devcon is NOT reported in this field.
  - `provisionerType` 'ALIANZA' | 'PHONISM': Indicates what entity is responsible for provisioning the device. ALIANZA - Alianza is responsible for provisioning the device. PHONISM - Phonism, a third party service, is responsible for provisioning the device.
  - `id` string: This field always refers to the macAddress.

## Other responses

- `400`: Invalid update object supplied
- `401`: Unauthorized
- `404`: PartitionId, AccountId, or MacAddress is not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
