Write Image
Write channel image with HTTP POST
Request
HTTP Method
POST
URL
https://data.thingspeak.com/channels/
<channel_id>
/images/<filename>
/<timestamp>
URL Parameters
Name | Description |
---|---|
| (Required) Channel ID for the image channel to write to. |
<filename> | (Optional) Name of the image file. |
<timestamp> | (Optional) Timestamp provided by the client. |
Example:https://data.thingspeak.com/channels/123456/images/MVseg_01.jpg/2022-01-29T15:06:35.642Z
Body
The body of the POST is the image data. The means of specifying the file depends on the utility.
Headers
The following headers are required for an image POST request.
Key Name | Value |
---|---|
Content-type | (Required) |
thingspeak-image-channel-api-key | (Required) The API Key for this specific image channel. The Write API Key is found in the API Keys column of the image channels table. |
Response
Success
202 OK
The response is a JSON object of the new entry, for example:
{ "requestID": "cmnog8kdd00224cmc4cz0dnwo", "code": 0, "status": "PENDING", "message": null }
Errors
For the full list, see Error Codes.
Limitations
You must have a paid licence to create an image channel.
The only supported image format is JPEG/JPG.
Images are limited in size to 5 MB. Those slightly larger are automatically scaled down. Significantly larger images are rejected.
All timestamps must be unique within a channel. You cannot write a new image using a timestamp that matches the timestamp of an existing image in the channel.