Update Command Template
Purpose
To update a command template properties.
Endpoints
Copied
PUT/commandtemplates/{command_template_id}Request Details
Request URL
{api-domain}/iot/{version}/commandtemplates/{command_template_id}
Note: "api-domain" must be replaced with your application domain e.g. "app1234xxxx.zohoiot.in"
Headers
Authorization: Zoho-oauthtoken {{oauth}}
Scope
scope=ZohoIOT.modules.commands.{operation_type}
or
scope=ZohoIOT.modules.ALL
Possible operation types
ALL - Full access to the record
PUT - Update command for a model
Sample Request: First API Call
Copied{
"commandtemplates": {
"id": "44000000197001",
"unit": null,
"timeout": {
"name": "10 Seconds",
"id": "10"
},
"command_name": "command 2",
"edge_command_key": {
"label": "test",
"value": "test",
"parsing_type": "direct"
},
"input_type": {
"name": "Toggle On Off",
"id": "toggle",
"label": "Toggle On Off",
"type": "toggle",
"properties": {
"toggle_option": {
"true": {
"label": "on",
"customise_message": "on"
},
"false": {
"label": "off",
"customise_message": "off"
}
},
"default_value": "on"
},
"data_type": "Boolean"
},
"parent_model": {
"info": {
"id": "44000000155617",
"image": "9n8pm3e956d6f4f2d48d5bd681932759abd6a",
"label": "Test",
"module": {
"api_name": "devices"
}
},
"type": "model"
},
"command_descriptive_text": null,
"command_kind": {
"name": "On/Off",
"icon": "dp-status-on-off",
"id": "44000000087947"
},
"command_status": {
"icon": "tick-circle",
"name": "Active",
"id": true,
"value": true,
"color_code": "#00A38D"
},
"command_retain": false
}
}Response to the First API Call
Copied{
"commandtemplates": [
{
"code": "SUCCESS",
"Created_Time": "2025-12-10T12:51:43",
"command_name": "command 2",
"id": "44000000197001",
"message": "record updated",
"status": "success"
}
]
}