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

# Knowledge API

> List, search, and delete the articles your AI agent answers from.

The Knowledge API works on the articles in your [knowledge base](https://docs.decimal.app/knowledge-base/overview.md): ones you wrote in Decimal and ones imported from your helpdesk or other [integrations](https://docs.decimal.app/integrations/overview.md).

| Endpoint | Scope |
| - | - |
| [List knowledge articles](https://docs.decimal.app/api-reference/knowledge/list-knowledge-articles.md) | `knowledge:read` |
| [Search knowledge articles](https://docs.decimal.app/api-reference/knowledge/search-knowledge-articles.md) | `knowledge:read` |
| [Get a knowledge article](https://docs.decimal.app/api-reference/knowledge/get-a-knowledge-article.md) | `knowledge:read` |
| [Delete a knowledge article](https://docs.decimal.app/api-reference/knowledge/delete-a-knowledge-article.md) | `knowledge:delete` |
| [Delete knowledge articles](https://docs.decimal.app/api-reference/knowledge/delete-knowledge-articles.md) | `knowledge:delete` |

## Articles

Each article has its body in Markdown in `content`, plus:

| Field | Meaning |
| - | - |
| `status` | `published` or `in_review`. The agent only answers from `published` articles. |
| `source` | Where it came from: a helpdesk, or `manual` for articles written in Decimal |
| `external_id`, `url` | The article's ID and link in its source |
| `is_public`, `public_url` | Whether it's on your public help center, and its link there |
| `category`, `tags` | How it's organized |

## Filters

List, search, and bulk delete all take the same filters, alone or combined:

* `source`: articles from one source, such as `manual`
* `status`: `published` or `in_review`
* `tag`: articles with one tag

```bash theme={null}
curl "https://api.getdecimal.ai/v0/knowledge/articles?status=in_review&tag=billing" \
  -H "Authorization: Bearer sk-de-..."
```

List returns newest first and [paginates](https://docs.decimal.app/api-reference/pagination.md).

## Search

Search matches on meaning as well as keywords, and returns the best match first. `query` can be up to 500 characters, and `limit` returns up to 50 results.

```bash theme={null}
curl "https://api.getdecimal.ai/v0/knowledge/articles/search?query=reset%20password&limit=5" \
  -H "Authorization: Bearer sk-de-..."
```

New and edited articles show up in search within a few minutes.

## Delete articles

Delete one article by ID, or every article matching a set of filters. Bulk delete needs at least one filter, and removes up to 1,000 articles per request. When the response has `has_more: true`, send the same request again until it's `false`.

The agent stops using a deleted article within a few minutes. An article imported from a helpdesk comes back on its next sync if it still exists there, so delete it at the source first.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.