Developers

The contract in one place

One topic per device, one versioned JSON envelope, the IoTAPS Arduino library, and a REST API described by OpenAPI. Flash from the browser or publish with any MQTT 5 or 3.1.1 client.

Topics
1 per device
telemetry, status, commands, config, OTA
Envelope
v1 JSON
up to 64 metrics, 64 KiB payload
Delivery
QoS 1
acknowledged only when durable
REST API
OpenAPI
described end to end, keys per user

Quick start

Create an account; eligible accounts get ₹200 of welcome credit once setup is complete.

  1. Sign up

    With email, Google or GitHub, then add a passkey or an authenticator app, or skip that for now.

  2. Create an organization

    A default project is created with it.

  3. Add a device

    Pick its board in the device library; the wizard creates a credential.

  4. Flash or publish

    Flash the firmware from the browser, or use a sample below. The secret is shown once.

  5. Watch it

    Live values on the device page, then a dashboard and alert rules.

Code samples

Replace DEVICE_ID, CREDENTIAL_ID, SECRET, and TOPIC with the values from the device page. The broker certificate is publicly trusted, so the system CA store is enough.

mosquitto_pub -h mqtt.iotaps.com -p 8883 --capath /etc/ssl/certs \
  -V mqttv5 -q 1 -i "$DEVICE_ID" -u "$CREDENTIAL_ID" -P "$SECRET" \
  -t "$TOPIC" \
  -m "{\"schema_version\":1,\"message_id\":\"$(uuidgen)\",
       \"metrics\":{\"temperature_c\":21.5}}"

PubSubClient speaks MQTT 3.1.1 and publishes with QoS 0. For QoS 1 on an ESP32, use the ESP-IDF esp-mqtt client.

IoTAPS Arduino library

For ESP32 and ESP8266 boards, the IoTAPS library takes care of TLS, reconnecting, presence, datastreams, commands, setup over USB and updates over the air. The ESP32 and NodeMCU templates in the device library are built on it, and their guides link the ZIP for the Arduino IDE (Sketch › Include Library › Add .ZIP Library) and the lib_deps line for PlatformIO.

MQTT contract (v1)

The contract is versioned in the topic (v1) and in the payload (schema_version). A breaking change gets a new version, and v1 stays supported.

Connection

SettingValue
Hostmqtt.iotaps.com:8883
TransportTLS 1.2+, publicly trusted certificate
ProtocolMQTT 5 (recommended) or 3.1.1
Client IDThe device ID
UsernameThe credential ID
PasswordThe credential secret
Telemetryv1/{organization_id}/{project_id}/{device_id}/telemetry
Status…/{device_id}/status, optional, see presence
Subscribe…/commands/+, …/config, …/ota
QoS1 recommended, 0 supported
KeepaliveUp to 300 seconds

Envelope

FieldTypeRules
schema_versionrequiredintegerMust be 1
message_idrequiredstring1–128 characters: letters, digits, . _ : -. Unique per device; reuse only for retries.
metricsrequiredobject1–64 entries. Names start with a letter or underscore, up to 64 characters. Values are finite numbers, booleans or texts up to 1024 characters (tab, newline and carriage return are the only control characters allowed). A name may be a virtual pin such as V1.
sent_atstringRFC 3339 with an offset, e.g. 2026-10-05T10:15:30Z
sequenceinteger0 to 263−1
attributesobjectUp to 32 entries: strings up to 256 characters, numbers, or booleans

Envelope checker

Paste a payload and check it against the same rules ingestion applies — size, JSON shape, required fields and value types. Nothing leaves your browser.

Telemetry envelope v1 Runs locally · mirrors contracts/telemetry.py
accepted

A rejected payload is answered with one of the rejection codes and appears under “Rejected messages” on the device page.

Commands and updates

Everything the platform sends to a device arrives on the device's own topics, published with QoS 1. A device may subscribe to v1/{org}/{project}/{device}/commands/+, …/config and …/ota, and to nothing else.

