> ## Documentation Index
> Fetch the complete documentation index at: https://docs.verify-group.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Postman collection

> Import the Verify Group OpenAPI spec into Postman, configure environment variables, and use an auto-refresh pre-request script for bearer tokens.

## Import via OpenAPI URL

1. Open Postman → **Import** → **Link**
2. Paste: `https://gateway.verify-group.io/api/swagger.json`
3. Click **Continue → Import**

## Environment variables

| Variable         | Value                                    |
| ---------------- | ---------------------------------------- |
| `baseUrl`        | `https://gateway.verify-group.io/api/v1` |
| `accessToken`    | *(set after login)*                      |
| `organizationId` | Your org UUID                            |

## Collection pre-request script (auto-refresh)

```javascript theme={null}
const expiry = pm.environment.get("tokenExpiry");
if (!expiry || Date.now() > parseInt(expiry) - 60000) {
  pm.sendRequest({
    url: pm.environment.get("baseUrl") + "/auth/refresh",
    method: "POST",
    header: { "Content-Type": "application/json" },
    body: { mode: "raw", raw: JSON.stringify({ refreshToken: pm.environment.get("refreshToken") }) }
  }, (err, res) => {
    if (!err && res.code === 200) {
      const { accessToken, expiresIn } = res.json().data;
      pm.environment.set("accessToken", accessToken);
      pm.environment.set("tokenExpiry", String(Date.now() + expiresIn * 1000));
    }
  });
}
```

Set the collection `Authorization` header to `Bearer {{accessToken}}`.
