Getting started with the Fr8Labs API


Overview

Fr8Labs switches the API on for your company. After that, you set it up yourself, in the Fr8Labs portal:

  1. Ask Fr8Labs to switch on the API for your company.

  2. Your company administrator gives a person API access.

  3. That person turns on the modules your systems need.

  4. They create a key.

  5. Your developer makes a first call.

Base URL: https://notification-hub.fr8labs.co/api/v1


Step 1 — Ask Fr8Labs to switch on the API for your company

Email your Fr8Labs account manager (or customersuccess@fr8labs.co) and ask for API access for your company. We switch it on and tell you when it's done. Until then, the API access permission does not appear in Team Access.

Step 2 — Give a person API access

Only people with the API access permission can create keys. Your company administrator grants it, person by person, in Team Access.

  • Being a company administrator does not include API access. An administrator who wants to create keys grants API access to themselves in Team Access.

  • API access is always given to a named person. It is never part of a role or a default for new people.


Step 3 — Turn on the modules you need

The person with API access opens the API access tile in the Fr8Labs portal. Under What your API can reach, they turn on the modules your systems should use:

Module

Turns on

CRM

Leads, deals, contacts, notes and tasks

Freight operations

Quotations and jobs (and job invoices)

Accounting

Your ledger, for the companies you pick

  • Accounting asks you to pick the companies whose books the API may read. The list comes from your accounting system. Pick at least one.

  • Turning a module on can take a minute.

  • The first module you turn on also switches the API on for your company.

  • A key can only use what is on here. Turning a module off stops every key from using it, at once.

  • You cannot turn off the last module. To stop all API access, revoke your keys, or ask Fr8Labs to switch API access off.

When you turn the API on, Fr8Labs sets up a dedicated API user for your company. Every key acts as this API user, never as the person who created the key. The API works with your whole company's data.

Note: If the page says a module "cannot be set up from here for your company yet", Fr8Labs has been told and will contact you. If it says Fr8Labs has switched API access off for your company, contact Fr8Labs to switch it back on.


Step 4 — Create a key

In the API access tile, under Create a key:

  1. Choose the environment: live. (See The test environment below.)

  2. Give the key a label, for example the name of the system that will use it.

  3. Tick the scopes the key needs. See Choosing scopes.

  4. Select Create key.

Copy the key now. It is shown once and cannot be shown again. Store it in your secret manager, then select I have stored it.

A key looks like this:

fr8_live_<keyId>_<secret>

The fr8_live_<keyId> part is not secret. The tile shows it in your list of keys, so you can tell keys apart. The <secret> part is the password. Never share it.


Step 5 — Make your first call

GET /me tells you which company the key acts on and what it may do. It needs no scope.

curl

curl https://notification-hub.fr8labs.co/api/v1/me \
  -H "Authorization: Bearer fr8_live_<keyId>_<secret>"

JavaScript (fetch) (Node.js 18 or later, as an ES module, for example me.mjs)

const API_KEY = process.env.FR8LABS_API_KEY; // fr8_live_<keyId>_<secret>
const BASE_URL = 'https://notification-hub.fr8labs.co/api/v1';

const res = await fetch(`${BASE_URL}/me`, {
  headers: { Authorization: `Bearer ${API_KEY}` }
});
console.log(res.status, res.headers.get('X-Request-Id'));
console.log(await res.json());

Python (requests)

import os
import requests

API_KEY = os.environ["FR8LABS_API_KEY"]  # fr8_live_<keyId>_<secret>
BASE_URL = "https://notification-hub.fr8labs.co/api/v1"

res = requests.get(f"{BASE_URL}/me", headers={"Authorization": f"Bearer {API_KEY}"})
print(res.status_code, res.headers.get("X-Request-Id"))
print(res.json())

Success Response (200):

