# Metadata

## Set metadata value

Publish topic **meta/`NAME`**, payload: value in plain text (i.e. `123`, `hello` or `3.1415926`)

* `NAME` - the metadata name

The device can set the value of such field types:

* System fields
  * `Hotspot Name`
  * `Time Zone` - no validation of input!
* Custom fields
  * `Text`
  * `Number`
  * `Table`
  * `IMEI`
  * `ICCID`

```bash
mosquitto_pub -h blynk.cloud -p 8883 -u device -P '{DEVICE_TOKEN}' -t 'meta/Serial Number' -m '12345'
```

## Subscribe to metadata updates

Subscribe to topic: **downlink/meta/`NAME`** (or to a wildcard topic like **downlink/meta/#**)

* `NAME` - the metadata name

```bash
mosquitto_sub -h blynk.cloud -p 8883 -u device -P '{DEVICE_TOKEN}' -t 'downlink/meta/Device Name'
```

## Request metadata value from Blynk

Subscribe to topic: **downlink/meta/`NAME`** (or to a widcard topic like **downlink/meta/#**)

* `NAME` - the metadata name

Publish topic **get/meta**, payload: metadata names separated by comma (i.e. `Ceiling Height,Room Volume`)

```bash
mosquitto_pub -h blynk.cloud -p 8883 -u device -P '{DEVICE_TOKEN}' -t 'get/meta' -m 'Serial Number,Time Zone'
```

## Supported Metadata types

The device can request the value of such field types:

* System fields
  * `Device Name`
  * `Device Owner` (owner's email)
  * `Hotspot Name`
  * `Location`
  * `Time Zone`
* Custom fields
  * `Text`
  * `Number`
  * `Contact`
  * `Switch`
  * `Device Reference` - works but not insightful (returns Device ID)
  * `List`
  * `Table`
  * `IMEI`
  * `ICCID`
  * `Email`
  * `Image`
  * `Device EUI`
  * `Join EUI`
  * `Application Key`&#x20;
  * `Blues Device`
  * `Myriota Terminal ID`
  * `TheThingsNetwork Device ID`
  * `Thing Name`&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blynk.io/en/blynk.cloud-mqtt-api/device-mqtt-api/metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
