This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Bulk-Write JSON Data

Write a large number of entries to a channel in JSON format with a single HTTP POST


You can use the bulk-update API when you want to conserve your device power. When using the bulk-update API, you collect data over time, and then upload the data to ThingSpeak™. You can also write data in CSV fromat with Bulk-Write CSV Data. To write a single entry, see Write Data.


If you set the React App with the Test Frequency set to On Data Insertion, the React is triggered only once per bulk write request when the Condition Type matches the Condition, even if the Condition is matched more than once.

If you set the React App to run on a specific Test Frequency with a specific Condition Type, be cautious of how the React is triggered. The data is now collected over a period and updated as a batch, and the Condition Type that triggers the React can vary within a single batch of data.


HTTP Method



URL Parameters



(Required) Channel ID for the channel of interest.


Body Parameters


(Required) Specify User API Key, which you can find in your profile. This key is different from the channel API keys.


created_at or delta_t

(Required) Specify absolute time of the event with created_at or time between measurements with delta_t.

created_at:<datetime> ISO 8601, EPOCH, or MYSQL format

delta_t: <integer>


(Optional) Field X data, where X is the field ID.



(Optional) Latitude in degrees.



(Optional) Longitude in degrees.



(Optional) Elevation in meters.


status(Optional) Message for status field entry.<string>


application /json

Body Format

Each field label is contained in quotes, and it is followed by a colon and the value. Each field entry is separated by a comma. Enclose string values in double quotes, numeric types do not require quotes. Each entry is separated by braces {} and a comma.




HTTP Status Code

200 OK



POST /channels/266256/bulk_update.json HTTP/1.1
Content-Type: application/json

{"created_at":"2018-01-30 10:26:2 -0500","field1":100},
{"created_at":"2017-01-30 10:26:23 -0500","field1":"red","field2":"blue","field3":"green","field4":"fish","field5":"alimony","field6":100,"field7":100,"field8":100},
{"created_at":"2018-01-30 10:26:26 -0500","field1":1500,"field2":150,"field3":100,"field4":100,"field5":100,"field6":100,"field7":100,"field8":100,"latitude":123,"longitude":23,"elevation":34}

The response is a JSON object indicating success:

    "success": true


See Error Codes for the full list.


  • The number of messages in a single bulk-update is limited to 960 messages for users of free accounts and 14,400 messages for users of paid accounts. The time interval between sequential bulk-update calls should be 15 seconds or more. The time between read requests is not limited by ThingSpeak for any users.

  • MQTT subscriptions do not report updates to the channel from bulk-write.


Sample POSTMAN Request

You can configure POSTMAN to try RESTful API calls. To send an HTTP POST request to bulk-update a channel feed using a JSON object, configure the POSTMAN as shown:

  1. In the Headers tab, set the Content-Type as application/json.

  2. Set the Body of the request as a raw JSON object, and enter the JSON object in POSTMAN.

    POST /channels/999900/bulk_update.json HTTP/1.1
    Content-Type: application/json
  3. The response is a JSON object indicating success.

Bulk-Write with Relative Timestamps

For devices without a built in real-time clock, you can provide a relative time stamp for each entry. Each entry starts with delta_t and lists the time in seconds from the previous measurement.

Enter the POST code. The exact process and format varies depending on your client.

POST /channels/999900/bulk_update.json HTTP/1.1
Content-Type: application/json


The first entry has the timestamp for the time when the request was submitted plus the first value of delta_t, which is zero in this example. The response to the request is a JSON object indicating success.

    "success": true
The six values posted in one call to the channel at 18:05:37 are shown in the plot.

Was this topic helpful?