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

# Quickstart

> Drive a synthetic journey end-to-end from this site in a few minutes - test mode only.

Everything on this site runs against the **test-mode environment** with **test-scoped keys** and
**synthetic data only**. There is no path from these docs to production or to real patient data.

## 1. Get access

* **Docs access:** this site is gated (visitor authentication is on pre-release). Access is
  provisioned for internal staff and design partners during onboarding.
* **API access:** your onboarding contact issues a per-client **test API key** and your
  `X-Brand-Id` value. See [Authentication](/pages/authentication).

## 2. Make your first call

Resolve the intake instrument - this mints a journey and returns the first node:

```bash theme={null}
curl "$BASE_URL/v1/instrument/resolve" \
  --header "Authorization: Bearer $TEST_API_KEY" \
  --header "X-Brand-Id: $BRAND_ID"
```

The response carries a `session_id`, a `journey_id` (prefixed `jny_`), and the first `node` to
present. `$BASE_URL` is the test-environment base URL issued with your key.

## 3. Walk the instrument

Submit the current node's answer; the server advances exactly one step:

```bash theme={null}
curl --request POST "$BASE_URL/v1/instrument/next" \
  --header "Authorization: Bearer $TEST_API_KEY" \
  --header "X-Brand-Id: $BRAND_ID" \
  --header "Content-Type: application/json" \
  --data '{"session_id": "<from step 2>", "answer": {"codes": ["none"]}}'
```

Repeat until `status` is `complete`. The server owns sequence, branching, and completion - a
client can never skip or reorder steps.

## 4. Read the journey status

```bash theme={null}
curl "$BASE_URL/v1/journeys/<journey_id>/status" \
  --header "Authorization: Bearer $TEST_API_KEY" \
  --header "X-Brand-Id: $BRAND_ID"
```

Returns the partner-visible status projection - IDs and status values only, never patient data.

This read has more than one documented outcome. Besides the refusals any key-authenticated call
can return, it may return `422` with the type
`https://purple.md/problems/journey-status-pending` instead of a status value - a typed "no status
yet" response, meaning your request was well-formed and the enrollment is yours but the platform
has no status to report for it. Branch on the `type`, keep your normal authentication and error
handling, and see
[when a status is not yet reportable](/pages/integrate/the-patient-flow#when-a-status-is-not-yet-reportable).

## 5. Try it in the playground

Every endpoint page in the **API reference** tab has an interactive playground. Set your test
key once and drive the same flow from the browser. The playground targets the test-mode
environment only.
