---
title: "Fetch Document"
method: POST
path: "/teams/{team_id}/bots/{bot_id}/fetch"
---

# Fetch Document

`POST /teams/{team_id}/bots/{bot_id}/fetch`

## Request

- Base URL: `https://api.docsbot.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.docsbot.ai/teams/{team_id}/bots/{bot_id}/fetch`
- Auth: none declared

## Path parameters

- `team_id` string, required
- `bot_id` string, required

## Request body

- FileFetchQuery
  - `fileId` string, required: Returns the reconstructed document for this file ID.

## Response `200`

Successful Response

- union
  - QuerySource
    - `title` string, nullable
    - `url` string, nullable
    - `fileId` string, nullable
    - `page` integer, nullable
    - `content` string, required
  - Error
    - `error` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/docsbot/apis/docsbot-chat-api.md) · [All operations](https://skmtc.dev/docsbot/apis/docsbot-chat-api/llms.txt) · [OpenAPI document](https://skmtc.dev/docsbot/apis/docsbot-chat-api/revisions/336b782b49d5?raw)
