# getdocument: RAG – Get Document

> getdocument (RAG – Get Document) is a 1001fx API function in the group Knowledge bases (RAG): POST https://api.1001fx.com/rag/getdocument, 0 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

One document of a knowledge base with status and all metadata (404 if it does not exist). Free.

- Group: Knowledge bases (RAG)
- Endpoint: `POST https://api.1001fx.com/rag/getdocument`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: application/json
- Credits: 0 credits per call
- Ready-made in: Make
- Docs: https://1001fx.com/functions/getdocument

## Parameters

- `knowledgeBase` (string, required) – Knowledge base: Name or ID of the knowledge base, e.g. "Support FAQ" or support-faq (same knowledge base). rag/adddocument creates it if it does not exist.
- `documentId` (string, required) – Document ID: ID of the document (as given when adding it).

## Example: RAG – Get Document

```bash
curl -X POST 'https://api.1001fx.com/rag/getdocument' \
  -H 'X-API-KEY: YOURSECRETAPIKEY' \
  -H 'Content-Type: application/json' \
  -d '{"knowledgeBase":"Support FAQ","documentId":"faq-billing"}'
```
