Zum Inhalt springen
DeutschlandGPT

Replace file in folder

Replaces an existing file in a document folder. The existing file is removed before the new one is uploaded; if the upload fails the original is not restored. Max 50 MB (25 MB for audio).

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

Example request

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

Parameters

idstring<uuid>required

Document folder ID

fileIdstringrequired

File ID to replace

Response

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

File replaced

file_idstring

Response codes

200

File replaced

object
400

Invalid file type or size

401

Unauthorized

402

Insufficient credits or spending limit exceeded

Error
403

Requires enterprise workspace

404

Folder or file not found

Was this page helpful?