# Template MetaFields

Template metadata field management

## Get template metadata fields

> Retrieve all metadata fields defined in a template.\
> \
> Required permissions, when user-scoped authentication is used: \`PRODUCT\_VIEW\`.<br>

```json
{"openapi":"3.0.3","info":{"title":"Blynk Platform API","version":"1.0.0"},"tags":[{"name":"Template MetaFields","description":"Template metadata field management"}],"servers":[{"url":"https://{server_address}","description":"Blynk Server","variables":{"server_address":{"default":"blynk.cloud","description":"Your Blynk server domain"}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"OAuth2 Bearer token obtained from authentication endpoint"}},"schemas":{"TemplateMetaField":{"type":"object","properties":{"id":{"type":"integer","format":"int32","description":"MetaField ID"},"name":{"type":"string","description":"MetaField name"},"type":{"type":"string","description":"MetaField type","enum":["MultiText","Text","Email","Number","Range","Shift","Switch","Cost","Contact","Measurement","Time","Coordinates","Address","List","Table","DeviceReference","Location","Tz","Image","DeviceName","DeviceOwner","HotspotName","Imei","ICCID","Int","DeviceEui","JoinEui","ApplicationKey","BluesDevice","OTASettings","TheThingsNetwork","MyriotaTerminalId","ThingName"]},"description":{"type":"string","description":"MetaField description"},"hint":{"type":"string","description":"MetaField hint for the provisioning form"},"icon":{"type":"string","description":"MetaField icon"}},"required":["id","name","type"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"Error message"}},"required":["message"]}},"required":["error"]}}},"paths":{"/api/v1/organization/template/metafields":{"get":{"tags":["Template MetaFields"],"summary":"Get template metadata fields","description":"Retrieve all metadata fields defined in a template.\n\nRequired permissions, when user-scoped authentication is used: `PRODUCT_VIEW`.\n","operationId":"getTemplateMetaFields","parameters":[{"name":"templateId","in":"query","required":true,"schema":{"type":"integer","format":"int32"},"description":"Template ID"}],"responses":{"200":{"description":"List of metadata fields","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TemplateMetaField"}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden"},"404":{"description":"Template not found or access denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too many requests"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```


---

# 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/platform-https-api/template-metafields.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.
