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

# Quickstart

> Launch your CaseXchange integration in three steps

## Three steps to production

### 1. Get your API key

Contact us to get started, then generate a key from the dashboard.

1. Email `help@casexchange.com` with your firm name, use case, and environment (Prod or QA/UAT).
2. Receive onboarding details from the team (allow 1-2 business days).
3. Log in to CaseXchange and generate a Public API key from **Settings > API Keys**.

Choose the tier that fits your integration — see [Access Tiers](/#access-tiers) for the full breakdown. In short: `READ_ONLY` for dashboards, `STANDARD` for case intake/referrals, `FULL` for admin operations.

<Warning>
  Your API key is only shown once at creation time. Store it securely.
</Warning>

### 2. Make your first API call

Confirm connectivity, then verify your key works.

```bash theme={null}
# Verify your key — returns your firm profile
curl https://api.casexchange.com/api/public/v1/firms/me \
  -H "X-API-Key: cxp_std_your_key_here"
```

**Expected 200 response:**

```json theme={null}
{
  "data": {
    "id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "name": "Your Firm Name",
    "phone": "+1-555-000-1234",
    "state": "NY",
    "website": "https://yourfirm.com",
    "isInternal": false,
    "createdAt": "2025-01-15T08:30:00Z",
    "updatedAt": "2026-03-01T14:22:00Z"
  },
  "meta": {
    "requestId": "req_abc123def456",
    "timestamp": "2026-03-31T12:00:00Z"
  }
}
```

<Tip>
  If you get a `401` with `"code": "invalid_api_key"`, double-check your key is correct and hasn't been revoked. See [Error Handling](/api-reference/error-handling) for troubleshooting.
</Tip>

Once that returns your firm data, try these:

```bash theme={null}
# List sent cases (paginated)
curl "https://api.casexchange.com/api/public/v1/sent-cases?page=1&limit=20" \
  -H "X-API-Key: cxp_std_your_key_here"

# List received referrals
curl "https://api.casexchange.com/api/public/v1/received-referrals?page=1&limit=20" \
  -H "X-API-Key: cxp_std_your_key_here"

# Browse available firms
curl https://api.casexchange.com/api/public/v1/firms/directory \
  -H "X-API-Key: cxp_std_your_key_here"

# Get reference data
curl https://api.casexchange.com/api/public/v1/case-types \
  -H "X-API-Key: cxp_std_your_key_here"
```

### 3. Set up Postman (optional)

The Postman collection provides pre-built requests for every endpoint with automated test scripts that chain environment variables between requests.

1. Download the [Postman Collection](/postman/CaseXchange-Public-API.postman_collection.json) and [Production Environment](/postman/CaseXchange-Public-API.postman_environment.production.json).
2. In Postman, click **Import** and select both files.
3. Select the **CaseXchange Public API - Production** environment from the dropdown.

<Accordion icon="gear" title="Alternative: generate an API key via Postman">
  If you prefer to create your API key programmatically instead of via the dashboard UI:

  1. Set `login_email` and `login_password` in the Postman environment for your CaseXchange account.
  2. Run the **Login** request under *Authentication Setup* — this uses the **Internal API** (`/api/v1`) to establish a JWT session.
  3. Run **Create Public API Key** to generate and auto-save your `api_key`.
  4. All subsequent Public API requests will use the `api_key` via the `X-API-Key` header automatically.

  **Note:** Login and key creation use Internal API authentication (JWT). Once your key is created, all other requests use Public API authentication (`X-API-Key`) only.
</Accordion>

## Next steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="terminal" href="/api-reference">
    Full endpoint documentation generated from the OpenAPI spec.
  </Card>

  <Card title="Case Lifecycle" icon="folder-open" href="/concepts/cases">
    Understand referral states, ownership, and re-referrals.
  </Card>

  <Card title="Firm Directory" icon="building" href="/concepts/firms">
    How firm profiles, networks, and the public directory work.
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/api-reference/error-handling">
    Standard response envelopes and troubleshooting patterns.
  </Card>
</CardGroup>

<Note>
  Need sandbox data or partner credentials? Email <Link href="mailto:help@casexchange.com">[help@casexchange.com](mailto:help@casexchange.com)</Link>.
</Note>
