Skip to content

Control One Relay (Planned for Removal)

Compatibility endpoint

This endpoint remains available for existing integrations and will be removed in a future version. New integrations should use Execute Relay Command, which uses one array structure for both single- and multi-relay control.

Each call still counts as a separate device command. Use the recommended endpoint to combine relay changes that should be sent together.

Endpoint

http
POST /wlte/v1/devices/{deviceId}/relays/{index}/commands

Authorization Requirements

ScopeRequiredDescription
device:controlYesControl a relay on the target device

Request

http
POST {baseUrl}/wlte/v1/devices/{deviceId}/relays/{index}/commands
Authorization: Bearer {accessToken}
Content-Type: application/json
Accept: application/json
Idempotency-Key: <caller-generated unique string>
Path parameterTypeRequiredDescription
deviceIdstringYesDevice ID
indexintegerYesRelay index starting from 1
json
{
  "action": "ON"
}

action accepts ON, OFF, or JOG. The Idempotency-Key rules are the same as for the recommended endpoint.

Success Response

json
{
  "code": "COMMAND_ACCEPTED",
  "message": "Command accepted.",
  "requestId": "req_001",
  "data": {
    "id": "cmd_001",
    "deviceId": "abc123456789",
    "relayIndex": 1,
    "action": "ON",
    "status": "SUCCESS",
    "createdAt": "2026-07-15T08:30:00Z"
  }
}

The response includes Deprecation: true and a Link header pointing to the recommended multi-relay endpoint. To migrate, combine the path index and body action as follows:

json
{
  "relays": [
    { "index": 1, "action": "ON" }
  ]
}

To check the result later, call Get Command Result with data.id.

Error Responses

Possible responses include 400 INVALID_REQUEST, 401 AUTH_REQUIRED, 401 AUTH_INVALID, 401 AUTH_EXPIRED, 403 AUTH_SCOPE_DENIED, 404 DEVICE_NOT_FOUND, 409 DEVICE_BUSY, 409 IDEMPOTENCY_CONFLICT, 422 COMMAND_REJECTED, 422 DEVICE_OFFLINE, 429 RATE_LIMITED, 503 GATEWAY_UNAVAILABLE, and 500 INTERNAL_ERROR.

Docs buildVersion v1.3.6-20260720-180213-70
Copyright © 2026 WLTE