Deploy, Build, & Engage
Meraki APIs make it possible to rapidly deploy and manage networks at scale, build on a platform of intelligent, cloud-connected IT products, and engage with users in powerful new ways
What can you do with the Meraki API?
Application Development
Automate with Dashboard API
The Meraki Dashboard API allows developers to handle tedious tasks quickly and simply. The API uses familiar REST conventions over HTTP with JSON data.

What can Dashboard API be used for?
  • Add new organizations, admins, networks, devices, VLANs, and more
  • Configure thousands of networks in minutes
  • On-board and off-board new employees’ teleworker setup automatically
  • Build your own dashboard for store managers, field techs, or unique use cases
We're excited to announce the Dashboard API is now using the OpenAPI Specification! Read more on the official site

What does this mean?
  • Take advantage of our interactive API documentation with enhanced details
  • Instantly start coding with one of our Python library or generate your own SDK
  • Export the latest version to a Postman collection or other formats
  • Take advantage of the hundreds of tools and resources that extend the OpenAPI spec
How does the Python SDK work?
Import the library and set your API key for authorization
API_KEY = "6bec40cf957de430a6f1f2baa056b99a4fac9ea0"  # demo read-only API key
import meraki
dashboard = meraki.DashboardAPI(API_KEY)
                                    
2
Test it out: try returning a list of the organizations and their IDs
response = dashboard.organizations.getOrganizations()
print(response)
>>>
[
    {'id': '549236', 'name': 'DevNet Sandbox', 'url': 'https://n149.meraki.com/o/-t35Mb/manage/organization/overview'},
    {'id': '463308', 'name': 'DevNet San Jose', 'url': 'https://n18.meraki.com/o/vB2D8a/manage/organization/overview'},
    ...
                                    
3
That's it! Easily integrate the Meraki cloud platform into your next application or workflow.

To learn more about Dashboard API, choose Complete the full tutorial to take the DevNet Meraki learning lab or head over to the API docs to begin taking advantage of your newfound powers!
Guest Wi-Fi
Build Your Own Captive Portal
Leverage the captive portal integration to develop web portals that provide a host of services to on-site Wi-Fi users. These services can include custom authentication features, promotional information, or data-gathering surveys.
Getting started
1
In this Python 3 example, run an API server on your local machine (make sure you have Flask installed). Copy and paste this code and run using using this Python script locally to start a splash page web server.

Click-through code snippet:

from flask import Flask, request, render_template, redirect, url_for, json

app = Flask(__name__)

global base_grant_url
base_grant_url = ""
global user_continue_url
user_continue_url = ""
global success_url
success_url = ""


@app.route("/click", methods=["GET"])
def get_click():
    global base_grant_url
    global user_continue_url
    global success_url


    host = request.host_url
    base_grant_url = request.args.get('base_grant_url')
    user_continue_url = request.args.get('user_continue_url')
    node_mac = request.args.get('node_mac')
    client_ip = request.args.get('client_ip')
    client_mac = request.args.get('client_mac ')
    splashclick_time = request.args.get('splashclick_time')
    success_url = host + "dev/success"
    network_id=request.args.get("network_id")
    camera_serial=request.args.get("camera_serial")
    api_key=request.args.get("api_key")

    return render_template("click.html", client_ip=client_ip,
    client_mac=client_mac, node_mac=node_mac,
    user_continue_url=user_continue_url,success_url=success_url)

    .
    .
    .
    if __name__ == "__main__":
    app.run(host="0.0.0.0", port=5004, debug=False)
                                    
2
Run ngrok at your terminal (make sure you have ngrok installed)
$ ./ngrok http 5004
You'll be assigned a URL that resembles:
https://0a5c1166.ngrok.io/click
3
Access your Meraki dashboard or the DevNet Meraki Sandbox.
Add your ngrok URL to your Meraki Dashboard.
Dashboard > Wireless > Configure > Splash > SSID
4
That’s it, now connect your client to that SSID and see your splash screen in action.

Learn how to use the captive portal API to create custom splash pages, by taking the captive portal Learning Lab
Additional resources
Captive Portal API docs
Check out the instructions on how to enable Meraki’s Captive Portal to more fully engage Wi-Fi customer engagements.
Captive Portal Solutions
Explore the various ways that Meraki’s Captive Portal functionality can be utilized.
Location Services
Build Wi-Fi and BLE Location Apps
Using the physical placement of each access point on the Map & Floorplan of the Dashboard, the Meraki cloud aggregates raw client location data reported and provides a real-time estimate on the location of Wi-Fi (associated and non-associated) and Bluetooth Low Energy (BLE) devices in real-time. The Scanning API delivers this data to your real-time location application, data warehouse, or business intelligence systems.
Getting started
1
In this Python 3 example, run an API server on your local machine (make sure you have Flask installed).

from flask import Flask, json, request

# init a flash web app
app = Flask(__name__)

# validate web server from meraki
@app.route('/', methods=['GET'])
def get_validator():
    return "<Your validator from meraki dashboard>"

# receive location data
@app.route('/', methods=['POST'])
def get_cmxJSON():
    cmxdata = request.json

    # Determine device type
    if cmxdata['type'] == "DevicesSeen":
        print("WiFi Devices Seen")
    elif cmxdata['type'] == "BluetoothDevicesSeen":
        print("Bluetooth Devices Seen")
    else:
        print("Unknown Device 'type'")

    return "CMX POST Received"


if __name__ == '__main__':
    # run app
    app.run(port=5000, debug=False)
                                    
2
Download and run ngrok at your terminal.
$ ./ngrok http 5000
You'll be assigned a URL that resembles:
https://0a5c1166.ngrok.io
3
Access your Meraki dashboard or the DevNet Meraki Sandbox.
Add your ngrok URL from Step 2 to your Meraki dashboard.
Dashboard > Network Wide > General > Location and scanning
4
Finally, you should start receiving data from the Location Scanning API printed (or consoled) out in your terminal.

You can also find the full application example on Github.
More sample projects
Take a look at Location Scanning samples developed for NodeJS, Node-RED, and AWS Lambda.
Meraki as a Sensor
Analyze with MV Sense and Camera APIs
Meraki Smart Cameras run an ML/CV model at the edge (on the camera) for object detection, classification, and tracking right out of the box. MV Sense is a collection of APIs that make the edge-computed people detection data from your MVs accessible for integration with business applications. Three types of data can be accessed:

What is MV Sense?
  • Historical Aggregate - How many people were here at time t ?
  • Current Snapshot - How many people are here now?
  • Real-time Feed - Sub-second data feed of people and their location via MQTT
We also have two additional APIs that enable third-party applications to be even more insightful with evidence.
  • Live link API - Add a dashboard link to the exact timestamp of the video you are interested in.
  • Snapshot API - Add a snapshot of the camera footage you want.

Starter Python script
Here’s a starter Python script that runs on Repl.it, an online and accessible integrated development environment where you can quickly build and run an application. The application we will create sends a screenshot of the camera’s current field of view directly to your phone.

## Live API
print('MV Sense Live API')
meraki_live_url = 'https://api.meraki.com/api/v0/devices//camera/analytics/live'
meraki_headers = {'X-Cisco-Meraki-API-Key': ''}
meraki_live_response = requests.get(meraki_live_url, headers=meraki_headers)
meraki_live_response_json=json.loads(meraki_live_response.text)
num_of_person_detected=meraki_live_response_json['zones']['0']['person']

print(num_of_person_detected)

print('Snapshot API')

## Snapshot API
meraki_snapshot_url='https://api.meraki.com/api/v0/networks//cameras//snapshot'
meraki_snapshot_response = requests.post(meraki_snapshot_url, headers=meraki_headers)
time.sleep(10)
meraki_snapshot_response_json=json.loads(meraki_snapshot_response.text)
snapshot_url=meraki_snapshot_response_json['url']
                                    
2
Edit the Serial Number to that of your camera in line number 13 and 24. Serial Number is of the format Q2PV-4ZLD-97X9
3
Edit your "To" phone number to your number on line 39. That's it! You've now set up an application that sends a snapshot directly to your phone.


Cisco Meraki Platform capabilities Easy to learn, simple to use, and constantly updated with powerful new capabilities
Network Automation Automate the configuration, deployment, and managment of physical and virtual devices in a network. Learn more Wayfinding & Mapping Map physical spaces to provide directions and context that helps users find their way through and navigate to key locations in your space. Learn more Interactive Guest Wi-Fi Easily and securely grant Wi-Fi access to visitors on a landing page customized with your brand and content. Learn more Asset Tracking Track physical assets, either by scanning barcode labels attached to the assets or by using GPS, BLE or RFID tags that broadcast their location. Learn more Video Analytics Analyze data sourced from Meraki Video Cameras to bring new insights into physical spaces. Instantly derive new business insights into people counting, queue length monitoring, entry & exit behavior and deeper integration with physical security solutions. Learn more IoT & Security Manage, Integrate and Safeguard IoT devices connected at the edge while protecting the entire network from emerging vulnerabilities. Learn more