Tuya · JSON Structure
Tuya Device Structure
Structure documentation for the Tuya Device resource returned by the Device Management API
Type: object
Properties: 0
IoTSmart HomeDevicesCloud PlatformAutomationIndustrial IoTDevice Management
TuyaDevice is a JSON Structure definition published by Tuya.
Meta-schema:
JSON Structure
{
"name": "TuyaDevice",
"description": "Structure documentation for the Tuya Device resource returned by the Device Management API",
"type": "object",
"fields": [
{"name": "id", "type": "string", "required": true, "description": "Unique device identifier assigned by Tuya platform"},
{"name": "name", "type": "string", "required": true, "description": "Friendly display name for the device"},
{"name": "uid", "type": "string", "required": false, "description": "Owner user ID"},
{"name": "local_key", "type": "string", "required": false, "description": "Encryption key for local LAN communication"},
{"name": "category", "type": "string", "required": true, "description": "Product category code (e.g., dj=bulb, kg=switch, wk=thermostat)"},
{"name": "product_id", "type": "string", "required": true, "description": "Product identifier in Tuya catalog"},
{"name": "product_name", "type": "string", "required": false, "description": "Human-readable product name"},
{"name": "sub", "type": "boolean", "required": false, "description": "True if device connects via a gateway (sub-device)"},
{"name": "uuid", "type": "string", "required": false, "description": "Hardware UUID for device identification"},
{"name": "owner_id", "type": "string", "required": false, "description": "Home or asset owner identifier"},
{"name": "online", "type": "boolean", "required": true, "description": "Current connectivity status"},
{"name": "status", "type": "array<DataPoint>", "required": false, "description": "Current values of all device data points"},
{"name": "active_time", "type": "integer (unix seconds)", "required": false, "description": "First activation timestamp"},
{"name": "create_time", "type": "integer (unix seconds)", "required": false, "description": "Record creation timestamp"},
{"name": "update_time", "type": "integer (unix seconds)", "required": false, "description": "Last update timestamp"},
{"name": "time_zone", "type": "string", "required": false, "description": "IANA time zone of device location"},
{"name": "ip", "type": "string", "required": false, "description": "Last known IP address"}
],
"nested": {
"DataPoint": {
"description": "A single device data point representing current state",
"fields": [
{"name": "code", "type": "string", "required": true, "description": "Data point identifier (e.g., switch_led, bright_value, colour_data_v2)"},
{"name": "value", "type": "any", "required": true, "description": "Current value, type varies: boolean, integer, string, or object"}
]
}
},
"example": {
"id": "bf3cf3ede9f40c09ber23p",
"name": "Living Room Smart Bulb",
"category": "dj",
"product_id": "keyjXvXiF0M2kq1Q",
"online": true,
"status": [
{"code": "switch_led", "value": true},
{"code": "work_mode", "value": "colour"},
{"code": "bright_value_v2", "value": 1000}
]
}
}
Work with this as data
Every JSON Structure here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for json structure
4 MCP tools reach this
find_json_structuresBrowse and filter every JSON Structure in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Structure
curl "https://apis.io/api/v1/json-structures/tuya-device-structure"
All json structure
curl "https://apis.io/api/v1/json-structures?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.