Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
NetConfig.io NetConfig.io
NetConfig.io NetConfig.io
  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
Close

Search

  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
NetConfig.io NetConfig.io
NetConfig.io NetConfig.io
  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
Close

Search

  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
Home/Meraki/Meraki API Tutorial: How to Get Your Organization ID and Network ID
Meraki

Meraki API Tutorial: How to Get Your Organization ID and Network ID

By Bhardwaj Vishnu
June 6, 2026 4 Min Read
0

When transitioning from configuring Cisco Meraki networks manually via the GUI dashboard to automating network deployments with the Meraki API, the very first hurdle is gathering your foundational identifiers. Before you can clone a site, update firewall rules, or provision new hardware programmatically, you need two critical pieces of information: your Meraki Organization ID and your Meraki Network ID.

In this step-by-step guide, we will walk through how to enable API access, generate your secure API key, and use both Postman and Python to retrieve your Organization and Network IDs so you can start automating your network deployments.

Table of Contents
  • Step 1: Enable API Access in the Meraki Dashboard
  • Step 2: Generate Your Meraki API Key
  • Step 3: Setting Up Your API Headers
  • Step 4: Get Your Meraki Organization ID
  • Step 5: Get Your Meraki Network ID
  • Next Steps: Moving Toward Automation

Step 1: Enable API Access in the Meraki Dashboard

By default, API access is disabled for Meraki organizations as a security measure. To interact with the dashboard programmatically, you must explicitly permit API access.

  1. Log in to your Cisco Meraki Dashboard.

  2. Navigate to Organization > Settings (or Configuration settings).

  3. Scroll down to the Dashboard API access section.

  4. Check the box that says Enable API access.

  5. Save your changes at the bottom of the page.

Step 2: Generate Your Meraki API Key

Your API key acts as your secure password for all API calls. Treat it with the exact same security as your administrator password.

  1. Click on your user profile icon in the top right corner of the dashboard.

  2. Select My profile.

  3. Scroll down to the API access section.

  4. Click the button to Generate new API key.

  5. Copy the key and store it securely in a password manager. Note: Once you close this window, you will not be able to view the full key again.

Step 3: Setting Up Your API Headers

Whether you are using Postman (a popular API testing GUI tool) or writing a Python script, every single request to the Meraki API requires specific headers to authenticate you and format the data properly.

You must include these in every call:

  • X-Cisco-Meraki-API-Key: <Your_Generated_API_Key>

  • Content-Type: application/json

  • Accept: application/json

Step 4: Get Your Meraki Organization ID

To get a list of your networks or manipulate any global settings, you first need to know which Organization you are querying. We will hit the /organizations endpoint to pull this data.

Using Postman:

  1. Open Postman and create a new GET request.

  2. Enter the URL: https://api.meraki.com/api/v1/organizations

  3. Under the Headers tab, add X-Cisco-Meraki-API-Key as the key and paste your actual API key as the value. Add Content-Type with the value application/json.

  4. Click Send. The response payload at the bottom will return a JSON array containing your Organization Name and its corresponding id. Save that id string.

Using Python: For robust network automation, Python is the industry standard. Here is the complete, ready-to-run Python code to process this request:

import requests
import json

# Define the Meraki endpoint URL for Organizations
url = "https://api.meraki.com/api/v1/organizations"

# Set up the required headers for authentication and data format
headers = {
    "X-Cisco-Meraki-API-Key": "YOUR_API_KEY_HERE",
    "Content-Type": "application/json",
    "Accept": "application/json"
}

# Execute the GET request
response = requests.get(url, headers=headers)

# Parse the JSON response
organizations = response.json()

# Print the output nicely formatted
print(json.dumps(organizations, indent=4))

 

Look at the terminal output and locate the id field. This is your Organization ID.

Step 5: Get Your Meraki Network ID

Now that you have your Organization ID, you can query the API to list all the individual networks (e.g., branches, teleworker setups, HQ) belonging to that organization.

Using Postman:

  1. Create a new GET request in Postman.

  2. Enter the URL: https://api.meraki.com/api/v1/organizations/{organizationId}/networks (Make sure to replace {organizationId} with the actual ID string you grabbed in Step 4).

  3. Ensure your headers (X-Cisco-Meraki-API-Key and Content-Type) are set just like before.

  4. Click Send. The JSON output will generate a list of all your configured networks, including their name (like “Branch 1” or “Net Prepare DR 1”) and their specific id.

Using Python: Here is the Python script to retrieve your network IDs dynamically:

import requests
import json

# Replace with your actual Organization ID from Step 4
org_id = "YOUR_ORG_ID_HERE"

# Define the endpoint URL dynamically using an f-string
url = f"https://api.meraki.com/api/v1/organizations/{org_id}/networks"

# Set up the required headers
headers = {
    "X-Cisco-Meraki-API-Key": "YOUR_API_KEY_HERE",
    "Content-Type": "application/json",
    "Accept": "application/json"
}

# Execute the GET request
response = requests.get(url, headers=headers)

# Parse and format the JSON response
networks = response.json()

# Print the output
print(json.dumps(networks, indent=4))

 

Scroll through the JSON output in your console to find the network you want to manage or clone. The id field associated with that specific network name is your Network ID.

Next Steps: Moving Toward Automation

With your Organization ID and Network ID safely documented, you have officially unlocked the foundation of Meraki API automation. From here, you can use these IDs to execute more advanced functions: cloning existing networks to spin up new sites instantly, copying configuration templates across branches, binding devices, or updating firewall and VPN settings programmatically

Read More : Python NETCONF Automation with NCclient

Bhardwaj Vishnu
Bhardwaj Vishnu

Bhardwaj Vishnu is a Network Security Engineer with hands-on expertise in enterprise firewall management, network automation, and multi-vendor infrastructure. He holds Fortinet NSE 4/NSE 5, a Cisco CCNA, and the full Cisco Meraki certification track. He architects FortiGate security policies, manages Cisco Meraki MX/MS/MR deployments, and handles enterprise routing and switching. Every guide on netconfig.io comes from direct production experience — real CLI commands, verified configs.

Author

Bhardwaj Vishnu

Bhardwaj Vishnu is a Network Security Engineer with hands-on expertise in enterprise firewall management, network automation, and multi-vendor infrastructure. He holds Fortinet NSE 4/NSE 5, a Cisco CCNA, and the full Cisco Meraki certification track. He architects FortiGate security policies, manages Cisco Meraki MX/MS/MR deployments, and handles enterprise routing and switching. Every guide on netconfig.io comes from direct production experience — real CLI commands, verified configs.

Follow Me
Other Articles
FortiGate DHCP over IPsec VPN
Previous

Complete Guide: FortiGate DHCP over IPsec VPN in FortiClient

meraki api
Next

Learn Cisco Meraki API:Create & Clone Networks via API

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • About us
  • Contact us
  • Disclaimer
  • Privacy Policy
  • Automation
  • Cisco
  • Fortigate
  • Meraki
  • Palo Alto
  • Facebook
  • Pinterest
  • X
  • Reddit
Copyright 2026 — NetConfig.io. All rights reserved.