List the document's chunks
curl --request GET \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"chunk_index": 1,
"text": "<string>",
"page": 2,
"start_char": 123,
"end_char": 123,
"metadata": {}
}
],
"total": 1,
"page": 2,
"limit": 50,
"has_more": true
}Documents
List the document's chunks
Debug/quality review. Requires reader+.
GET
/
v1
/
knowledge_bases
/
{knowledgeBaseId}
/
documents
/
{documentId}
/
chunks
List the document's chunks
curl --request GET \
--url https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v2/workspaces/slug:storage/webhooks/v1/knowledge_bases/{knowledgeBaseId}/documents/{documentId}/chunks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"chunk_index": 1,
"text": "<string>",
"page": 2,
"start_char": 123,
"end_char": 123,
"metadata": {}
}
],
"total": 1,
"page": 2,
"limit": 50,
"has_more": true
}Authorizations
User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.
Path Parameters
Knowledge base id. Legacy physical prefix vs_ (the kb_ rename is deferred).
Maximum string length:
128Pattern:
^vs_[A-Za-z0-9-]+$Document id. Legacy physical prefix vsf_ (the doc_ rename is deferred).
Maximum string length:
128Pattern:
^vsf_[A-Za-z0-9-]+$Query Parameters
Page size. Defaults to 50 for this endpoint.
Required range:
1 <= x <= 1001-based page number.
Required range:
x >= 1Response
Paginated chunks.
Shared list-response envelope. Array is always data. Every
element carries its own object discriminator.
Available options:
list Required range:
x >= 0Required range:
x >= 1Required range:
1 <= x <= 100Was this page helpful?