Zum Inhalt springen
DeutschlandGPT

Upload file to folder

Uploads a file to a document folder. Max 50 MB. Only common document, image, audio, video, text, and archive types are accepted and validated against their declared type (magic bytes); disallowed files return 400. Indexing for semantic search runs asynchronously, so a newly uploaded file may take a moment to become searchable. Document folders, people and organisations each have a storage limit; an upload that would exceed one returns 413 with a code naming the limit.

POSThttps://api.deutschlandgpt.de/v2/document-folders/{id}/files

Example request

curl https://api.deutschlandgpt.de/v2/document-folders/{id}/files \
  -X POST \
  -H "Authorization: Bearer $DGPT_API_KEY"

Parameters

idstring<uuid>required

Document folder ID

Response

201application/json
{
  "file_id": "string"
}

File uploaded

file_idstring

Response codes

201

File uploaded

object
400

Invalid file type or size

401

Unauthorized

402

Insufficient credits or spending limit exceeded

Error
403

Requires enterprise workspace

404

Folder not found or access denied

413

Storage limit reached: the document folder, the uploading person or the organisation would exceed its storage limit. Nothing was stored.

object
Was this page helpful?