# TheBuilding.Cloud API — full developer docs


---

# Quickstart

Make your first request and open a door in about five minutes. You need a TheBuilding.Cloud account with at least one entrance.

## 1. Get an API key

Sign in to the dashboard, open your **Profile**, choose **Manage Api** and press **Generate Token**. Name it after the system that will use it (for example "Reception kiosk"), then copy the token. It is shown only once.

Keep the key secret: anyone with it can act as you. Store it in your system's secret settings, never in an app people download or in a public repository.

```bash
export TBC_KEY="paste-your-token-here"
```

Prefer to get a token from code? See [Authentication and API keys](https://go.thebuilding.cloud/developers/guides/authentication).

## 2. Check the key works

Every request sends the key in the `Authorization` header and asks for JSON:

```bash
curl https://go.thebuilding.cloud/api/user \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

You get your own profile back. A `401` means the key is wrong or was deleted.

## 3. List your entrances

```bash
curl "https://go.thebuilding.cloud/api/entrances?per_page=20" \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

The rows are in `data`. Note the `id` of the door you want: that is what you open.

```json
{
  "data": [
    { "id": 42, "name": "Main Entrance", "building_id": 7, "status": 1 }
  ],
  "meta": { "current_page": 1, "per_page": 20, "total": 1 }
}
```

## 4. Open the door

```bash
curl -X POST https://go.thebuilding.cloud/api/entrances/42/unlock \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

A `200` means the door was told to open, and the opening is in the access log under your name. Other answers:

| Status | Meaning |
|---|---|
| `403` | You can't open this door, the entrance is turned off, or (for doors that only open nearby) you are too far away. The `message` says which. |
| `404` | No entrance with that ID in your organisation. |
| `422` | This door only opens near the building and no position was sent: send `lat` and `lng`. |
| `429` | Too many requests. Wait the seconds in `Retry-After`. |

## Next steps

- [Open a door from your own app](https://go.thebuilding.cloud/developers/guides/open-a-door) — the full recipe, with every answer handled.
- [Responses and errors](https://go.thebuilding.cloud/developers/guides/responses-and-errors) — the reply shape and status codes.
- [API reference](https://go.thebuilding.cloud/developers/reference) — every endpoint, with examples.

---

# Authentication and API keys

Every request to the API (except a few public intercom endpoints) needs an API key. The key acts as the person who created it: it can see and do exactly what that person can in the dashboard, no more.

## Create a key in the dashboard

1. Sign in as an Organisation, Operator or Super Admin.
2. Open your **Profile** and choose **Manage Api**.
3. Press **Generate Token**, give it a name you will recognise later ("HR sync", "Reception kiosk"), and copy the token. It is shown only once.

To stop a key working, delete it on the same page. Delete keys you no longer use.

## Send the key

Add two headers to every request:

```http
Authorization: Bearer <your API key>
Accept: application/json
```

`Accept: application/json` makes sure errors come back as JSON instead of a web page.

## Get a token from code

If your system signs in on behalf of a person, swap their email and password for a token:

```bash
curl -X POST https://go.thebuilding.cloud/api/auth-token \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"email":"you@company.com","password":"…","token_name":"my-integration"}'
```

```json
{
  "message": "User Login Successfully.",
  "access_token": "12|Xq3…",
  "expires_at": null,
  "data": { "id": 7, "name": "Alex Morgan", "email": "you@company.com", "role_id": 2, "status": 1 }
}
```

- Use `access_token` as the Bearer key. When `expires_at` is set, get a new token before then.
- A wrong email or password both answer `404` with the same message, on purpose.
- Only 10 tries a minute are allowed per email and address.
- Give every token a `token_name`, so you can find it in the dashboard later.

## Keep keys safe

- Treat a key like a password. Never put it in a mobile app, a web page or a public repository.
- Use one key per system, so you can switch one off without stopping the others.
- Create keys from an account that has only the access the system needs. An Operator limited to a few entrance groups is safer than an Organisation account.
- If a key leaks, delete it straight away and create a new one.

## Coming next

Keys with their own permissions (for example "open doors only"), expiry dates and a practice sandbox are planned. Until then a key always has the same access as the person who made it.

---

# Responses and errors

## The reply shape

Most successful replies look like this:

```json
{
  "success": true,
  "message": "Success.",
  "data": { "id": 42, "name": "Main Entrance" }
}
```

`data` holds the record, the list or the page you asked for. A few older endpoints return the record or page directly, without `success` and `message`; the [API reference](https://go.thebuilding.cloud/developers/reference) shows the shape of each one.

Errors look like this:

```json
{
  "success": false,
  "message": "Entrance Not Found."
}
```

`message` is written for people, so you can show it to your users as it is.

When fields are missing or wrong you get `422` and a list per field:

```json
{
  "message": "The name field is required.",
  "errors": {
    "name": ["The name field is required."]
  }
}
```

## Status codes

| Code | What it means | What to do |
|---|---|---|
| `200`, `201` | It worked. | Read `data`. |
| `400` | The request didn't make sense (for example an unknown option). | Fix the request; the `message` says what's wrong. |
| `401` | No key, a wrong key, or a deleted key. | Check the `Authorization` header. |
| `403` | The key's person isn't allowed to do this, or the record is turned off. | Use an account with the right access, or ask the building manager. |
| `404` | Nothing with that ID that you can see. | Check the ID. Records in other organisations usually answer 404 too. |
| `419` | The request was treated as a signed-in browser request without its security token. | Call the API from your server with a Bearer key, not from a page on our own domain. |
| `422` | Some fields are missing or wrong. | Show the messages in `errors` next to the fields. |
| `429` | Too many requests. | Wait the number of seconds in `Retry-After`, then try again. |
| `500`, `503` | Something went wrong on our side. | Try again a little later. If it keeps happening, email help@thebuilding.cloud with the time and the endpoint. |

## Good habits

- Always send `Accept: application/json`.
- Retry only on `429`, `500` and `503`, and wait longer after each try.
- Don't retry a door opening on a timeout without checking the access log first: the door may already have opened.
- Log the time, the endpoint and the status when something fails. It makes support much faster.

---

# Lists, paging and limits

## Paging

Lists come one page at a time. Most list endpoints accept:

| Parameter | Default | What it does |
|---|---|---|
| `per_page` | `10` | Rows per page. Keep it at 100 or less. |
| `page` | `1` | Which page. |
| `column_name` | `id` | Column to sort by. |
| `order` | `DESC` | `ASC` or `DESC`. |
| `search` | — | Free text, on endpoints that support it. |

The rows are in `data`. The page details (`current_page`, `last_page`, `per_page`, `total`) are next to them, or inside `meta` on some endpoints. Keep asking for the next page until `current_page` equals `last_page`.

```bash
curl "https://go.thebuilding.cloud/api/users?per_page=50&page=2" \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

Endpoints can have their own filters too (for example `building_id` on the entrance list, or `from_date` and `to_date` on the access log). The [API reference](https://go.thebuilding.cloud/developers/reference) lists them for each endpoint.

## Limits

- **300 requests a minute** for each person (each key's person). Requests without a key get 300 a minute per internet address.
- Getting an API token from an email and password allows **10 tries a minute** per email and address.
- Over the limit you get `429 Too Many Requests` and a `Retry-After` header with the seconds to wait.

Every reply includes `X-RateLimit-Limit` and `X-RateLimit-Remaining`, so you can slow down before you hit the limit.

## Staying under the limit

- Ask for bigger pages (`per_page=100`) instead of many small ones.
- Cache lists that rarely change, such as sites, buildings and entrances.
- For big reports use exports: they run in the background and don't count against your limit while they run. See [Read the access log](https://go.thebuilding.cloud/developers/guides/read-access-log).
- Spread scheduled jobs out; don't start them all on the hour.

---

# Test mode

Test mode gives you a **practice organisation**: a copy of an organisation with sample sites, doors and people, where nothing is real. Use it to try the API before you touch real buildings.

## Start

1. Sign in to the dashboard as an Organisation and open **Developers** in the menu.
2. Press **Start test mode**. Your practice organisation is made straight away, with sample data.
3. Make a **test key**. Test keys start with `tbc_test_` and only reach your practice organisation. Your production keys never reach it, and a test key never reaches your real organisation.

Send the key like any other key:

```bash
curl https://go.thebuilding.cloud/api/entrances \
  -H "Authorization: Bearer tbc_test_…" \
  -H "Accept: application/json"
```

## What is in it

- one site and one building,
- three **virtual doors**: "Front door", "Car park gate" and "Bin store",
- one entrance group, "Residents", with all three doors,
- five people, "Test Resident 1" to "Test Resident 5", with `@example.test` email addresses and no phone numbers,
- keypad PINs for two of them,
- a few past door events, so the access log isn't empty.

**Reset to sample data** on the Developers page removes everything you made and brings the sample data back. Your test keys stay.

## What you can do with a test key

Read everything in your practice organisation, and create, change and delete:

| What | Most you can have |
|---|---|
| Sites | 5 |
| Buildings | 10 |
| Doors | 25 |
| Entrance groups | 20 |
| People | 100 |
| PINs | 200 |
| Webhooks | 5 |

You can also open its doors (`POST /api/entrances/{id}/unlock`) and add people to entrance groups or take them out.

Above a limit you get `422` with a message such as *"Test mode allows up to 25 doors. Delete one or reset the practice organisation."*

### Rules in test mode

- **Doors are always virtual.** They have no controller, so opening one moves nothing: the event is written to the access log of your practice organisation (`GET /api/access-logs`), and you get the same answer as for a real door.
- **People need an `@example.test` email address** that nobody else uses, and get no phone number. They can be door users, employees, visitors or guests (`role_id` 4, 6, 7 or 8).
- **PINs** can be keypad codes or cards (`pin_type` `default` or `code`), with the Unlimited time limit (`single_pin_timer_id` 1).
- **No files or photos**, and request bodies up to 64 KB.
- Ids in a request (site, building, door, entrance group, person) must be your practice organisation's own.

### Not available in test mode

Billing and plans, user import, the Notice Board, door schedules, intercom calls, automations, FireBird controllers and firmware, other devices, roles, API tokens and account settings. A test key gets `403` with a short message for these.

## Request limits

Test keys have their own limits, separate from your production keys:

- 60 requests a minute,
- 20 changes (POST, PUT, PATCH, DELETE) a minute,
- 1,000 changes a day.

Above them you get `429` with a `Retry-After` header: wait that many seconds and try again.

## The test outbox

Nothing in test mode is ever sent to anyone. Emails that would go to the people of your practice organisation — for example the welcome email when you add a person — are kept in the **test outbox** on the Developers page instead.

The outbox and the door events keep the newest 1,000 items for 30 days.

## When it is removed

A practice organisation you don't use for 30 days is removed, with everything in it. We email you a week before. Any call with a test key keeps it.

---

# Webhooks

A webhook is an address on your system that we call when something happens in your organisation. Instead of asking the API again and again, you wait for us to tell you.

There are two kinds of delivery:

- **Signed events**: signed with your webhook's own secret, retried when your system is down, and logged so you can see and replay every delivery.
- **The original monthly usage webhook** (`monthly_location_usage`): sent once, unsigned, with its original body. It is kept exactly as it was, so existing integrations keep working.

## Events you can subscribe to

| Event | Signed | When it is sent | What `data` contains |
|---|---|---|---|
| `webhook.test` | Yes | Only when you send a test event. Never sent by itself. | A `message` and the `webhook` (`id`, `name`). |
| `monthly_location_usage` | No (original) | After each monthly subscription payment, once per active building with entrances. | Not wrapped: the body is the site (`location`), the `building` and its usage as `items` (see below). |

More signed events are on the way: doors opened or refused, intercom calls, people added or changed, alarms, devices going offline and more. They will appear in the event list below as soon as they are live.

**The always up-to-date list** is in the API: `GET /api/webhooks/event-types` returns every event with its `type`, `version`, `group`, `title`, `description`, whether it is `signed` (or `legacy`), and a `sample` of its `data`.

```bash
curl https://go.thebuilding.cloud/api/webhooks/event-types \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

## Set one up

**In the dashboard** (Organisation account): open your **Profile**, choose **Webhooks**, add the address, choose the event and save. **Test Webhook** sends a sample delivery straight away and shows what we sent and what your system answered. The page offers the original monthly usage event today; picking signed events, the secret and the delivery log are coming to the page next. Until then, use the API for them.

**With the API**: create the webhook with `POST /api/webhooks`. Send `events` as a list of event types (a comma list still works):

```bash
curl -X POST https://go.thebuilding.cloud/api/webhooks \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name": "My endpoint", "url": "https://example.com/tbc/webhook", "events": ["webhook.test"], "status": 1}'
```

The answer contains `signing_secret` (it starts with `whsec_`). **Copy it now: it is shown only this once.** Store it like a password, in your server's settings, never in a web page or an app.

Change the events later with `PUT /api/webhooks/{id}`. See **Webhook** in the [API reference](https://go.thebuilding.cloud/developers/reference) for every endpoint.

## What a signed delivery looks like

We send a `POST` with a JSON body. The body has the same shape for every event:

```http
POST /tbc/webhook HTTP/1.1
Content-Type: application/json
User-Agent: TheBuilding.Cloud-Webhooks/1.0
X-TBC-Event: webhook.test
X-TBC-Event-Id: evt_01jc8z6m4q7x2v9k3b5n8r1t0w
X-TBC-Delivery: dlv_01jc8z6m5a3d7f9h2k4m6p8r0s
X-TBC-Attempt: 1
X-TBC-Signature: t=1762531200,v1=5f2b…c9e1

{
  "id": "evt_01jc8z6m4q7x2v9k3b5n8r1t0w",
  "type": "webhook.test",
  "version": 1,
  "created_at": "2026-11-07T16:00:00Z",
  "organization_id": 42,
  "test": true,
  "data": {
    "message": "This is a test event from TheBuilding.Cloud.",
    "webhook": { "id": 12, "name": "My endpoint" }
  }
}
```

| Header | Meaning |
|---|---|
| `X-TBC-Event` | The event type. |
| `X-TBC-Event-Id` | The event's id, the same as `id` in the body. It stays the same on retries and replays: use it to ignore an event you have already handled. |
| `X-TBC-Delivery` | This delivery's id (`dlv_…`), as shown in the delivery log. |
| `X-TBC-Attempt` | 1 for the first try, 2 for the first retry, and so on. |
| `X-TBC-Signature` | The time we signed it (`t`) and one or more signatures (`v1`). |

`version` goes up only when an event's `data` changes in a way that could break your code. New fields can be added at any time, so ignore fields you don't know. Event data never contains PIN codes, passwords, keys, tokens or card numbers; people appear as an id and a name.

Answer with any `2xx` status within a few seconds and do the real work afterwards. We keep only your status code, never the body of your answer.

## Check the signature

Every signed delivery is signed with your webhook's secret: `v1` is the HMAC-SHA256 (hex) of the timestamp, a full stop and the raw body, exactly as received.

1. Read `t` and every `v1` from `X-TBC-Signature`.
2. Refuse the delivery if `t` is more than 5 minutes away from your clock.
3. Work out `HMAC-SHA256(secret, t + "." + raw body)` and compare it with each `v1` using a constant-time compare. Accept the delivery if one matches.

Use the raw body: parsing the JSON and encoding it again changes the bytes and the signature will not match.

In PHP:

```php
function tbcSignatureIsValid(string $secret, string $header, string $rawBody): bool
{
    $t = null;
    $signatures = [];
    foreach (explode(',', $header) as $part) {
        [$key, $value] = array_pad(explode('=', trim($part), 2), 2, '');
        if ($key === 't' && ctype_digit($value)) {
            $t = (int) $value;
        } elseif ($key === 'v1') {
            $signatures[] = $value;
        }
    }
    if ($t === null || abs(time() - $t) > 300) {
        return false;
    }
    $expected = hash_hmac('sha256', $t.'.'.$rawBody, $secret);
    foreach ($signatures as $signature) {
        if (hash_equals($expected, $signature)) {
            return true;
        }
    }
    return false;
}

$ok = tbcSignatureIsValid(getenv('TBC_WEBHOOK_SECRET'), $_SERVER['HTTP_X_TBC_SIGNATURE'] ?? '', file_get_contents('php://input'));
```

In Node.js (Express):

```js
import crypto from "node:crypto";
import express from "express";

const app = express();

app.post("/tbc/webhook", express.raw({ type: "application/json" }), (req, res) => {
  const header = req.get("X-TBC-Signature") || "";
  const parts = header.split(",").map((p) => p.trim().split("="));
  const t = Number(parts.find(([k]) => k === "t")?.[1]);
  const signatures = parts.filter(([k]) => k === "v1").map(([, v]) => v);
  if (!t || Math.abs(Date.now() / 1000 - t) > 300) return res.sendStatus(400);

  const expected = crypto.createHmac("sha256", process.env.TBC_WEBHOOK_SECRET)
    .update(`${t}.${req.body}`).digest("hex");
  const ok = signatures.some((s) => s.length === expected.length
    && crypto.timingSafeEqual(Buffer.from(s), Buffer.from(expected)));
  if (!ok) return res.sendStatus(400);

  res.sendStatus(200); // answer first, then handle JSON.parse(req.body)
});
```

## Rotate the secret

`POST /api/webhooks/{id}/rotate-secret` makes a new secret and answers with it once (`signing_secret`; it is never shown again). For the next 24 hours every delivery carries two `v1` signatures, one made with the new secret and one with the old, so you can switch your server to the new secret without missing an event. `previous_secret_valid_until` in the answer says when the old one stops.

Webhooks made before signing existed get a secret on their first signed delivery: rotate it to see it.

## Retries, failures and Resume

- When your system answers `2xx`, the delivery has **succeeded**.
- When it times out, can't be reached, or answers `5xx` or `429`, we try again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours. If the last try fails too, the delivery has **failed**.
- Any other answer (for example `400` or `404`) fails at once and is not retried.
- After 15 failed deliveries in a row the webhook is **paused**: nothing is sent and new events wait. The organisation gets a notice in the dashboard bell.
- When your system works again, press **Resume**: `POST /api/webhooks/{id}/resume`. The deliveries that were waiting are sent and the failure count starts again from zero.

Your system should cope with the same event arriving twice (for example after a timeout where your system did get it): use `X-TBC-Event-Id`.

## Delivery log and replay

Every delivery is kept for 30 days.

- `GET /api/webhooks/{id}/deliveries` lists one webhook's deliveries, newest first, 20 a page. Filter with `?status=pending`, `sending`, `retrying`, `succeeded` or `failed`. Each row shows the event type, status, attempts, your status code, how long it took, the reason it failed and when the next try is due.
- `GET /api/webhooks/deliveries/{delivery}` shows one delivery (`dlv_…`).
- `POST /api/webhooks/deliveries/{delivery}/replay` sends that event again as a new delivery with the same event id, for example after you fixed a bug. The webhook must be switched on and not paused. Test deliveries are not replayed: send a new test event.

## Send a test event

`POST /api/webhooks/{id}/test-event` sends a signed `webhook.test` delivery straight away (one try, `"test": true`) and answers with the result and the body we sent, so you can check your endpoint receives the delivery and verifies the signature. Send `{"event_type": "<type>"}` to get a sample of another signed event. Up to 10 test events a minute; test deliveries never count towards pausing a webhook.

```bash
curl -X POST https://go.thebuilding.cloud/api/webhooks/12/test-event \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

## Addresses we never call

We only call public internet addresses. An address that points to your own computer or a private network, such as `127.0.0.1`, `localhost`, `10.x.x.x`, `192.168.x.x` or a cloud server's internal metadata address, is refused and never called. We check where the name really points after looking it up, and we don't follow redirects, so a public name that leads to a private address is refused too.

A refused address shows a clear reason instead of a status code:

- on **Test Webhook** and in the delivery log, for example "The webhook address points to a private or reserved network address, which is not allowed.";
- in an automation's run history, when a **Call webhook** step uses such an address: the step fails with the same kind of reason.

To try webhooks on your own computer, use a tunnel service that gives you a public `https://` address.

Use an `https://` address. Plain `http://` still works for now, but it may be switched off later.

## The original monthly usage webhook

`monthly_location_usage` keeps its original body (no envelope, no signature) and is tried once:

```http
POST /your/webhook HTTP/1.1
Content-Type: application/json

{
  "location": "Riverside Park",
  "building": "Block B",
  "items": [
    { "name": "Per Entrance", "quantity": 2, "unit_price": 3, "description": "…" },
    { "name": "Tuya Devices", "quantity": 4, "unit_price": 0.5, "description": "Total number of Tuya smart devices in use" }
  ]
}
```

Every attempt is logged on the webhook with your system's answer or the error. Because it is not signed, use a long, unguessable address (for example with a random part in the path) and accept only `POST` with JSON.

---

# AI assistants and MCP

Our MCP server lets AI assistants work with your buildings in plain English: "who opened the car park gate this morning?", "add Sam to the Level 3 group", "open the side door". It speaks the Model Context Protocol, the open standard most assistants now support.

It works with **Claude** (web, desktop and Claude Code), **ChatGPT**, **Cursor**, **VS Code with GitHub Copilot**, **Windsurf**, **Gemini CLI**, **Codex CLI** and your own agents.

## What the assistant can do

Exactly what the person who connects it can do in the dashboard, and nothing more. It reads freely, and asks before anything that changes something (opening a door, adding a person). Secrets in replies are hidden.

## Connect

The public address for the MCP server is being set up. Email help@thebuilding.cloud and we'll send you the address and set-up steps for your assistant.

Assistants that can sign in (Claude, ChatGPT) only need the address. Tools that can't sign in send an API key as the header `Authorization: Bearer <your API key>` (see [Authentication and API keys](https://go.thebuilding.cloud/developers/guides/authentication)).

## Docs for AI

Every page here is also available as plain Markdown, which AI tools read best:

- Add `.md` to any guide's address, or press **Copy page for AI** at the top of the page.
- [`/developers/llms.txt`](https://go.thebuilding.cloud/developers/llms.txt) lists every page; [`/developers/llms-full.txt`](https://go.thebuilding.cloud/developers/llms-full.txt) is all the guides plus a list of every endpoint in one file.
- The [OpenAPI file](https://go.thebuilding.cloud/developers/openapi.json) describes every endpoint for code generators and agents.

---

# Postman, Bruno and OpenAPI

Everything here is generated from one OpenAPI file, so the collection, the reference and the MCP server always describe the same API.

## Postman

1. Download the [collection](https://go.thebuilding.cloud/developers/postman/collection.json) and an environment: [Live](https://go.thebuilding.cloud/developers/postman/environment-live.json) or [Staging](https://go.thebuilding.cloud/developers/postman/environment-staging.json).
2. In Postman choose **Import** and drop in both files.
3. Pick the environment in the top-right corner, open it and paste your API key into `token`.
4. Open any request and press **Send**.

The collection is grouped like the reference (Doors and access, People, FireBird controllers…). Every request already sends `Accept: application/json` and your key; path values such as `:id` are filled in on the **Params** tab.

## Bruno and Insomnia

Both import the OpenAPI file directly:

- **Bruno**: Collection → **Import Collection** → **OpenAPI V3** → choose [`openapi.json`](https://go.thebuilding.cloud/developers/openapi.json).
- **Insomnia**: **Import** → paste `https://go.thebuilding.cloud/developers/openapi.json`.

Add a Bearer token with your API key on the collection.

## OpenAPI

- [`openapi.json`](https://go.thebuilding.cloud/developers/openapi.json) and [`openapi.yaml`](https://go.thebuilding.cloud/developers/openapi.yaml) (OpenAPI 3.0).
- Generate a client in almost any language with [OpenAPI Generator](https://openapi-generator.tech) or your language's own tools.
- The file is updated every time we release. Endpoints that tools rely on are checked automatically so they are not dropped by accident.

## cURL

Every endpoint in the [API reference](https://go.thebuilding.cloud/developers/reference) has a ready-to-copy cURL example, as well as JavaScript, PHP and Python.

---

# Open a door from your own app

A reception desk, a visitor kiosk or your own staff app can open doors with one request. This recipe finds the door, opens it and handles every answer.

**You need:** an API key from an account that may open the door (see [Authentication and API keys](https://go.thebuilding.cloud/developers/guides/authentication)).

## 1. Find the door

List the entrances the key can see. Filter by building if you know it:

```bash
curl "https://go.thebuilding.cloud/api/entrances?building_id=7&per_page=50" \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

Keep the `id` of the door. Entrance IDs don't change, so you can store them in your app's settings instead of looking them up every time. `status` `1` means the entrance is turned on.

## 2. Open it

```bash
curl -X POST https://go.thebuilding.cloud/api/entrances/42/unlock \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

The same request in JavaScript:

```js
const res = await fetch(`https://go.thebuilding.cloud/api/entrances/${doorId}/unlock`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.TBC_KEY}`, Accept: "application/json" },
});
const body = await res.json();
if (!res.ok) throw new Error(body.message);
```

And in PHP (Laravel):

```php
$res = Http::withToken(config('services.tbc.key'))
    ->acceptJson()
    ->post("https://go.thebuilding.cloud/api/entrances/{$doorId}/unlock");

if ($res->failed()) {
    throw new RuntimeException($res->json('message'));
}
```

## 3. Handle the answer

| Status | What happened | What to show |
|---|---|---|
| `200` | The door was told to open. The opening is logged under the key's person. | "Door open". |
| `403` | No access to this door, the entrance is turned off, or the person is too far away for a door that only opens nearby. | The `message` as it is. |
| `404` | The ID is wrong, the door isn't in this organisation, or its controller isn't set up ("Firebird Device Not Found."). | "Door not found" and check your settings. |
| `422` | The door only opens nearby and no position was sent. | Ask for the location and send it (below). |
| `429` | Too many requests. | Wait the seconds in `Retry-After`. |

A `200` means the command was sent. If the door's controller is offline the door may not move; the access log shows what really happened.

## Doors that only open nearby

Some doors are set to open only when the person is close to the building. Send their position in the body:

```bash
curl -X POST https://go.thebuilding.cloud/api/entrances/42/unlock \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"lat": 51.5072, "lng": -0.1276}'
```

## Opening for someone else

A reception desk often opens the door for a visitor. Managers (Organisation, Operator) can add `"user_id": <the person's ID>` to the body, and the access log names that person instead.

## Don't

- Don't retry an opening automatically after a timeout: the door may already have opened. Check the access log first.
- Don't put the API key in a web page or a mobile app. Call the API from your server.

---

# Read the access log

The access log records every door opening and refusal: who, which door, when and how (passkey, PIN, app, intercom…). Read it page by page, or export it as a file for your reporting tools.

**You need:** an API key from an account that may see the access log (Organisation, or an Operator with access logs allowed).

## Page through the log

```bash
curl "https://go.thebuilding.cloud/api/access-logs?per_page=100&from_date=2026-10-01&to_date=2026-11-01" \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

Useful filters:

| Parameter | What it does |
|---|---|
| `from_date`, `to_date` | Only events in this period. Send both. A plain date (`YYYY-MM-DD`) means the start of that day, so `to_date=2026-11-01` includes all of 31 October. |
| `search` | Free text, such as a person's name or a door. |
| `event_type` | Only one kind of event (the `event_type` value of the rows). |
| `access_status` | `rejected` for refused PIN attempts only. |
| `per_page`, `page` | Paging (see [Lists, paging and limits](https://go.thebuilding.cloud/developers/guides/lists-and-limits)). |

The newest events come first. To collect a whole month, start at page 1 and keep going until you reach the last page.

For one building only, use `GET /api/buildings/{id}/access-logs`.

## Export a file instead

For big ranges, ask for an export. It runs in the background, so it is faster and doesn't use up your request limit:

```bash
curl -X POST https://go.thebuilding.cloud/api/exports \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"type": "access-logs", "export_params": {"from_date": "2026-10-01", "to_date": "2026-11-01"}}'
```

```json
{ "success": true, "message": "Export queued successfully", "data": { "export_id": 318, "total_records": 12840 } }
```

Check on it every few seconds until `status` is `completed` (or `failed`):

```bash
curl https://go.thebuilding.cloud/api/exports/318 \
  -H "Authorization: Bearer $TBC_KEY" \
  -H "Accept: application/json"
```

Then download the file. Access log exports are a `.zip` with one or more CSV files inside (big logs are split into parts):

```bash
curl -L -o access-log.zip https://go.thebuilding.cloud/api/exports/318/download \
  -H "Authorization: Bearer $TBC_KEY"
```

The export uses the same filters as the list. Other exports (`parking-logs`, `intercom-calls`, `invoices`, …) work the same way; some can also be `html` or `pdf` with `"export_format"`.

---

# Endpoints

Base URL: https://go.thebuilding.cloud/api — send `Authorization: Bearer <key>` and `Accept: application/json`. Public endpoints are marked (no key).


## Getting started › Authentication

- `POST /auth-token` (no key) — Get an API token

## Places › Organizations

- `GET /organizations` — Get list of organizations

## Places › Site

- `GET /sites` — Get list of sites
- `POST /sites` — Create new site
- `GET /sites/{id}` — Get details of site
- `PUT /sites/{id}` — Update existing site
- `DELETE /sites/{id}` — Delete existing Site
- `GET /sites/deactivate/{id}` — Deactivate Site
- `GET /sites/activate/{id}` — Activate Site
- `GET /sites/{id}/usage-count` — Get usage report
- `PATCH /sites/{id}/intercom-settings` — Update location intercom settings

## Places › Building

- `GET /buildings` — Get list of buildings
- `POST /buildings` — Create new building
- `GET /buildings/dropdown` — Get list of building
- `GET /buildings/{id}` — Get details of building
- `PUT /buildings/{id}` — Update existing building
- `DELETE /buildings/{id}` — Delete existing Building
- `GET /buildings/deactivate/{id}` — Deactivate Building
- `GET /buildings/activate/{id}` — Activate Building
- `GET /buildings/{id}/entrances` — Get list of entrances in a building
- `GET /buildings/{id}/usage` — Get Building Usage
- `GET /buildings/{id}/access-logs` — Get building-scoped access logs
- `GET /buildings/{id}/invoices` — Get Building Invoices

## Places › Building Group

- `GET /building-groups` — Get list of building-groups
- `POST /building-groups` — Create new building group
- `GET /building-groups/dropdown` — Get list of building-groups
- `GET /building-groups/{id}` — Get details of building group
- `PUT /building-groups/{id}` — Update existing building group
- `DELETE /building-groups/{id}` — Delete existing Building Group
- `GET /building-groups/deactivate/{id}` — Deactivate Building Group
- `GET /building-groups/activate/{id}` — Activate Building Group
- `DELETE /building-groups/unlink-user/{id}` — Unlink user from building group
- `POST /building-groups/link-user/{id}` — link User to Building Group

## Places › Visualizer

- `GET /visualizers` — Get all visualizers
- `GET /visualizer-objects` — List visualizer objects
- `POST /visualizer-objects` — Create visualizer object
- `PUT /visualizer-objects/{id}` — Update visualizer object
- `DELETE /visualizer-objects/{id}` — Delete visualizer object

## Doors and access › Entrance

- `GET /entrances/{id}/door-schedules` — Door schedules
- `POST /entrances/{id}/door-schedules` — Add a door schedule
- `GET /door-schedules` — Door schedules of every entrance you manage
- `GET /entrances` — Get list of entrances
- `POST /entrances` — Create new entrance
- `GET /entrances/dropdown` — Get list of entrances
- `GET /entrances/{id}` — Get details of entrance
- `PUT /entrances/{id}` — Update existing entrance
- `DELETE /entrances/{id}` — Delete existing Entrance
- `GET /entrances/deactivate/{id}` — Deactivate Entrance
- `GET /entrances/activate/{id}` — Activate Entrance
- `POST /entrances/{id}/unlock` — Open an entrance
- `POST /entrances/unlock/{entranceId}/{userId}` — Unlock Entrance
- `GET /entrances/intercom-buildings/{id}` (no key) — Buildings of the entrance's location for the visitor intercom page
- `GET /entrances/intercom-buildings/{id}/{buildingId}/access-groups` (no key) — Entrance groups of a building, for a group call from the visitor intercom page
- `GET /entrances/intercom-buildings/{id}/{buildingId}/access-users` (no key) — Users of a building, for an individual call from the visitor intercom page

## Doors and access › Entrance Group

- `GET /entrance-groups` — Get list of entrance groups
- `POST /entrance-groups` — Create new entrance group
- `GET /entrance-groups/{id}` — Get details of entrance group
- `PUT /entrance-groups/{id}` — Update existing entrance group
- `DELETE /entrance-groups/{id}` — Delete existing entrance group
- `GET /entrance-groups/deactivate/{id}` — Deactivate Entrance Group
- `GET /entrance-groups/activate/{id}` — Activate Entrance Group
- `POST /entrance-groups/send-invitation` — Send entrance group invitation
- `GET /entrance-groups/{entranceGroupId}/users` — Fetch entrance group users
- `POST /entrance-groups/link-user/{entranceGroupId}` — link User to entrance Group
- `DELETE /entrance-groups/unlink-user/{id}` — unlink User from entrance Group
- `GET /entrance-groups/deactivate/entrance-user/{permissionId}` — Deactivate Entrance Group user
- `GET /entrance-groups/activate/entrance-user/{permissionId}` — Activate Entrance Group user

## Doors and access › Entrance Pin

- `GET /entrance-pins` — Get list of entrance pins
- `POST /entrance-pins` — Create new entrance pin
- `GET /entrance-pins/{id}` — Get details of entrance pin
- `PUT /entrance-pins/{id}` — Update existing pin
- `DELETE /entrance-pins/{id}` — Delete existing entrance pin
- `GET /entrance-pins/restore/{id}` — Restore existing entrance pin
- `GET /entrance-pins/resync-pins/{user}` — Resync all pins
- `GET /user-pins/restore/{id}` — Restore existing user pin

## Doors and access › User Pin

- `GET /user-pins` — Get list of user-pins
- `DELETE /user-pins/{id}` — Delete existing User-pin
- `DELETE /user-pins/destroy-permanent/{id}` — Delete existing user-pin

## Doors and access › Device timers

- `GET /device-timers` — Get list of Device timers
- `POST /device-timers` — Create new Device Timer
- `GET /device-timers/all` — Get list of Device timers
- `GET /device-timers/{id}` — Get details of Device Timer
- `PUT /device-timers/{id}` — Update existing Device Timer
- `DELETE /device-timers/{id}` — Delete existing Device Timer

## Doors and access › Access Logs

- `GET /access-logs` — List access control logs
- `GET /easyset-devices/event-log` — (Deprecated) List access logs
- `DELETE /access-logs/{id}` — Delete an access log row
- `DELETE /easyset-devices/event-log/{id}` — (Deprecated) Delete access log

## People › User

- `GET /users/{id}/guest-access` — Guest access end date and status
- `POST /users/{id}/guest-access` — Set a guest's access end, or re-enable a suspended guest
- `POST /users/{id}/guest-access/keep` — Keep a suspended guest for 30 more days before deletion
- `GET /users` — Get list of user
- `POST /users` — Create new user
- `GET /users/{id}` — Get details of user
- `PUT /users/{id}` — Update existing user
- `DELETE /users/{id}` — Delete existing User
- `DELETE /users/destroy-permanent/{id}` — Delete existing User
- `GET /users/restore/{id}` — Restore existing User
- `GET /users/verify/{id}` — Verify existing User
- `GET /users/unverify/{id}` — Unverify existing User
- `GET /users/activate/{id}` — Activate existing User
- `GET /users/deactivate/{id}` — Deactivate existing User
- `GET /users/entrance-users` — Get list of entrance-users
- `GET /users/org-users` — Get list of organization users
- `GET /users/visitors` — Get list of visitor users
- `GET /users/employees` — Get list of employees users
- `GET /users/tokens` — Get list of Tokens of Current User
- `POST /users/tokens` — Generate new Token of Current User
- `DELETE /users/tokens/{id}` — Delete existing User token
- `GET /users/resend-unverified-email` — Resend Emails to unverified existing Users
- `POST /users/building-update` — Update building of existing user
- `PUT /users/nexmo/update/{id}` — Nexmo Credential Update for user
- `PUT /users/tuya/update/{id}` — Tuya Credential Update for user
- `PUT /users/easyset/update/{id}` — Easyset Credential Update for user
- `POST /users/sim-credential/update/{id}` — Sim Credential Credential Update for user
- `GET /users/account-switch/{id}` — Switch User Organisation
- `GET /users/theme/{id}` — Change User Theme

## People › Meeting

- `GET /meeting` — List meetings
- `POST /meeting` — Book a visitor
- `GET /meeting/{id}` — Get one meeting
- `PUT /meeting/{id}` — Edit a meeting
- `DELETE /meeting/{id}` — Delete a meeting
- `GET /meeting/change-status/{id}` — End a meeting (mark complete)
- `POST /meeting/{id}/check-in` — Mark the visitor as arrived
- `POST /meeting/{id}/check-out` — Check the visitor out / end the meeting
- `POST /meeting/{id}/approve` — Approve a visitor's request
- `POST /meeting/{id}/decline` — Decline a visitor's request
- `POST /meeting/{id}/cancel` — Cancel a meeting
- `POST /meeting/{id}/extend` — Make a meeting longer
- `POST /meeting/{id}/resend` — Email the visitor their pass again
- `GET /meeting/download-card/{id}` — Download the visitor card (PDF)
- `GET /meeting/invitation-link` — Visitor self-registration and reception kiosk links
- `GET /meeting/options` — Hosts, doors and defaults for the meeting form
- `GET /meeting/visitors` — Search this organisation's visitors
- `POST /meeting/visitors` — Add a visitor
- `GET /meeting/settings` — Meeting settings for this organisation
- `PUT /meeting/settings` — Change meeting settings
- `GET /meeting/{id}/badge` — Visitor badge
- `GET /meeting/roll-call` — Visitors on site now
- `GET /meeting/blocked` — Blocked visitors
- `POST /meeting/blocked` — Block a visitor
- `GET /meeting/hosts` — Hosts and their settings
- `PUT /meeting/hosts/{id}` — Change a host's settings
- `GET /meeting/hosts/me` — My host settings
- `GET /meeting/organisations` — Organisations (super admin)

## People › Notice board

- `GET /notice-board` — Get buildings, entrance groups and people to notify
- `POST /notice-board` — Send a notice

## People › Notification

- `GET /notifications` — Get list of notifications

## People › Support

- `POST /support/send` — Sent message to support
- `GET /help/feedback` — Help centre feedback (Super Admin)

## Intercom › Intercom

- `GET /intercom-calls` — List intercom call history
- `POST /intercom-calls` (no key) — Create intercom call (visitor)
- `GET /intercom-calls/{id}` (no key) — Get intercom call by call_request_id
- `PUT /intercom-calls/{id}` (no key) — Update intercom call status
- `DELETE /intercom-calls/{id}` — Delete intercom call record

## Automation › Automation

- `POST /automation-scene/runs/{runId}/acknowledge` — Acknowledge a run (stops an escalation that checks {{ run.acknowledged }})
- `GET /automation-scene/{id}/versions` — Saved versions of a rule, newest first
- `POST /automation-scene/{id}/versions/{version}/restore` — Restore an earlier version (saved as a new version)
- `GET /automation-scene/connections` — The organisation's saved connections (secrets never returned)
- `POST /automation-scene/connections` — Save a connection
- `GET /automation-scene` — Get list of automation scenes
- `POST /automation-scene` — Create new automation scene
- `GET /automation-scene/module-events` — Get list of automation module events
- `GET /automation-scene/{id}` — Get details of automation scene
- `PUT /automation-scene/{id}` — Update an automation rule
- `DELETE /automation-scene/{id}` — Delete existing automation scene
- `POST /automation-scene/sync-operators/{id}` — Sync operators with autoamtion scene.
- `GET /automation-scene/test-scene/{id}` — Test automation scene

## Automation › Webhook

- `GET /webhooks` — List Webhooks
- `POST /webhooks` — Create Webhook
- `PUT /webhooks/{id}` — Update Webhook
- `DELETE /webhooks/{id}` — Delete Webhook
- `GET /webhooks/event-types` — List webhook event types
- `GET /webhooks/{id}/deliveries` — List a webhook's deliveries
- `GET /webhooks/deliveries/{delivery}` — Show one delivery
- `POST /webhooks/deliveries/{delivery}/replay` — Replay a delivery
- `POST /webhooks/{id}/test-event` — Send a test event
- `POST /webhooks/{id}/rotate-secret` — Rotate a webhook's signing secret
- `POST /webhooks/{id}/resume` — Resume a paused webhook

## Issue reports › Issue Report

- `GET /issue-report` — Get list of Issues
- `POST /issue-report` — Create new Issue
- `GET /issue-report/{id}` — Get one Issue
- `DELETE /issue-report/{id}` — Delete existing Issue
- `POST /issue-report/change-status/{id}` — Change Status of Issue
- `GET /issue-report/change-read-status/{id}` — Change read Status of Issue
- `GET /issue-report/show-comments/{id}` — Get list of Comments by issue-report Id
- `POST /issue-report/add-comment` — Create new Comment
- `GET /issue-report/generate-report/{id}` — get comments report of Issue

## Issue reports › Issue Report Categories

- `GET /issue-report-categories` — Get list of ticket categories
- `POST /issue-report-categories` — Create new category
- `GET /issue-report-categories/{id}` — Get details of Category
- `PUT /issue-report-categories/{id}` — Update existing category
- `DELETE /issue-report-categories/{id}` — Delete existing Category
- `GET /issue-report-categories/deactivate/{id}` — Deactivate category
- `GET /issue-report-categories/activate/{id}` — Activate Category
- `POST /issue-report-categories/add-questions` — Create new category questions
- `POST /issue-report-categories/update-question/{id}` — Update category questions
- `DELETE /issue-report-categories/delete-question/{cat_id}/{id}` — Delete existing Question

## FireBird controllers › FireBird

- `GET /firebirds` — Returns the list of devices
- `POST /firebirds` — Adding a new device
- `GET /firebirds/{imei}` — Get Alarm Device
- `PUT /firebirds/{id}` — Update device
- `DELETE /firebirds/{id}` — Delete device
- `GET /firebirds/deactivate/{id}` — Deactivate device
- `GET /firebirds/activate/{id}` — Activate device
- `POST /firebirds/command` — Send a command
- `GET /firebirds/add-device` — Add add Device By Imei
- `POST /firebirds/toggle-relay` — Update firebird relay status
- `POST /firebirds/update-io-title` — Update firebird input output title
- `POST /firebirds/update-io-relation-timer` — Update firebird input output relation timer
- `POST /firebirds/update-board-info` — Update firebird board info
- `POST /firebirds/delete-board` — Delete firebird board
- `GET /firebirds/sim/{iccid}` — Get SIM details by ICCID
- `GET /firebirds/sim/{iccid}/network` — Get SIM network status
- `GET /firebirds/sim/update` — update sim detail
- `GET /firebirds/sim/{iccid}/top-up` — Create SIM top-up order
- `GET /firebirds/sim/{iccid}/auto-top-up/{status}` — Enable or disable SIM auto top-up
- `GET /firebirds/sim/{iccid}/usage/{type}` — Get SIM data usage quota
- `GET /firebirds/sim/{iccid}/reset` — Reset SIM network connection

## FireBird controllers › FireBird Events

- `GET /firebird-events` — Get List of FireBird Events
- `POST /firebird-events` — Store FireBird Event
- `GET /firebird-events/{imei}` — Show FireBird Event
- `DELETE /firebird-events/{imei}` — Delete FireBird Event
- `POST /firebird-events/deleteAll` — Delete all FireBird Event

## FireBird controllers › FireBird I/O Logs

- `GET /firebird-iologs` — Get List of FireBird Events
- `DELETE /firebird/iologs/{id}` — Delete FireBird I/O Event
- `GET /firebird/iologs/deleteAll/{id}` — Delete all FireBird Event

## FireBird controllers › FireBird Reports

- `GET /reports` — Get list of reports
- `GET /reports/{id}` — Get details of report
- `DELETE /reports/{id}` — Delete existing report
- `POST /reports/generateReport` — get FireBird report
- `POST /reports/sendReport` — Send FireBird report

## FireBird controllers › FireBird OTA

- `GET /firebird-ota/enrollments` — New units asking to be set up for remote updates
- `POST /firebird-ota/enrollments/{id}/approve` — Approve a new unit for remote updates
- `POST /firebird-ota/enrollments/{id}/reject` — Refuse a unit that asked to be set up for remote updates
- `POST /firebird-ota/enrollments/{id}/resend` — Ask an approved unit again to fetch its device key
- `GET /firebird-ota/releases` — Firmware releases per hardware family
- `POST /firebird-ota/releases` — Publish new firmware from a zipped firmware folder
- `POST /firebird-ota/releases/promote` — Make a published version the recommended one
- `POST /firebird-ota/models` — Rename a hardware model
- `GET /firebird-ota/fleet` — Units per hardware family and firmware version
- `GET /firebird-ota/rollouts` — List firmware rollouts
- `POST /firebird-ota/rollouts` — Start a staged rollout
- `GET /firebird-ota/rollouts/{id}` — One rollout with every unit's status
- `POST /firebird-ota/rollouts/{id}/pause` — Pause a rollout (units already updating finish normally)
- `POST /firebird-ota/rollouts/{id}/resume` — Resume a paused rollout
- `POST /firebird-ota/rollouts/{id}/cancel` — Cancel a rollout (no further units are updated)
- `GET /firebird-ota/latest` — Recommended (stable) firmware version per hardware model
- `GET /firebird-ota/choices` — Firmware versions this user can install, per hardware model
- `POST /firebird-ota/releases/settings` — Offer a version to organisations, or edit its notes
- `GET /firebird-ota/devices/{id}` — Firmware state of one FireBird and the releases that can be installed
- `POST /firebird-ota/devices/{id}/update` — Update the firmware of one FireBird now

## Other devices › Easyset-devices

- `GET /easyset-devices` — Get list of Easyset devices
- `GET /easyset-devices/sync-devices` — Get list of Easyset devices after sync
- `GET /easyset-devices/{id}` — Get details of easyset-device
- `PUT /easyset-devices/{id}` — Update existing Easyset Device
- `GET /easyset-devices/unlock/{id}` — Unlock entrance of easyset-device
- `GET /easyset-devices/send-changes/{id}` — Send Changes To Device of easyset-device
- `GET /easyset-devices/response/{operationId}/{deviceId}` — Get Response of Device changes
- `GET /easyset-devices/abort-operation/{id}` — Abort Operation of Device changes
- `POST /easyset-devices/event-log` (no key) — Store Easyset devices event log
- `GET /easyset-devices/device-service-buttons/{id}` — Get Response of Device Service Buttons
- `GET /easyset-devices/dev-intercom-apartment/{id}/{position}` — Get the intercom apartment buttons of an Easyset device
- `POST /easyset-devices/device-service-buttons` — Store Easyset devices service-buttons
- `POST /easyset-devices/dev-intercom-apartment` — Store Easyset devices Intercom-buttons
- `GET /easyset-devices/fw-upgrade/{deviceId}` — Upgrade device firmware
- `GET /easyset-devices/add-device` — Add add Device By Imei
- `GET /easyset-devices/device-admins/{id}` — Get Device admin tab settings
- `POST /easyset-devices/device-admins/{id}` — Update Device admin tab settings
- `GET /easyset-devices/device-admin-general/{id}` — Get Device AdminGeneralSetting tab settings
- `GET /easyset-devices/device-digital-interface/{id}` — Get Device digital-interface tab settings
- `POST /easyset-devices/device-digital-interface/{id}` — Update Device digital-interface tab settings
- `GET /easyset-devices/device-outputs-setting/{id}` — Get Device outputs-setting tab settings
- `POST /easyset-devices/device-outputs-setting/{id}` — Update Device outputs-setting tab settings
- `GET /easyset-devices/device-inputs/{id}` — Get Device device-inputs tab settings
- `POST /easyset-devices/device-inputs/{id}` — Update Device device-inputs tab settings
- `GET /easyset-devices/device-misc/{id}` — Get Device device-misc tab settings
- `POST /easyset-devices/device-misc/{id}` — Update Device device-misc tab settings
- `GET /easyset-devices/export-settings/{id}` — Export Device settings

## Other devices › Burglar Alarm

- `GET /burglar-alarms` — Returns the list of burglar alarm devices
- `POST /burglar-alarms` — Adding a new device
- `GET /burglar-alarms/{id}` — Get Alarm Device
- `PUT /burglar-alarms/{id}` — Update device
- `DELETE /burglar-alarms/{id}` — Delete device
- `GET /burglar-alarms/deactivate/{id}` — Deactivate device
- `GET /burglar-alarms/activate/{id}` — Activate device
- `GET /burglar-alarm-events` — Get list of events
- `POST /burglar-alarm-events` — Store Alarm Events
- `GET /burglar-alarm-events/{account_id}` — Get specific alarm device events
- `DELETE /burglar-alarm-events/{id}` — Delete  event

## Other devices › Parking Sensor

- `GET /parking-sensor` — Returns the list of devices
- `POST /parking-sensor` — Adding a new device
- `GET /parking-sensor/{imei}` — Get Parking Sensor
- `PUT /parking-sensor/{id}` — Update device
- `DELETE /parking-sensor/{id}` — Delete device
- `GET /parking-sensor/deactivate/{id}` — Deactivate device
- `GET /parking-sensor/activate/{id}` — Activate device
- `POST /parking-sensor/command` — Send a command

## Other devices › Parking Sensor Event

- `POST /parking-sensor-events` — Store Parking Sensor Event
- `GET /parking-sensor-events/{imei}` — Show Parking Sensor Event
- `DELETE /parking-sensor-events/{imei}` — Delete Parking Sensor Event
- `POST /parking-sensor-events/deleteAll` — Delete all Parking Sensor Event

## Other devices › Parking Sensor Events

- `GET /parking-sensor-events` — Returns the list of devices events

## Other devices › Parking Camera

- `GET /parking-cameras` — Get list of parking cameras

## Other devices › Tuya smart devices

- `GET /smart-devices` — List Tuya smart devices
- `GET /smart-devices/{smart_device_id}` — Get smart device details
- `POST /smart-devices/toggleSwitch` — Turn the device on/off
- `POST /smart-devices/changeBrightness` — change Brightness

## Other devices › Other Devices

- `POST /dev-permissions` — Create new record
- `PUT /dev-permissions/{id}` — Update existing device
- `DELETE /dev-permissions/{id}` — Delete existing record
- `GET /dev-permissions/{id}/{type}` — List cloud devices assignable to a building permission row

## Other devices › Device group

- `GET /device-groups` — Get list of device-groups
- `POST /device-groups` — Create new Device group
- `GET /device-groups/dropdown` — Get list of Device group
- `PUT /device-groups/{id}` — Update existing Device group
- `DELETE /device-groups/{id}` — Delete existing Device group
- `GET /device-groups/deactivate/{id}` — Deactivate Device group
- `GET /device-groups/activate/{id}` — Activate device-groups

## Other devices › Device Event Log

- `GET /device-event/tuya` — Get list of event
- `GET /device-event/easyset` — Get list of event

## Reports and exports › Exports

- `GET /exports` — List export jobs
- `POST /exports` — Queue an async export job
- `GET /exports/{export}` — Get export job status
- `GET /exports/{id}/download` — Download completed export file
- `GET /exports/statistics` — Export job counts by status
- `GET /exports/account-modules` — List account-data export modules

## Reports and exports › Charts

- `GET /user_charts` — Get user chart
- `GET /entrance_charts` — Get entrance chart
- `GET /issue-reports-charts` — Get issue reports chart

## Reports and exports › Background status

- `GET /background-status/groups` — Get list of background notifications status
- `GET /background-status` — Get list of background notifications status
- `GET /background-status/{id}` — Restart background-status
- `DELETE /background-status/{id}` — Delete existing background-status
- `DELETE /background-status/clear-all` — Delete all existing background-status

## Reports and exports › Background Notification

- `GET /bg-notifications` — Get list of background notifications group

## Reports and exports › Application settings

- `GET /application-settings` — Get list of application-settings
- `PUT /application-settings/{id}` — Update existing application-settings

## More › Partner Control Centre

- `GET /partner-admin/overview` — Programme numbers: partners, countries, partner-sourced revenue, commission owed
- `GET /partner-admin/stock` — FireBird stock: units in the pool, with partners, grey market, paid orders to fill
- `POST /partner-admin/devices/check` — Check scanned or pasted IMEIs before allocating them
- `POST /partner-admin/orders/{id}/devices` — Allocate FireBird units to a paid order by IMEI
- `DELETE /partner-admin/orders/{id}/devices/{imei}` — Take a wrongly scanned unit off an order before it ships
- `GET /partner-admin/returns` — Returns (RMA) of FireBird units from partners
- `POST /partner-admin/returns/{id}/decide` — Approve or reject an open return
- `POST /partner-admin/returns/{id}/replacement` — Send the replacement unit for an approved return
- `POST /partner-admin/returns/{id}/received` — Mark the faulty unit of a return as received

## More › Partner Hub

- `POST /partner-applications` (no key) — Apply to become a partner (public)
- `GET /partner-hub/home` — Partner home: earnings, payout, recurring revenue, pipeline, tier, alerts, orders
- `GET /partner-hub/devices/summary` — Counts for the partner's FireBird units
- `GET /partner-hub/devices` — The partner's FireBird units: My stock, claimed, active
- `GET /partner-hub/returns` — The partner's returns (RMA) of FireBird units
- `POST /partner-hub/returns` — Open a return for one of the partner's FireBird units
- `POST /partner-hub/orders/{id}/pay` — Pay a shop order by card or Direct Debit
- `POST /partner-hub/orders/{id}/customer-pay-link` — Get a pay link for your customer
