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

# Quickstart

> From no key to a synced collection, in four steps.

You need a key, one `curl`, and a loop. Everything else on this site is detail.

**1. Get a key**

A workspace administrator opens Vensight, goes to **Settings → Developers**, and
clicks **Create key**. Name it after the thing that will use it — `Warehouse loader`,
`GRC sync` — because that name is all anyone will have to tell four keys apart later.

> [!WARNING]
>
> **The key is shown once.** Vensight stores only a hash of it, so it cannot be read
> back afterwards by anyone, including support. Put it in your secret store before
> you close the dialog. If you lose it, revoke it and create another.

**2. Make a request**

Put the address and your key in your shell once. Every example below uses them.

```bash theme={null}
export BASE="https://app.vensight.ai/api/v1"
export VENSIGHT_KEY="vsk_live_your_key_here"

curl "$BASE/vendors?limit=2" -H "Authorization: Bearer $VENSIGHT_KEY"
```

A page of records comes back:

```json theme={null}
{
  "object": "list",
  "resource": "vendors",
  "data": [
    {
      "id": "6f1c2a4e-8b1d-4c3a-9e57-2d4b8a1f0c93",
      "slug": "oakmere-escrow-group",
      "display_name": "Oakmere Escrow Group",
      "tier": "tier_2",
      "status": "approved",
      "updated_at": "2026-09-09T02:14:07.221Z"
    }
  ],
  "has_more": true,
  "next_cursor": "MjAyNi0wOS0wOVQwMjoxNDowNy4yMjFafDZmMWM…"
}
```

If you get a `401`, check [Authentication](https://docs.vensight.ai/authentication.md). If you get a `400`, the
message names the parameter it did not like — see [Errors](https://docs.vensight.ai/errors.md).

**3. Walk the whole collection**

Every list response has the same five fields, so one function reads any collection.

```python Python theme={null}
import os, requests

BASE = "https://app.vensight.ai/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['VENSIGHT_KEY']}"}

def walk(collection, **filters):
    cursor = None
    while True:
        params = {"limit": 200, **filters}
        if cursor:
            params["cursor"] = cursor
        r = requests.get(f"{BASE}/{collection}", params=params,
                         headers=HEADERS, timeout=30)
        r.raise_for_status()
        page = r.json()
        yield from page["data"]
        if not page["has_more"]:
            return
        cursor = page["next_cursor"]

for vendor in walk("vendors"):
    print(vendor["display_name"], vendor["status"])
```

```typescript TypeScript theme={null}
const BASE = "https://app.vensight.ai/api/v1";

async function* walk(collection: string, filters: Record<string, string> = {}) {
  let cursor: string | null = null;
  for (;;) {
    const params = new URLSearchParams({ limit: "200", ...filters });
    if (cursor) params.set("cursor", cursor);
    const res = await fetch(`${BASE}/${collection}?${params}`, {
      headers: { Authorization: `Bearer ${process.env.VENSIGHT_KEY}` },
    });
    if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
    const page = await res.json();
    yield* page.data;
    if (!page.has_more) return;
    cursor = page.next_cursor;
  }
}

for await (const vendor of walk("vendors")) {
  console.log(vendor.display_name, vendor.status);
}
```

```bash curl theme={null}
# One page at a time. Feed next_cursor back in until has_more is false.
curl "$BASE/vendors?limit=200" -H "Authorization: Bearer $VENSIGHT_KEY"
curl "$BASE/vendors?limit=200&cursor=MjAyNi0wOS0wOVQ…" -H "Authorization: Bearer $VENSIGHT_KEY"
```

Records come back **oldest change first**. That ordering is what makes the walk safe
while the data is moving underneath you — see [Pagination](https://docs.vensight.ai/pagination.md).

**4. Keep it current**

Do the full walk once. After that, ask only for what changed:

```bash curl theme={null}
curl "$BASE/vendors?updated_since=2026-09-01T00:00:00Z" \
  -H "Authorization: Bearer $VENSIGHT_KEY"
```

```python Python theme={null}
for vendor in walk("vendors", updated_since="2026-09-01T00:00:00Z"):
    upsert(vendor)          # your own store, keyed on vendor["id"]
```

```typescript TypeScript theme={null}
for await (const vendor of walk("vendors", { updated_since: "2026-09-01T00:00:00Z" })) {
  await upsert(vendor);     // your own store, keyed on vendor.id
}
```

Take that timestamp from the highest `updated_at` you have **successfully stored**,
not from your own clock, so a job that dies halfway resumes from what it actually
stored. (Events, settings changes, screening answers and the change feed are never
edited after they are written, so they use `occurred_at` or `answered_at` instead; see
[Pagination](https://docs.vensight.ai/pagination.md#only-what-changed).)

For near-real-time, register a [webhook](https://docs.vensight.ai/webhooks.md) and keep the `updated_since` pull
as a nightly check. Webhooks keep you current; the pull catches anything missed.

## What you can read

Seventeen collections, plus the change feed:

* **Vendors:** `vendors`, `relationships`, `subprocessors`, `watchlist-alerts`,
  `screening-answers`
* **Due diligence:** `review-cycles`, `document-requirements`, `documents` (document
  requests), `document-submissions`, `questions`, `question-answers`
* **Contracts, invoices and incidents:** `contracts`, `invoices`, `incidents`, `requests`
* **History:** `events` (each vendor's timeline) and `settings-changes`
* **The change feed:** `changes`, one entry for every change across all of them

The [Data model](https://docs.vensight.ai/data-model.md) page explains how they relate. The
[API reference](https://docs.vensight.ai/api-overview.md) lists every field, what it means, and the values it can
hold. Model your own columns from there rather than from a sample response, which only
shows the values that happened to be in it.

> [!NOTE]
>
> **Keep the base address in configuration rather than in your code**, so it is one line to
> change. Issue one key per system that uses the API, so you can revoke one without
> breaking the others.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.