Teqlogy API

Build on your Teqlogy devices

Read live data, switch relays, set meter quotas, schedule resets and listen to every change — from your own scripts, dashboards and systems. A plain REST API with JSON, a WebSocket for live events, and personal API keys with clear access levels.

Base URLhttps://teqhome.teqlogy.com

Choose your device

Each device has its own page with every endpoint, field, command and event that applies to it.

Quick start

1
Get a key
Dashboard → API Keys → Generate Key. Copy it: it is shown once.
2
Call the API
List your devices with one request, using the key in the Authorization header.
3
Open your device page
PowerMatrix-8 or EnergyMate: every endpoint, field and WebSocket message of that device.
bash
export KEY=tk_live_…

curl "https://teqhome.teqlogy.com/api/devices/me" \
  -H "Authorization: Bearer $KEY"
json · the answer
{
  "ok": true,
  "devices": [
    {
      "deviceId": "aabbcc112233",
      "name": "Living Room",
      "type": "PowerMatrix-8",
      "status": true,
      "relays": [1, 0, 1, 0, 0, 0, 0, 0]
    },
    "…"
  ]
}

Authentication

Every request carries your personal API key in the Authorization header. There is nothing else to sign.

http
Authorization: Bearer tk_live_<your key>
Content-Type: application/json
Formattk_live_ followed by 64 hex characters (72 characters in all)
HeaderAuthorization: Bearer tk_live_…
Storageonly a SHA-256 hash is kept on our side; the key itself is shown once, when you create it
Limitup to 10 keys per account — use one key per integration so you can revoke one without touching the others
Typesread-only or full (read-write), chosen when the key is created and never changed afterwards
Lifetimevalid for as long as the API access of your account is valid; revoking a key stops it immediately
A key is a password. Anybody who has it can do whatever its type allows, until you revoke it.

Get an API key

01
Get API access
API access is switched on per account. If the API Keys page is missing in your dashboard, ask Teqlogy support to enable it.
02
Sign in
Open the Teqlogy dashboard and sign in with the account that owns the devices.
03
Open API Keys
In the dashboard menu choose API Keys, then Generate Key.
04
Pick the type
Choose Read-only for dashboards and reports, or leave it off for a full key that can also change things.
05
Copy it now
The key is shown once. Put it in your secret store — it cannot be shown again, only replaced.

What a key can do

Keys come in two types, and some things are never available to a key at all. The rules are enforced by the server on every request, on the REST API and on the WebSocket alike — a read-only key cannot change anything, however it asks.

Read-only key

For dashboards, reports and monitoring. 14 endpoints.

  • Read your devices, their state and settings
  • Read energy history, relay history and statistics
  • Read meter readings, schedules and reports
  • Read notifications and the Away Mode state
  • Listen to every live event on the WebSocket

Cannot change anything: every write answers 403 API_KEY_READONLY, and its WebSocket sends nothing.

Full key

For the integration that has to act. All 33 endpoints.

  • Everything a read-only key can do
  • Switch relays, set timers, manage IR codes
  • Change device names and settings
  • Create and cancel meter schedules and resets
  • Record meter readings, manage notifications
  • Turn Away Mode on and off
  • Send the device commands on the WebSocket

Still limited to your own devices and to what a share allows: a view-only share stays view-only.

Login only

Never available to any key. Sign in to the app or the dashboard.

  • Your account — profile, rooms, account deletion
  • API keys — creating, listing and revoking keys (a key can never create another key)
  • Owning a device — registering, claiming, transferring and deleting a device, factory reset
  • Sharing — sharing a device with other people and withdrawing it
  • Activity log and push tokens — the audit trail of your account and your phone notification tokens
  • Firmware updates (OTA) — checking, triggering and uploading firmware
  • Store, Google Home, admin — orders, voice-assistant linking and everything in the admin panel

These answer 403 API_KEY_NOT_ALLOWED.

Every endpoint at a glance

