Skip to main content
GET
/
ai
/
knowledge-bases
/
{kb_id}
/
documents
/
{document_id}
Get document by ID
curl --request GET \
  --url https://api.wacht.dev/ai/knowledge-bases/{kb_id}/documents/{document_id} \
  --header 'Authorization: <api-key>'
{
  "id": "1234567890123456789",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "title": "Product Manual",
  "description": "Complete product manual for users",
  "file_name": "product_manual.pdf",
  "file_size": 1048576,
  "file_type": "application/pdf",
  "file_url": "https://s3.amazonaws.com/bucket/path/to/file.pdf",
  "knowledge_base_id": "9876543210987654321",
  "processing_metadata": {}
}

Authorizations

Authorization
string
header
required

API key authentication (format: Bearer {api_key})

Path Parameters

kb_id
string
required

Knowledge Base ID

document_id
string
required

Document ID

Response

Document retrieved successfully

id
string
Example:

"1234567890123456789"

created_at
string<date-time>
Example:

"2024-01-15T10:30:00Z"

updated_at
string<date-time>
Example:

"2024-01-15T10:30:00Z"

title
string

Document title

Example:

"Product Manual"

description
string | null

Document description

Example:

"Complete product manual for users"

file_name
string

Original file name

Example:

"product_manual.pdf"

file_size
integer

File size in bytes

Example:

1048576

file_type
string

MIME type of the file

Example:

"application/pdf"

file_url
string

S3 URL of the uploaded file

Example:

"https://s3.amazonaws.com/bucket/path/to/file.pdf"

knowledge_base_id
string

Knowledge base ID

Example:

"9876543210987654321"

processing_metadata
object

Processing metadata