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

# Knowledge

> What the assistant knows about each merchant's business.

Two ways in, for two different kinds of content.

## Sync — for anything you already hold

Use this for policies, hours, FAQs, delivery terms: text that lives in your
product and that a merchant edits there.

```http theme={null}
PUT /api/v1/partner/tenants/{ref}/knowledge/sync/
```

```json theme={null}
{
  "name": "Store policies",
  "items": [
    {"external_id": "shipping", "title": "Shipping", "body": "Ships in 3 days."},
    {"external_id": "returns",  "title": "Returns",  "body": "7-day returns."}
  ]
}
```

```json theme={null}
{ "received": 2, "written": 2, "unchanged": 0, "removed": 0 }
```

**Full replace.** Send the complete set every time — anything absent is
deleted. That is what lets you avoid tracking our ids: your `external_id` is
the identity, and the diff is ours to work out.

Re-sending unchanged text is free. The body is checksummed, so `unchanged`
items skip re-embedding entirely and a nightly full sync of a large merchant
costs almost nothing.

## Cards — for anything authored here

```http theme={null}
GET|POST         /api/v1/partner/tenants/{ref}/knowledge/cards/
GET|PATCH|DELETE /api/v1/partner/tenants/{ref}/knowledge/cards/{id}/
GET              /api/v1/partner/tenants/{ref}/knowledge/folders/
```

Individually managed notes. Use these if you build an editor into your own
admin. Cards written by `sync` are namespaced separately and will not collide
with these.

## Documents and websites

```http theme={null}
POST /api/v1/partner/tenants/{ref}/knowledge/documents/   # multipart
POST /api/v1/partner/tenants/{ref}/knowledge/crawl/       {"url": "…"}
```

<Warning>
  Both are **asynchronous**. A 2xx means accepted, not indexed — extraction,
  chunking and embedding happen after the response. Do not show your merchant a
  green tick on the strength of the status code; poll the job first, or the
  merchant sees "ready" over an empty index.
</Warning>

## Grounding

Knowledge is what stops the assistant inventing answers. It is retrieved per
turn and the assistant is instructed not to state a price, policy or timeline
that is not in it. The more precise your sync, the fewer times an assistant has
to say "the team will confirm".
