Tuya · Schema

Tuya Device

Represents an IoT device registered to a Tuya cloud project, including its attributes, current status, and association with a user and product.

IoTSmart HomeDevicesCloud PlatformAutomationIndustrial IoTDevice Management

Properties

Name Type Description
id string Unique device identifier assigned by Tuya
name string Friendly display name for the device
uid string Owner user ID
local_key string Local encryption key for direct LAN communication
category string Device product category code (e.g., dj=smart bulb, kg=switch)
product_id string Product ID in the Tuya product catalog
product_name string Human-readable product name
sub boolean Whether this device is a sub-device connected via a gateway
uuid string Device UUID (hardware identifier)
owner_id string Identifier of the home or asset that owns this device
online boolean Whether the device is currently online and reachable
status array Current values of all device data points
active_time integer Unix timestamp (seconds) of when the device was first activated
create_time integer Unix timestamp (seconds) of device record creation
update_time integer Unix timestamp (seconds) of last device update
time_zone string Time zone of the device location (IANA format)
ip string IP address of the device when last online
View JSON Schema on GitHub

JSON Schema

tuya-device-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developer.tuya.com/schemas/tuya/device.json",
  "title": "Tuya Device",
  "description": "Represents an IoT device registered to a Tuya cloud project, including its attributes, current status, and association with a user and product.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique device identifier assigned by Tuya"
    },
    "name": {
      "type": "string",
      "description": "Friendly display name for the device"
    },
    "uid": {
      "type": "string",
      "description": "Owner user ID"
    },
    "local_key": {
      "type": "string",
      "description": "Local encryption key for direct LAN communication"
    },
    "category": {
      "type": "string",
      "description": "Device product category code (e.g., dj=smart bulb, kg=switch)"
    },
    "product_id": {
      "type": "string",
      "description": "Product ID in the Tuya product catalog"
    },
    "product_name": {
      "type": "string",
      "description": "Human-readable product name"
    },
    "sub": {
      "type": "boolean",
      "description": "Whether this device is a sub-device connected via a gateway"
    },
    "uuid": {
      "type": "string",
      "description": "Device UUID (hardware identifier)"
    },
    "owner_id": {
      "type": "string",
      "description": "Identifier of the home or asset that owns this device"
    },
    "online": {
      "type": "boolean",
      "description": "Whether the device is currently online and reachable"
    },
    "status": {
      "type": "array",
      "description": "Current values of all device data points",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Data point identifier code (e.g., switch_led, bright_value)"
          },
          "value": {
            "description": "Current value of the data point, type varies by code"
          }
        },
        "required": ["code", "value"]
      }
    },
    "active_time": {
      "type": "integer",
      "description": "Unix timestamp (seconds) of when the device was first activated"
    },
    "create_time": {
      "type": "integer",
      "description": "Unix timestamp (seconds) of device record creation"
    },
    "update_time": {
      "type": "integer",
      "description": "Unix timestamp (seconds) of last device update"
    },
    "time_zone": {
      "type": "string",
      "description": "Time zone of the device location (IANA format)"
    },
    "ip": {
      "type": "string",
      "description": "IP address of the device when last online"
    }
  },
  "required": ["id", "name", "category", "product_id", "online"]
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema 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.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/tuya-device"
All schemas
curl "https://apis.io/api/v1/json-schemas?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.