> For the complete documentation index, see [llms.txt](https://docs.blynk.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blynk.io/en/blynk.cloud-mqtt-api/device-mqtt-api/metadata.md).

# 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`
  * `Blues Device`
  * `Myriota Terminal ID`
  * `TheThingsNetwork Device ID`
  * `Thing Name`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
