Create document folder
Creates a new document folder in the enterprise workspace.
POST
https://api.deutschlandgpt.de/v2/document-foldersExample request
curl https://api.deutschlandgpt.de/v2/document-folders \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": ""
}'curl https://api.deutschlandgpt.de/v2/document-folders \
-X POST \
-H "Authorization: Bearer $DGPT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": ""
}'import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/document-folders",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
json={
"name": "string",
"description": ""
},
)
print(response.json())import os, requests
response = requests.post(
"https://api.deutschlandgpt.de/v2/document-folders",
headers={"Authorization": f"Bearer {os.environ['DGPT_API_KEY']}"},
json={
"name": "string",
"description": ""
},
)
print(response.json())const response = await fetch('https://api.deutschlandgpt.de/v2/document-folders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"description": ""
}),
});
console.log(await response.json());const response = await fetch('https://api.deutschlandgpt.de/v2/document-folders', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.DGPT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "string",
"description": ""
}),
});
console.log(await response.json());Request body
namestringrequiredFolder name
descriptionstringoptionalFolder description
Response
201application/json
{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"visibility": "string",
"createdAt": "2025-01-01T00:00:00Z",
"fileCount": 0
}{
"id": "00000000-0000-0000-0000-000000000000",
"name": "string",
"description": "string",
"visibility": "string",
"createdAt": "2025-01-01T00:00:00Z",
"fileCount": 0
}Created folder
idstring<uuid>namestringdescriptionstringvisibilitystringcreatedAtstring<date-time>fileCountintegerResponse codes
201
Created folder
DocumentFolder401
Unauthorized
402
Insufficient credits or spending limit exceeded
Error403
Requires enterprise workspace
Was this page helpful?