EndpointRead-only keyFull key
Devices
GET/api/devices/me
GET/api/devices/d/:deviceId
GET/api/devices/shared-with-me
Control
POST/api/devices/:deviceId/relay
POST/api/devices/:deviceId/relay-timer
DELETE/api/devices/:deviceId/relay-timer/:relayIndex
POST/api/devices/:deviceId/ir/learn
POST/api/devices/:deviceId/ir/save
DELETE/api/devices/:deviceId/ir/:irId
Settings
PATCH/api/devices/:deviceId/preferences
History
GET/api/devices/:deviceId/energy-history
GET/api/relay-logs/:deviceId
GET/api/relay-logs/:deviceId/analytics
Meter readings
GET/api/devices/:deviceId/calibrations
POST/api/devices/:deviceId/calibrations
Schedules and reports
GET/api/meter-off/:deviceId
POST/api/meter-off/schedule
POST/api/meter-off/rule
DELETE/api/meter-off/rule/:id
DELETE/api/meter-off/:id
POST/api/resets/schedule
GET/api/resets/:deviceId
DELETE/api/resets/:id
GET/api/reset-reports/device/:deviceId
GET/api/reset-reports/:id
Notifications
GET/api/notifications
PATCH/api/notifications/:id/read
PATCH/api/notifications/read-all
DELETE/api/notifications/:id
Away Mode
GET/api/user/away-mode
POST/api/user/away-mode/enable
POST/api/user/away-mode/disable
Real time
POST/api/ws-ticket
Give a read-only key to anything that only looks. Give a full key to one integration that really has to switch things, keep it on a server, and revoke it the moment it is not needed.

Conventions

  • Requests and answers are JSON. Send Content-Type: application/json with a body.
  • Every answer has ok: true or false.
  • Dates are ISO 8601 in UTC, for example 2026-10-03T14:20:00.000Z.
  • Energy in kWh unless the name says Wh; voltage in V, current in A, power in W, frequency in Hz.

Numbering: where counting starts

Relays and meters are counted from 0 in REST requests and from 1 in what a meter reports and in WebSocket commands. Check the table before you send a number.
WhereRule
Relays (PowerMatrix-8)0-based: relay 1 on the device = index 0 … relay 8 = index 7
meters[].index in a device1-based, exactly as the device reports it: Meter 1 = 1
meterIndex in REST requests and answers (schedules, resets, reports, readings)0-based: Meter 1 = 0
meter in WebSocket commands (switchMeter, resetMeter, ampRestart)1-based: Meter 1 = 1

Rate limits

ScopeLimitWindowWhen exceeded
HTTP, all endpoints200 requests15 minutes per IP address (default; the operator may change it)429 RATE_LIMITED with a Retry-After header; RateLimit-Remaining / RateLimit-Reset tell you where you are
Meter OFF / ON schedules (create, delete)30 requests10 minutes per account429 RATE_LIMITED
Meter readings (POST calibrations)30 requests10 minutes per account429 RATE_LIMITED
WebSocket messages you send30 messages10 seconds per connectionextra messages are ignored
Request body1 MBper request—

Errors

Errors use the HTTP status first, and most carry a stable code you can switch on. The message is for humans and may change.

