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

# Quickstart

> First knowledge pushed in five minutes.

## 1. Create an API key

In the pepline dashboard: **Settings → API → New key**. Name it after the integration ("sync script"), copy the `pep_sk_…` secret — it is shown only once.

## 2. Check the key

```bash theme={null}
curl https://app.pepline.ai/api/v1/organization \
  -H "Authorization: Bearer pep_sk_..."
```

The response names your organization and lists your **agent slugs** — you need those for the `agents` field.

## 3. Push your first source

```bash theme={null}
curl https://app.pepline.ai/api/v1/knowledge_sources \
  -H "Authorization: Bearer pep_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "text",
    "external_id": "services-catalog",
    "title": "Our services",
    "body": "We build products end-to-end. Build is a flat monthly rate...",
    "agents": ["intake"]
  }'
```

`201 Created` — the source is processing (`"status": "updating"`).

## 4. Watch it become knowledge

```bash theme={null}
curl https://app.pepline.ai/api/v1/knowledge_sources/42 \
  -H "Authorization: Bearer pep_sk_..."
```

When `status` is `ready`, the `digest` field tells you what the agent understood. If it says `failed`, `failure_reason` says why in plain words.

## 5. Sync forever

Re-send the same `external_id` whenever your content changes — the source updates and re-processes. Identical payloads are a no-op. That one call is your whole sync loop; see the [keeping-knowledge-fresh guide](/guides/keeping-knowledge-fresh).
