Orbiq logoTrust Center Documentation
API v1 ReferenceDocumentsIdFile

Remove document file

Detach the file from a document. Without `version` or `locale` this clears the document's own file. With `version` it clears only the file of that draft…

DELETE
/api/v1/documents/{id}/file

Detach the file from a document. Without version or locale this clears the document's own file. With version it clears only the file of that draft version, even when a locale is also given, and leaves the live files alone. Without version, a non-default locale leaves that language without a file instead of falling back to the default language's file. The removed file is only deleted once no language or version of the document still uses it.

Removing from a document that has no file succeeds with No file to remove.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Document whose file is removed

Length1 <= length

Query Parameters

version?string

Draft document version whose file is removed. Omit it, or pass current, to target the document itself.

locale?string

Locale whose document file should be removed. Base locale codes are resolved to Directus language codes such as ja-JP, ko-KR, and zh-CN.

Value in

  • "en"
  • "de"
  • "fr"
  • "ja"
  • "ko"
  • "zh"

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://app.orbiqhq.com/api/v1/documents/$DOCUMENT_ID/file" \  -H "Authorization: Bearer $ACCESS_TOKEN"
{  "success": true,  "data": {    "message": "File removed successfully"  }}

How is this guide?