Voiceflow bearer token
Get document
curl --request GET \
--url https://realtime-api.voiceflow.com/v1/stable/document/<documentID> \
--header 'Authorization: Bearer <token>'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/document/<documentID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
},
});
const data = await response.json();import requests
response = requests.get(
'https://realtime-api.voiceflow.com/v1/stable/document/<documentID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
)
data = response.json()vf document get --document-id <documentID> --project-id <projectID> --environment-alias <environmentAlias>{
"document": {
"id": "<string>",
"data": "<KBDocumentUrlData>",
"status": {
"type": "ERROR",
"data": null
},
"smartChunking": {
"markdownConversion": true,
"llmBasedChunks": true,
"llmGeneratedQ": true,
"llmContentSummarization": true,
"llmPrependContext": true
},
"chunks": [
{
"chunkID": "<string>",
"content": "<string>",
"metadata": {}
}
],
"metadata": [
{
"key": "<string>",
"values": [
"<string>"
]
}
]
}
}Get document
Returns a single document by ID, with the fields that define it. A document is a source the knowledge base retrieves from.
GET
/v1/stable/document/{documentID}
Get document
curl --request GET \
--url https://realtime-api.voiceflow.com/v1/stable/document/<documentID> \
--header 'Authorization: Bearer <token>'const response = await fetch('https://realtime-api.voiceflow.com/v1/stable/document/<documentID>?projectID=<projectID>&environmentAlias=<environmentAlias>', {
method: 'GET',
headers: {
Authorization: 'Bearer <token>',
},
});
const data = await response.json();import requests
response = requests.get(
'https://realtime-api.voiceflow.com/v1/stable/document/<documentID>?projectID=<projectID>&environmentAlias=<environmentAlias>',
headers={'Authorization': 'Bearer <token>'},
)
data = response.json()vf document get --document-id <documentID> --project-id <projectID> --environment-alias <environmentAlias>{
"document": {
"id": "<string>",
"data": "<KBDocumentUrlData>",
"status": {
"type": "ERROR",
"data": null
},
"smartChunking": {
"markdownConversion": true,
"llmBasedChunks": true,
"llmGeneratedQ": true,
"llmContentSummarization": true,
"llmPrependContext": true
},
"chunks": [
{
"chunkID": "<string>",
"content": "<string>",
"metadata": {}
}
],
"metadata": [
{
"key": "<string>",
"values": [
"<string>"
]
}
]
}
}Authorizations
Query Parameters
Response
200 - application/jsonReturns one knowledge base document in full, adding its chunks and metadata to the data, status, and chunking settings the list operation reports.
Show child attributes
Show child attributes
When enabled, an LLM generates a context summary based on the document and chunk context, and prepends it to each chunk. This improves retrieval by providing additional context to each chunk. Note: If both llmGeneratedQ and llmPrependContext are set to true, llmGeneratedQ takes precedence, and the context summarization will not be applied.
Show child attributes
Option 1
boolean
Option 2
enum<string>
Was this page helpful?
Thanks for your feedback.