Home / API

Authentication

Every request carries an API key as a bearer token. A key belongs to one company and acts as the person who made it.

Make a key

A company admin signs in and opens Settings → API & webhooks, names the key (for example "Estimating front end") and presses Make a key. The key is shown once; InsulEngine keeps only a one-way hash of it, so a lost key cannot be shown again. Make a new one and revoke the old.

Send it

Put the key in the Authorization header of every request, over HTTPS to https://insulengine.com:

curl https://insulengine.com/v1/jobs \
  -H "Authorization: Bearer $INSULENGINE_API_KEY"
import os, requests

session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['INSULENGINE_API_KEY']}"
jobs = session.get("https://insulengine.com/v1/jobs").json()["jobs"]
const headers = { Authorization: `Bearer ${process.env.INSULENGINE_API_KEY}` };
const { jobs } = await (await fetch("https://insulengine.com/v1/jobs", { headers })).json();

A request with no key, a mistyped key or a revoked key answers 401.

What a key can do

Key made byRead jobs, takeoffs, estimates, downloadsCreate jobs
AdminYesYes
EstimatorYesYes
ViewerYesNo (403)

Revoke a key

Settings → API & webhooks → Revoke stops a key at once. A key also stops working when the person who made it leaves the company, so make keys for systems from an account that will stay.

Keep it safe