{
  "tenant": { "id": 123, "code": "ACME", "name": "Acme Logistics Pte Ltd" },
  "env": "live",
  "kind": "key",
  "keyId": "<keyId>",
  "keyPrefix": "fr8_live_<keyId>",
  "apiUser": { "email": "<your API user's email>" },
  "scopes": ["crm:read", "actions:read"],
  "keyScopes": ["crm:read", "actions:read"],
  "rateLimitPerMin": 60
}
  • tenant is your company: the one this key acts on.

  • keyScopes are the scopes the key was created with.

  • scopes are what the key can do right now: its scopes, narrowed to the modules and access your company has on today. If a module was turned off, its scopes drop out of scopes but stay in keyScopes.


Try it in the portal

The Try it tab of the API access tile opens an interactive console on the API reference, signed in as your company's API user. You do not paste a key into it.

On live, the console allows reads and dry runs only. It never sends a real write. This makes it a safe place to explore your data and preview changes.


Choosing scopes

Give each key only the scopes it needs. The tile never ticks margin or a write scope for you.

Scope

Lets the key

crm:read

Read CRM leads, deals, organizations, contacts, attachments' details, counts and forms; search the CRM

crm:write

Add and edit CRM contacts, leads, deals, notes and tasks; set status and owner

actions:read

Read quotations, jobs, job costing and documents' details, invoices, tasks, vendor rate sheets and quotation templates

actions:write

Create and change quotations, jobs, house and master bills, and job invoice drafts

margin

See buy-side data (buy amounts, costs, profit, markup, vendors). Only together with actions:read

accounting:read

Read your ledger for the companies you picked

accounting:write

Create non-job invoice, journal and payment drafts, and post drafts the API created

A key can only be given scopes for modules that are on. See Authentication and keys for how scopes and modules work together.


The test environment

Test keys (fr8_test_…) act on the Fr8Labs sandbox: a fully set-up demo freight company, not your own data. A test key never falls back to your live data.

Ask us to switch it on. Email your account manager (or customersuccess@fr8labs.co). Until we do, the tile shows the test environment as not ready, and a test key is refused with SANDBOX_NOT_PROVISIONED.

The sandbox is shared. Other Fr8Labs customers build against the same sandbox company, and the Fr8Labs team uses it for demonstrations. So:

  • Use made-up data only. Anything you create there can be seen by other customers using the sandbox.

  • Expect records you did not create. Lists will include demo jobs, quotes, contacts and other customers' test records.

  • Identifiers differ from your live company. Partner codes, charge codes, accounts and ids in the sandbox are the demo company's. Look them up through the API in the sandbox, and never hard-code them into your live configuration.

Whether or not you use the sandbox, build safely on live:

  1. Start with read scopes only. Reads never change anything.

  2. Preview a change with a dry run while you build. A dry run (POST …/dry-runs) checks your request against live data and writes nothing. See Writes: send, or preview first.

  3. Add a write scope last, on a separate key, when your integration is ready to send real changes.


Rotating and revoking keys

Manage keys in the Keys list of the API access tile. Each row shows the key's label, environment, scopes, who minted it, when it was created and last used, and its status.

Rotate

Rotating a key creates a replacement with the same environment, scopes and label, and shows it once.

  • You choose an overlap from 0 to 1440 minutes (24 hours).

  • 0 revokes the old key at once.

  • More than 0 keeps the old key working for at most that many minutes, so you can deploy the new key first. After that, the old key answers KEY_EXPIRED.

  • A key can only be rotated once. Rotate the replacement next time.

  • The replacement keeps the old key's write history: retries and /operations look-ups work across the rotation.

Revoke

Revoking a key stops it at once. It answers KEY_REVOKED from then on. Revoke a key straight away if you think it has leaked.

You can still see and revoke your keys even when the API is switched off for your company.

When someone leaves

Keys belong to your company, not to the person who created them. A key keeps working after that person leaves or loses API access. The tile shows who minted each key, so you can decide whether to rotate it.


Documentation owner: Fr8Labs Customer Success. Text reviewed: 18 October 2026.