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

# Quickstart guide

> Get started with the SELECT API v2

## Welcome

The v2 API is SELECT's unified, RESTful API. All v2 endpoints are accessed under the base URL `https://api.select.dev/v2`.

> [!NOTE]
>
> v2 is the current SELECT API. The [v1 API](https://api-docs.select.dev/api-reference/introduction.md) is
> deprecated and will be removed on December 14, 2026.

## Authentication

Every request needs two headers:

| Header | Description |
| - | - |
| `Authorization` | `Bearer <API_KEY>` — create a key in the [SELECT dashboard](https://select.dev/app) under **Settings → API Keys**. The key must have the scopes required by the endpoint. |
| `x-tenant-id` | Your SELECT organization ID (`org_...`). |

```bash theme={null}
curl https://api.select.dev/v2/audit-logs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-tenant-id: org_YOUR_ORG_ID"
```

### Organization ID

The `x-tenant-id` header is your SELECT organization ID (`org_...`). It can be found in the SELECT app by navigating to settings by clicking the gear in the bottom right of the page and viewing your [profile information](https://select.dev/app/settings/profile).

![Organization ID from profile](https://mintcdn.com/select-ff0b0be5/Hw5NvqbeEMVPK79P/images/organization-id-from-profile.png?fit=max\&auto=format\&n=Hw5NvqbeEMVPK79P\&q=85\&s=8eb94f1a276be00e329fd453f83f6d99)

## What changed from v1

* **Organization is a header, not a path parameter.** v1 routes embedded `organization_id` in the path (`/api/{organization_id}/...`). v2 identifies your organization with the `x-tenant-id` header, so paths are clean resource names (`/v2/audit-logs`).
* **Cursor pagination.** List endpoints return a `page_token`; there is no offset/page paging.
* **RFC 9457 problem responses.** Errors use `application/problem+json` with a stable `code` field.

## Pagination

List endpoints return at most `max_results` records (default 50, max 500) plus a `page_token`:

```json theme={null}
{
  "items": [ ... ],
  "page_token": "eyJmIjoi...",
  "row_count": null
}
```

To read the next page, pass the `page_token` back. Keep going until `page_token` is `null` — that means you have reached the end.

```bash theme={null}
curl "https://api.select.dev/v2/audit-logs?max_results=500&page_token=eyJmIjoi..." \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-tenant-id: org_YOUR_ORG_ID"
```

> [!WARNING]
>
> `page_token` is the only reliable way to page. Do not build your own cursor from response fields such as timestamps — records can share identical values, and a hand-rolled cursor can silently skip or stall.

## Responses

Standard HTTP status codes indicate success or failure. Errors return `application/problem+json`:

```json theme={null}
{
  "type": "about:blank",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Invalid API key.",
  "code": "unauthorized",
  "retryable": false
}
```

Use the `code` field for programmatic handling; it is stable across releases.


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