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

# Quickstart

> Launch a campaign, pull a transcript, and run a graph query in under five minutes.

This guide walks through the minimum integration: create an API key, launch a campaign, and read the synthesized report.

## 1. Create an API key

API keys are workspace-scoped. From the Ontora dashboard:

1. Open **Settings → API keys**.
2. Click **Create API key**.
3. Pick the scopes you need. For this quickstart, select `interviews` and `exports`.
4. Copy the key (it starts with `ont_`). You will not be able to see it again.

<Warning>
  Treat API keys like passwords. Store them in a secret manager — never commit them to source control.
</Warning>

## 2. Authenticate

Every request takes an `X-API-Key` header.

<CodeGroup>
  ```bash cURL theme={null}
  export ONTORA_API_KEY="ont_..."

  curl https://api.ontora.com/v1/interviews \
    -H "X-API-Key: $ONTORA_API_KEY"
  ```

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

  client = httpx.Client(
      base_url="https://api.ontora.com",
      headers={"X-API-Key": os.environ["ONTORA_API_KEY"]},
  )

  campaigns = client.get("/v1/interviews").json()
  ```

  ```typescript TypeScript theme={null}
  const res = await fetch("https://api.ontora.com/v1/interviews", {
    headers: { "X-API-Key": process.env.ONTORA_API_KEY! },
  });
  const campaigns = await res.json();
  ```
</CodeGroup>

## 3. Launch a campaign

Create a campaign, add contacts, then start it.

```bash theme={null}
# 1. Create
curl -X POST https://api.ontora.com/v1/interviews \
  -H "X-API-Key: $ONTORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 facility-ops interviews",
    "goal": "Map current scheduling workflows and pain points",
    "channel": "in_app_chat",
    "topics": [
      {"name": "Daily scheduling", "goal": "Understand how shifts are assigned"}
    ]
  }'

# 2. Add contacts (returns interview_id from step 1)
curl -X POST https://api.ontora.com/v1/interviews/$ID/contacts/bulk \
  -H "X-API-Key: $ONTORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contacts": [{"name": "Sam", "email": "sam@example.com"}]}'

# 3. Start the campaign
curl -X POST https://api.ontora.com/v1/interviews/$ID/start \
  -H "X-API-Key: $ONTORA_API_KEY"
```

## 4. Pull the synthesis report

Once the campaign has completed conversations, fetch the rendered report as Markdown:

```bash theme={null}
curl https://api.ontora.com/v1/interviews/$ID/export/report \
  -H "X-API-Key: $ONTORA_API_KEY" \
  -o report.md
```

Or get individual transcripts as a ZIP:

```bash theme={null}
curl https://api.ontora.com/v1/interviews/$ID/export/transcripts \
  -H "X-API-Key: $ONTORA_API_KEY" \
  -o transcripts.zip
```

## 5. Ask a question across the campaign

Use the GraphRAG query endpoint to run grounded questions over every transcript:

```bash theme={null}
curl -X POST https://api.ontora.com/v1/interviews/$ID/graph/query \
  -H "X-API-Key: $ONTORA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "What are the most painful manual steps in the scheduling workflow?"}'
```

The response includes the answer, common patterns, and dissenting opinions across respondents.

## What's next

<CardGroup cols={2}>
  <Card title="Subscribe to webhooks" icon="bolt" href="/webhooks/overview">
    Get notified when a campaign finishes synthesizing instead of polling.
  </Card>

  <Card title="Connect Claude or Cursor" icon="plug" href="/mcp/overview">
    Use the MCP server to interact with campaigns from your AI assistant.
  </Card>
</CardGroup>
