---
updatedAt: 2026-06-03T14:35:47.000Z
agentTools:
  projectIndex: https://developer.personio.de/llms.txt
---

# Download document file.

Downloads the file associated with the provided Document ID.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Document Management",
    "version": "2.0.0",
    "description": "Collection of endpoints to manage Documents."
  },
  "servers": [
    {
      "url": "https://api.personio.de"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v2/document-management/documents/{document_id}/download": {
      "get": {
        "summary": "Download document file.",
        "description": "Downloads the file associated with the provided Document ID.",
        "tags": [
          "Document Management"
        ],
        "x-path-examples": {
          "Download a Document": {
            "value": "/v2/document-management/documents/12345/download"
          },
          "Document not found": {
            "value": "/v2/document-management/documents/54321/download"
          },
          "File Unsafe": {
            "value": "/v2/document-management/documents/99999/download"
          }
        },
        "parameters": [
          {
            "name": "document_id",
            "in": "path",
            "description": "Document ID of document to download.",
            "example": 123,
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/DownloadDocumentFileResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundError"
          },
          "409": {
            "$ref": "#/components/responses/FileNotSafeError"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "responses": {
      "DownloadDocumentFileResponse": {
        "description": "The file associated with the provided Document ID is downloaded.",
        "x-response-example": "Download a Document",
        "content": {
          "*/*": {
            "schema": {
              "type": "string",
              "format": "binary"
            }
          }
        }
      },
      "BadRequestError": {
        "description": "Bad request sent by client.",
        "content": {
          "application/problem+json": {
            "schema": {
              "type": "object",
              "description": "This object represents an error response.",
              "properties": {
                "personio_trace_id": {
                  "type": "string",
                  "example": "aswo3f-a202lfso-312123sld-1230ddd",
                  "description": "A unique ID that was created for this error."
                },
                "timestamp": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2021-05-28T11:17:30.000Z",
                  "description": "The timestamp of when the error occurred."
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "title": {
                        "type": "string",
                        "example": "Not found",
                        "description": "The title of the error."
                      },
                      "detail": {
                        "type": "string",
                        "example": "The requested resource was not found.",
                        "description": "A short description about the error."
                      },
                      "type": {
                        "type": "string",
                        "format": "uri",
                        "example": "https://developer.personio.de/reference/errors#common.requested_resource_not_found",
                        "description": "A link to the developer hub where more information can be found for the encountered error."
                      },
                      "_meta": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            },
            "examples": {
              "No Owner ID": {
                "$ref": "#/components/examples/NoOwnerIdResponse"
              }
            }
          }
        }
      },
      "NotFoundError": {
        "description": "Requested resource not found.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/responses/BadRequestError/content/application~1problem+json/schema"
            },
            "examples": {
              "Category Not Found": {
                "$ref": "#/components/examples/CategoryNotFoundResponse"
              },
              "Document not found": {
                "$ref": "#/components/examples/DocumentNotFoundResponse"
              }
            }
          }
        }
      },
      "FileNotSafeError": {
        "description": "File determined to be 'unsafe' for download.",
        "content": {
          "application/problem+json": {
            "schema": {
              "$ref": "#/components/responses/BadRequestError/content/application~1problem+json/schema"
            },
            "examples": {
              "File Unsafe": {
                "$ref": "#/components/examples/FileUnsafeResponse"
              }
            }
          }
        }
      }
    },
    "examples": {
      "CategoryNotFoundResponse": {
        "value": {
          "timestamp": "2022-06-17T14:07:17Z",
          "personio_trace_id": "aswo3f-a202lfso-312123sld-1230dd1",
          "errors": [
            {
              "title": "Category not found.",
              "detail": "Category could not be found for requested category.id.",
              "type": "https://developer.personio.de/reference/errors#documents.not_found.category"
            }
          ]
        }
      },
      "DocumentNotFoundResponse": {
        "value": {
          "timestamp": "2022-06-17T14:07:17Z",
          "personio_trace_id": "aswo3f-a202lfso-312123sld-1230dd1",
          "errors": [
            {
              "title": "Document not found.",
              "detail": "Document could not be found for requested document_id.",
              "type": "https://developer.personio.de/reference/errors#documents.not_found.document"
            }
          ]
        }
      },
      "FileUnsafeResponse": {
        "value": {
          "timestamp": "2022-06-17T14:07:17Z",
          "personio_trace_id": "aswo3f-a202lfso-312123sld-1230dd1",
          "errors": [
            {
              "title": "File determined to be 'unsafe' for download.",
              "detail": "The file for which a download was requested has been determined to be unsafe by our virus scanning process.",
              "type": "https://developer.personio.de/reference/errors#documents.conflict.file_unsafe.download"
            }
          ]
        }
      }
    }
  }
}
```