Main Content

Write Data to Channel

Use the REST and MQTT APIs to update channels with software or devices

ThingSpeak™ is an IoT platform that uses channels to store data sent from apps or devices. You can write data to your ThingSpeak channels in several ways: HTTP calls from the REST API, MQTT Publish method, and the thingSpeakWrite function from MATLAB. Learn more about how to Choose Between REST API and MQTT API to update a channel.

REST API

expand all

Write DataUpdate channel data with HTTP GET or POST
Bulk Write JSON DataWrite many entries to channel in JSON format with single HTTP POST
Bulk Write CSV DataWrite many entries to channel in CSV format with single HTTP POST

MQTT API

expand all

Publish to a Channel FeedPublish message to update multiple channel fields simultaneously with MQTT
Publish to a Channel Field FeedPublish message to update single channel field with MQTT

Functions

expand all

thingSpeakWriteWrite data to ThingSpeak channel

Topics

Choose How to Write Data

Write Data With Libelium Hardware

Write Distributed Sensor Data from The Things Network

Write Data With Arduino and Particle Photon

Write Data With ESP8266

Write Data With ESP32

Write Data With Raspberry Pi

Troubleshooting

Error Codes

See the details of ThingSpeak REST API error messages and corresponding HTTP status codes.

Troubleshoot MQTT Publish

Get help to resolve common mistakes when using MQTT publish.