Dokumentenordner erstellen
Erstellt einen neuen Dokumentenordner im Enterprise-Workspace.
POST
https://api.deutschlandgpt.de/v2/document-foldersBeispielaufruf
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());Anfrage-Body
namestringerforderlichOrdnername
descriptionstringoptionalOrdnerbeschreibung
Antwort
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
}Ordner erstellt
idstring<uuid>namestringdescriptionstringvisibilitystringcreatedAtstring<date-time>fileCountintegerStatuscodes
201
Ordner erstellt
DocumentFolder401
Nicht autorisiert
402
Nicht genügend Guthaben oder Ausgabenlimit überschritten
Error403
Erfordert einen Enterprise-Workspace
War diese Seite hilfreich?