Commands
One topic per key, …/commands/{key}. The value is a boolean, a number or a text. Apply it, then report the key in your next telemetry message; dashboard controls show the change when that report arrives. Commands are retained per key, so a device gets the last value when it connects; button presses are sent once and not retained.
Presence
Publish {"schema_version":1,"state":"online"} to …/status after connecting, and set the same topic with "offline" as the MQTT last will. Without status messages, a device counts as online while its telemetry keeps arriving.
Pins and modules
…/config carries the pin setup chosen in the console, retained, with a revision number. The NodeMCU ESP8266 firmware applies it; other firmware may ignore the topic.
Over-the-air updates
…/ota carries a version, an HTTPS download link valid for 30 minutes, the size and the SHA-256. Check both before installing, then report ota_status in attributes. The library templates do this for you.
v1/…/{device_id}/commands/pump
{ "schema_version": 1, "command_id": "5f0c…", "key": "pump",
  "value": true, "sent_at": "2026-10-15T09:12:03Z" }

Limits

A message that exceeds a limit is rejected with a reason code. Nothing is truncated or coerced. Devices, messages and history are billed by the hour; see pricing.

Payload size
64 KiB per message
Metrics per message
64
Attributes per message
32
Integer range
±(253−1)
Deduplication window
7 days
History retention
1 to 90 days, chosen per organization
Raw history query
24 hours, up to 10,000 points
Aggregated query
90 days
Active credentials
5 per device

Rejection codes

Rejected messages are listed on the device page with the code, a detail message, and the start of the payload.

CodeMeaning
payload_too_largeThe payload is larger than 64 KiB.
invalid_encodingThe payload is not UTF-8.
invalid_jsonNot valid JSON, or contains NaN or Infinity.
duplicate_keyA JSON object repeats a key.
invalid_envelopeNot a JSON object, or schema_version is missing.
unknown_fieldA top-level field is not part of the contract. Put custom data in attributes.
unsupported_schema_versionschema_version is not 1.
invalid_message_idmessage_id is missing or uses unsupported characters.
invalid_sent_atsent_at is not an RFC 3339 timestamp with an offset.
invalid_sequencesequence is not an integer from 0 to 263−1.
invalid_metricsMissing or empty, too many entries, an invalid name, or a value that is not a finite number, a boolean or an allowed text.
invalid_attributesToo many entries, an invalid name, or an unsupported value.
balance_exhaustedThe organization ran out of credit and its grace period is over. Add credit under Account › Billing.
credit_limit_reachedAn organization billed monthly reached its credit limit. Pay the open invoice.
invoice_overdueAn invoice of an organization billed monthly is overdue. Pay it under Account › Billing.

Delivery guarantees

PUBACK is the broker's receipt
With QoS 1, a PUBACK means the broker accepted the message. Platform acceptance comes next, when the message is written to the durable stream.
At least once in, once in storage
Retries and redeliveries happen. A retry that reuses the same message_id is stored once within the 7-day window.
Ordering is best effort
Device time (sent_at) and receive time are both kept. Latest state follows receive time, so a late retry never overwrites a newer value.

MQTT 3.1.1 has no negative acknowledgement, so a publish to a topic the device may not use is dropped without an error. MQTT 5 clients get reason code 135 (Not authorized).

REST API

The console uses the same API you do: organizations, projects and access, devices, credentials, commands, latest state, history, messages, rejections, dashboards, alert rules and incidents, webhooks, usage, and the audit log. The console signs its requests with the browser session.

For scripts and servers, create an API key under Account → API and send it to the API host as Authorization: Bearer <key>. A key acts as you, with your access, and works for 30, 90 or 365 days. It cannot create device credentials, invite people or change roles, and you can revoke it at any time.

Open the API reference

Troubleshooting

The broker says “not authorized” when connecting

Check that the client ID is exactly the device ID, the username is the credential ID (not the device ID), and the secret was copied in full. Revoked credentials and disabled devices are refused.

The device connects but no data appears

Publish to the device's own topic, character for character. Then look at “Rejected messages” on the device page; a reason code there means the envelope needs a fix. MQTT 5 clients get reason code 135 for a topic they may not use.

The TLS handshake fails

Check that the device clock is right, the device trusts ISRG Root X1, the client sends mqtt.iotaps.com as the server name (SNI), and it supports TLS 1.2 or newer on port 8883.

Some messages are missing after a reboot

Messages that reuse a message_id within seven days are treated as retries. Use random or UUID-based IDs rather than a counter that restarts at zero.

A dashboard switch keeps saying “Sending…”

The command reached the broker, but the device has not reported the key back yet. Check that it subscribes to …/commands/+, applies the value, and includes the same key in its next telemetry message.

The device shows as offline although it is sending

If it publishes status messages, check that it sends "online" after every connect, not only the first. Otherwise it counts as offline after three missed telemetry intervals.

Still stuck? Email us with the device ID and the time you tried.