json
{
  "ok": false,
  "code": "API_KEY_READONLY",
  "message": "This API key is read-only: it can read data but cannot change anything.",
  "requestId": "req_a1b2c3d4e5f6g7h8"
}
Some older endpoints answer only { ok: false, message } without a code (the endpoint pages mark them “message only”). For those, rely on the HTTP status. The X-Request-Id response header carries the same id as requestId: quote it when you contact support.
codeHTTPWhen
AUTH_MISSING401No Authorization header
AUTH_INVALID401The key is not recognised (typo, revoked, or not a Teqlogy key)
API_ACCESS_DISABLED403API access is not enabled for this account
API_ACCESS_EXPIRED403The API access period of this account has ended
AUTH_BANNED403The account is suspended
AUTH_DELETED410The account has been deleted
API_KEY_READONLY403A read-only key tried to change something (REST or WebSocket)
API_KEY_NOT_ALLOWED403The endpoint (or WebSocket command) is login-only: no key can use it
DEVICE_NOT_FOUND404The device does not exist or is not yours — both look the same on purpose
DEVICE_ACCESS_DENIED403The device is shared with you as view-only
DEVICE_OFFLINE503The device is not connected, so the command could not be delivered
AWAY_MODE_ACTIVE403Away Mode is on for the device: turning something ON is blocked, turning OFF always works
VALIDATION_ERROR400A field is missing or invalid; message says which
RELAY_INDEX_INVALID400relay is not a non-negative integer
METER_OFF_UNSUPPORTED409The meter has never reported the OFF flag (firmware without scheduled OFF)
METER_OFF_OVERLAP409Another schedule of that meter already covers the time
CALIBRATION_UNSUPPORTED409The firmware has no lifetime register yet
CALIBRATION_EPOCH_MISMATCH409The device counters were reset since the snapshot you used
CALIBRATION_STALE409The snapshot is more than 1 kWh older than the latest report of the device
RATE_LIMITED429Too many requests — wait for Retry-After
NOT_FOUND404The endpoint or the id does not exist
SERVER_ERROR500Unexpected error on our side — safe to retry

Real time (WebSocket)

A WebSocket pushes every change as it happens, so you do not have to poll. Open it with a one-time ticket from POST /api/ws-ticket. Each device page lists the commands and events of that device.

javascript
// 1. exchange the key for a one-time ticket (valid 30 s, works once)
const { ticket } = await fetch('https://teqhome.teqlogy.com/api/ws-ticket', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + process.env.TEQLOGY_KEY },
}).then((r) => r.json())

// 2. open the socket with it
const ws = new WebSocket('wss://teqhome.teqlogy.com/ws/app?ticket=' + ticket)
ws.onmessage = ({ data }) => console.log(JSON.parse(data))
ws.onclose = () => { /* get a NEW ticket, then connect again */ }

// 3. keep it alive and (full key only) send commands
setInterval(() => ws.send(JSON.stringify({ type: 'ping' })), 25000)
ws.send(JSON.stringify({ type: 'toggleRelay', deviceId: 'aabbcc112233', relay: 0, state: true }))
  • You receive the events of every device you own and of every device shared with you, as soon as they happen.
  • A socket opened with a read-only key only listens. Every command it sends is answered with an error frame (API_KEY_READONLY) and nothing reaches a device.
  • A socket opened with a full key may send the commands below. Anything else — factoryReset, deleteDevice, an unknown type — is refused with API_KEY_NOT_ALLOWED: those need a login.
  • At most 30 messages per 10 seconds per connection; extra messages are ignored. The server does not ping app connections and proxies close idle ones, so send { "type": "ping" } every 25–30 seconds.
  • A command is addressed with deviceId and goes to the device only if it is yours or shared with you with control access. There is no answer to a command that worked: watch for telemetryUpdate.

A refused command

The socket stays open and tells you why:

json
{
  "type": "error",
  "code": "API_KEY_READONLY",
  "message": "This API key is read-only: it can read data but cannot change anything.",
  "command": "toggleRelay"
}

Address: wss://teqhome.teqlogy.com/ws/app?ticket=…

Using keys safely

  • Use a read-only key for dashboards, reports and monitoring. Give a full key only to the integration that really has to switch things.
  • Keep keys on a server. A key in a web page or a phone app can be read by anybody who opens it. (Browsers on other websites are also stopped by CORS.)
  • One key per integration, named after it. Revoke a key the moment it is lost, leaked or no longer used — it stops working at once.
  • Always use HTTPS / WSS. Never put a key in a URL or in a log; send it in the Authorization header only.
  • Your key acts as you: it only sees and changes your own devices and the devices shared with you, and never more than your share allows.