Getting Started

The Firewalla MSP API lets you read and manage the boxes in your MSP from your own scripts and tools: boxes, devices, alarms, flows, rules, target lists and more.

You need two things to make a call:

  1. A personal access token (paid MSP plans only)
  2. Your MSP's base URL

1. Create a token

  1. Click your account name at the top right, then MSP Settings.
  2. In the MSP API card, click Create New Token. Account menu, MSP Settings, Create New Token
  3. Enter a name and choose a permission:
    • Full Access: read and change data
    • Read Only: read data only
  4. Click Create. Create New Token dialog
  5. Copy the token right away. You can't see it again after you leave the page. Copy the new token

Change or revoke a token

In the MSP API card, click a token to rename it, change its permission, or Revoke Access. A revoked token stops working at once. Edit or revoke a token

2. Find your base URL

Use the address you sign in to MSP with:

You sign in at Base URL
Your own domain, e.g. mydomain.firewalla.net https://mydomain.firewalla.net
firewalla.net https://firewalla.net/api

Everything after the base URL is the same for both. These docs write it as <MSP_base_url>.

3. Make your first call

Set your base URL and token:

export MSP_base_url="https://mydomain.firewalla.net"
export token="your_personal_access_token"

Send the token in the Authorization header as Token <your token>. This call lists your boxes:

curl "${MSP_base_url}/v2/boxes" \
  --header "Authorization: Token ${token}"
// npm install axios
const axios = require("axios");

const MSP_base_url = process.env.MSP_base_url;
const token = process.env.token;

axios.get(`${MSP_base_url}/v2/boxes`, {
    headers: { Authorization: `Token ${token}` }
}).then(res => console.log(res.data));

You get back one entry per box:

[
  {
    "gid": "00000000-0000-0000-0000-000000000000",
    "model": "gold",
    "name": "My Firewalla",
    "mode": "router",
    "online": true,
    "version": "1.975",
    "license": "00000000-1111-1111-1111-000000000000",
    "publicIP": "1.1.1.1",
    "location": "Los Angeles, US",
    "lastSeen": 1648632679.193,
    "group": null,
    "deviceCount": 11,
    "ruleCount": 34,
    "alarmCount": 89
  }
]

gid is the box ID. Many other calls need it.

Next steps

Found a mistake in these docs? Email help@firewalla.com.