List document folders
Returns all active document folders for the enterprise workspace. Supports optional text search. limit and offset apply only when a query is provided; without query, all folders are returned. Results are filtered by the API key's folder permissions when the key is user-scoped and has folder restrictions enabled.
GET
https://api.deutschlandgpt.de/v2/document-foldersExample request
curl https://api.deutschlandgpt.de/v2/document-folders \
-X GET \
-H "Authorization: Bearer $DGPT_API_KEY"curl https://api.deutschlandgpt.de/v2/document-folders \
-X GET \
-H "Authorization: Bearer $DGPT_API_KEY"import os, requests
response = requests.get(
"https://api.deutschlandgpt.de/v2/document-folders",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())import os, requests
response = requests.get(
"https://api.deutschlandgpt.de/v2/document-folders",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/v2/document-folders', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/v2/document-folders', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
},
});
console.log(await response.json());Parameters
querystringoptionalOptional text search query to filter folders by name
limitintegeroptionalMaximum number of results to return
offsetintegeroptionalNumber of results to skip
Response
200application/json
{
"object": "list",
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"visibility": "string",
"createdAt": "2025-01-01T00:00:00Z",
"fileCount": 0
}
]
}{
"object": "list",
"data": [
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"visibility": "string",
"createdAt": "2025-01-01T00:00:00Z",
"fileCount": 0
}
]
}List of document folders
objectstringdataDocumentFolder[]idstring<uuid>namestringdescriptionstringvisibilitystringcreatedAtstring<date-time>fileCountintegerResponse codes
200
List of document folders
object401
Unauthorized
402
Insufficient credits or spending limit exceeded
Error403
Requires enterprise workspace
Was this page helpful?