breezy
breezy2mo ago

Retrieve Metadata in a Document

Is there a way to view the metadata in a document(s) in the knowledgebase?
2 Replies
Tico | Voiceflow Assistant
At the moment the Knowledge Base panel inside the Voiceflow Creator does not surface the custom metadata you attach to a file, URL or table.
If you need to look at (or debug) the metadata you have saved you’ll need to call the Knowledge Base Management API instead: 1. Get the documentID you want to inspect (e.g. with the GET /v1/knowledge-base/docs list endpoint). 2. Call
GET https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}
Authorization: YOUR_DM_API_KEY
GET https://api.voiceflow.com/v1/knowledge-base/docs/{documentID}
Authorization: YOUR_DM_API_KEY
The response JSON looks like:
{
"data": {
"documentID": "6532663e91552f00079ad153",
"metadata": {
"project": { "name": "AI Development" },
"developer": { "tags": ["t1","t2"] }
},
"updatedAt": "2025-07-29T10:55:12.402Z",
"chunks": [
{
"chunkID": 0,
"content": "…text…",
"metadata": { }
},

]
}
}
{
"data": {
"documentID": "6532663e91552f00079ad153",
"metadata": {
"project": { "name": "AI Development" },
"developer": { "tags": ["t1","t2"] }
},
"updatedAt": "2025-07-29T10:55:12.402Z",
"chunks": [
{
"chunkID": 0,
"content": "…text…",
"metadata": { }
},

]
}
}
metadata at the document level contains the key-value pairs you supplied when you uploaded the source. • Each individual chunk also carries its own metadata object (useful if you later patch a single chunk). If you only need the metadata keys for filtering at query time you can skip the step above and just apply metadata filters directly in the /knowledge-base/query call. Docs for reference: • Document Chunk Retrieval: https://developer.voiceflow.com/reference/get_v1-knowledge-base-docs-documentid
• Metadata filtering examples: https://developer.voiceflow.com/docs/advanced-knowledge-base#filter-with-metadata
breezy
breezyOP2mo ago
The metadata value only appears in each chunk rather than the whole document. Example JSON output: { "data": { "tags": [], "documentID": "id", "data": { "type": "text", "name": "test.txt", "canEdit": false }, "updatedAt": "time zone", "status": { "type": "PENDING" } }, "chunks": [ { "chunkID": "chunk id", "content": "...", "metadata": { "schoolName": "school" } }, {...} } ] } metadata only appears in each chunk instead of in the "data" section. Why is that?

Did you find this page helpful?