

# iglooworks Documentation

Welcome to the iglooworks API documentation. iglooworks is a revolutionary smart access solution that supports both online and offline access needs. Our patented algoPIN technology allows you to grant access without WiFi or cellular data.

This API exposes a number of functionalities supported on the iglooworks app, such as:

- algoPIN codes
- Remote control via a Bridge
- Notifications via Webhooks

## HTTP Request Header Format

| Key | Value |
| --- | --- |
| Authorization | `Bearer {access_token}` |
| Content-Type | `application/json` |

See [Getting Started with client credentials iglooworks API](/works/getting-started-client-credentials) (build for yourself) or [Getting Started with code flow iglooworks API](/works/getting-started-code-flow) (build for others) on how to get an access token.

The iglooworks API supports JSON only. Set `Accept` and `Content-Type` to `application/json`.

```
<METHOD> <URL> HTTP/1.1
Accept: application/json
Content-Type: application/json
```

Example cURL:

```bash
curl -X POST -H "Authorization: Bearer {access_token}" -H "Accept: application/json" -H "Content-Type: application/json"
```

## Architecture

iglooworks supports two integration paths depending on who is authenticating:

<!-- table:build-compare -->
| | Build for yourself | Build for others |
| --- | --- | --- |
| Flow | OAuth 2.0 Client Credentials | OAuth 2.0 Authorization Code |
| Who authenticates | Your own account | Each end user, per organization |
| Guide | [Client credentials](/works/getting-started-client-credentials) | [Code flow](/works/getting-started-code-flow) |

### Your server to our server

Server-to-server integrations (no end user login) use the OAuth 2.0 Client Credentials flow via **iglooworks API** — build for yourself. Your backend authenticates directly with its own Client ID and Secret. See [Getting Started with iglooworks API](/works/getting-started-client-credentials).

```mermaid
sequenceDiagram
    participant Y as Your Server
    participant O as Our Server
    Note over O: iglooworks API
    Y->>O: HTTP Request
    O-->>Y: HTTP Response
```

### Bridge-connected devices

Devices behind a Bridge are controlled through asynchronous remote jobs: your server queues a job (lock, unlock, create PIN) against the Bridge, and the Bridge executes it against the device and reports status back via webhook.

```mermaid
sequenceDiagram
    participant Y as Your Server
    participant O as Our Server
    participant B as Bridge
    participant D as Device
    Note over O: iglooworks API
    Y->>O: Request
    O->>B: Request (WiFi)
    B->>D: Request (Bluetooth)
    D-->>B: Response
    B-->>O: Response
    O-->>Y: Response
```
