> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.westiq.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.westiq.ai/_mcp/server.

# Quickstart

The WestIQ Platform API is server-to-server. In this quickstart you exchange
your partner credential for a bearer token, verify the API is reachable, and
run your first natural-language catalog search — four steps, all copy-pasteable.

All examples use the staging base URL:

```text
https://api.staging.westiq.ai
```

#### Get partner credentials

Your WestIQ partner manager issues an OAuth 2.0 `client_id` and
`client_secret` through your onboarding pack. The credential is already
bound to your airline on the WestIQ side — there is no airline identifier
for you to configure or send.

#### Request an access token

Exchange your client credentials for a short-lived bearer access token at
the staging token endpoint:

```bash
curl -X POST "https://auth.staging.westiq.ai/oauth2/token" \
  -u "$WESTIQ_CLIENT_ID:$WESTIQ_CLIENT_SECRET" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=client_credentials&scope=westiq/search"
```

The response contains the token and its lifetime:

```json
{
  "access_token": "eyJraWQiOi…",
  "expires_in": 3600,
  "token_type": "Bearer"
}
```

Cache the token and reuse it until it expires — do not request a new token
per API call.

#### Verify the API is reachable

`GET /healthz` is the one anonymous endpoint. It reports liveness only:

```bash
curl https://api.staging.westiq.ai/healthz
```

```json
{"status": "ok"}
```

#### Make your first search

Send the token as a bearer credential and search the catalog in natural
language:

```bash
curl -X POST "https://api.staging.westiq.ai/v1/search" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"query": "romantic comedy from the 90s", "topK": 5}'
```

Notice what you did NOT send: any airline identifier. Your credential
already carries it. The response's `parsed.filters.airlineId` field shows
the airline your call was resolved to — server-side, from your credential,
never from the request.

> **Warning**
>
> Never commit `client_secret` or tokens to source control. Store them in a
> secrets manager and inject them at runtime.

> **Note**
>
> The examples above run against the staging environment
> (`api.staging.westiq.ai`). Full request and response schemas for every
> endpoint live in the **API Reference**, generated from the platform's
> OpenAPI document — the same document the live API serves at
> `GET /openapi/v1.json`.

## Next steps

* [Authentication & tenancy](/guides/authentication) — how credentials map to
  airlines, and the failures you can hit.
* [Search](/guides/search) — request limits, how queries are parsed, scoring,
  and coverage reporting.
* [Behavioral events](/guides/behavioral-events) — batching passenger
  interaction signals into `POST /v1/events`.
* [Sessions & Member Locators](/guides/sessions) — the `X-Session-Id` header
  and seat/member locators, before you call the per-member endpoints.
* [Session setup](/guides/session-setup) → [personas](/guides/personas) →
  [catalog serve](/guides/catalog-serve) — the personalization flow, in order.