Main Content

Bulk-Write CSV Data

Write many entries to channel in CSV format with single HTTP POST


To conserve device power or group channel updates, you can use the bulk-update API. When using the bulk-update API, you collect data over time, and then upload the data to ThingSpeak™. To write data in JSON format, see Bulk-Write JSON Data. To write a single entry, see Write Data.


If you set the React app with the Test Frequency set to On Data Insertion, your 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.


HTTP Method



URL Parameters



(Required) Channel ID for the channel of interest.

URL example:



Body Parameters

NameDescriptionValue Type

(Required) Specify Write API Key for this specific channel. The Write API Key is on the API Keys tab of the channel view.



(Required) Specify absolute time of the event with time_format=absolute or time between measurements with time_format=relative.

string absolute or relative


Bulk data to post to channel. Separate successive entries with a pipe character (|). Start each update with an absolute datetime or number of seconds. Separate successive fields with a comma

See Update Parameters.

Update Parameters

The update contains the data to post to your channel. The parameters appear sequentially in each update in the order shown in the table. Only one of the time specifications appears in each update.


(Required) If time_format=absolute, specify datetime in ISO 8601, EPOCH, or MYSQL formats. If time_format=relative, specify seconds elapsed since last entry. The timestamp must be unique within channel.

datetime or integer

field<X> data

(Required) Field X data, where X is the field ID



(Required) Latitude in degrees, specified as a value between -90 and 90.



(Required) Longitude in degrees, specified as a value between -180 and 180.



(Required) Elevation in meters


status(Required) Message for status field entrystring

Body Format

Each CSV bulk write contains a Write API key and a time format specification. Each bulk write can contain multiple updates. Separate successive entries with a pipe character (|). Provide data or a blank entry for each sequential parameter up to the last parameter with valid data.

Specify Absolute Time Format
Specify Relative Time Format



HTTP Status Code

200 OK


The response is a JSON object indicating success:

    "success": true


For the full list, see Error Codes.


  • 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 must be 15 seconds or more.

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

  • All updates must use same time format.

  • All timestamps must be unique. If you submit duplicate timestamps, all of your updates are rejected, otherwise only updates with timestamps already in channel are rejected.


expand all

You can configure POSTMAN to try RESTful API calls. To send an HTTP POST request to bulk-update a channel feed using a CSV formatted data, configure POSTMAN.

  1. Select POST from the drop-down list of HTTP verbs.

  2. Enter the URL, changing <channel_id> to your channel ID.<channel_id>/bulk_update.csv

  3. Select x-www-form-urlencoded.

  4. Enter write_api_key in the Key section, and enter the Write API Key for your channel in the value section.

  5. Enter time_format in the Key section, and enter relative in the value section.

  6. Enter updates in the Key section and then enter 0,2,,,,,,,,,,,|2,2,,,,,,,,,,,|1,16,,,,,,,,,,,|2,2,,,,,,,,,,,|5,164,,,,,,,,,,,|1,22,,,,,,,,,,,|3,116,,,,,,,,,,,|

    in the value section. Use a comma for each blank entry.

  7. Send the request.

The response to the request is a JSON object indicating success.

    "success": true

The six values posted in one call to the channel at 19:07:20 are shown in the plot. The last entry has the timestamp for the time when the request was submitted. Each update in the request with relative timestamps is decremented backwards in time from the last entry.

For devices with a built-in real-time clock, you can provide a relative timestamp for each entry. Specifytime_format=relative. Each entry starts with the time in seconds from the previous measurement.

POST /channels/266256/bulk_update.csv HTTP/1.1
Content-Type: application/x-www-form-urlencoded
time_format: relative


The message must be URL encoded. %2C and %7C represent URL encoding characters for "," and "|" respectively.

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.