Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

ThingSpeak MQTT API

Lightweight pub/sub MQTT broker at `mqtt3.thingspeak.com` over TCP (1883), TLS (8883), WebSocket (80), and secure WebSocket (443, path `/mqtt`). Publish to `channels/{channelID}/publish` and subscribe via `channels/{channelID}/subscribe/fields/field{n}/{readAPIKey}`. QoS 0 only; connections time out after one hour of inactivity. Devices use MQTT-specific Client ID / Username / Password credentials provisioned in ThingSpeak.

ThingSpeak MQTT API is one of 12 APIs that ThingSpeak publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include IoT, MQTT, Pub/Sub, and Real-Time. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

This event API exposes 4 operations across 4 channels, and defines 3 schemas. It is described by AsyncAPI 2.6.0, at version 1.0.

The API connects through 4 servers: mqtt3.thingspeak.com:1883 (mqtt), mqtt3.thingspeak.com:8883 (mqtts), mqtt3.thingspeak.com:80/mqtt (ws), mqtt3.thingspeak.com:443/mqtt (wss).

4 operations 4 channels 3 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
1.0
Base URL
mqtt3.thingspeak.com
Resource Areas
1

Channels & Operations 4

Across 4 channels, the API surfaces 4 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 4
PUB
channels/{channelID}/publish
Publish multi-field updates to a channel. Payload is form-encoded (field1=value&field2=value&status=...).
publishChannelFeed 1 param body
PUB
channels/{channelID}/publish/fields/field{fieldNumber}
Publish a single field's value.
publishFieldValue 2 params body
SUB
channels/{channelID}/subscribe/fields/field{fieldNumber}/{readAPIKey}
Subscribe to a specific field on a channel. Requires the channel's Read API Key in the topic.
subscribeFieldFeed 3 params body
SUB
channels/{channelID}/subscribe/json/{readAPIKey}
Subscribe to all channel updates as JSON.
subscribeChannelFeedJson 2 params body

Messages & Schemas 3

The contract defines 3 schemas that model the data carried by its messages. Each schema is shown below with its type and property counts.

ChannelUpdate
message
FieldValue
message
ChannelUpdateJson
message

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

thingspeak-mqtt-asyncapi.yml Raw ↑

Other APIs ThingSpeak publishes across the network.

ThingSpeak Channels API
ThingSpeak Update API
ThingSpeak React API
ThingSpeak Alerts API
ThingSpeak Charts API
ThingSpeak MATLAB Analysis API
ThingSpeak MATLAB Visualization API
ThingSpeak ThingHTTP API
ThingSpeak TimeControl API
ThingSpeak Channels.json API
ThingSpeak Talkbacks API