Adafruit IO REST API


The Internet of Things for Everyone

The Adafruit IO HTTP API provides access to your Adafruit IO data from any programming language or hardware environment that can speak HTTP. The easiest way to get started is with an Adafruit IO learn guide and a simple Internet of Things capable device like the Feather Huzzah.

This API documentation is hosted on GitHub Pages and is available at For questions or comments visit the Adafruit IO Forums or the adafruit-io channel on the Adafruit Discord server.


Authentication for every API request happens through the X-AIO-Key header or query parameter and your IO API key. A simple cURL request to get all available feeds for a user with the username “io_username” and the key “io_key_12345” could look like this:

$ curl -H "X-AIO-Key: io_key_12345"

Or like this:

$ curl "

Using the node.js request library, IO HTTP requests are as easy as:

var request = require('request');

var options = {
  url: '',
  headers: {
    'X-AIO-Key': 'io_key_12345',
    'Content-Type': 'application/json'

function callback(error, response, body) {
  if (!error && response.statusCode == 200) {
    var feeds = JSON.parse(body);
    console.log(feeds.length + " FEEDS AVAILABLE");

    feeds.forEach(function (feed) {
      console.log(, feed.key);

request(options, callback);

Using the ESP8266 Arduino HTTPClient library, an HTTPS GET request would look like this (replacing --- with your own values in the appropriate locations):

/// based on

#include <Arduino.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266HTTPClient.h>

ESP8266WiFiMulti WiFiMulti;

const char* ssid = "---";
const char* password = "---";

const char* host = "";

const char* io_key = "---";
const char* path_with_username = "/api/v2/---/dashboards";

// Use web browser to view and copy
// SHA1 fingerprint of the certificate
const char* fingerprint = "77 00 54 2D DA E7 D8 03 27 31 23 99 EB 27 DB CB A5 4C 57 18";

void setup() {

  for(uint8_t t = 4; t > 0; t--) {
    Serial.printf("[SETUP] WAIT %d...\n", t);

  WiFiMulti.addAP(ssid, password);

  // wait for WiFi connection
  while( != WL_CONNECTED) {

  Serial.println("[WIFI] connected!");

  HTTPClient http;

  // start request with URL and TLS cert fingerprint for verification
  http.begin("https://" + String(host) + String(path_with_username), fingerprint);

  // IO API authentication
  http.addHeader("X-AIO-Key", io_key);

  // start connection and send HTTP header
  int httpCode = http.GET();

  // httpCode will be negative on error
  if(httpCode > 0) {
    // HTTP header has been send and Server response header has been handled
    Serial.printf("[HTTP] GET response: %d\n", httpCode);

    // HTTP 200 OK
    if(httpCode == HTTP_CODE_OK) {
      String payload = http.getString();


void loop() {}

Client Libraries

We have client libraries to help you get started with your project: Python, Ruby, Arduino C++, Javascript, and Go are available. They’re all open source, so if they don’t already do what you want, you can fork and add any feature you’d like.

Use this page to mock Adafruit IO REST API in your testing and development.

Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of Adafruit IO REST API, which will allow you to keep building and testing even if the actual API you isn't currently available.

Related mocks

Influx OSS API Service

Authentication &lt;!&ndash; allows users to share data from


This is the API for MIMIC client to

ClearBlade API

A friendly little API to help you


KeyServ API

Quick start - Telematics SDK

Introduction We have prepared a set of

Ready to accelerate your development flow

Shorter release cycles, more predictable schedules and fewer defects in production.
Start Mocking for Free *Free forever. No credit card needed