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
POST /wlte/v1/devices/{deviceId}/relays/{index}/commandsAuthorization Requirements
| Scope | Required | Description |
|---|---|---|
device:control | Yes | Control a relay on the target device |
Request
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 parameter | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Device ID |
index | integer | Yes | Relay index starting from 1 |
{
"action": "ON"
}action accepts ON, OFF, or JOG. The Idempotency-Key rules are the same as for the recommended endpoint.
Success Response
{
"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:
{
"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.
