# Delete document. Deletes the Document 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}": { "delete": { "summary": "Delete document.", "description": "Deletes the Document with the provided Document ID.", "tags": [ "Document Management" ], "x-path-examples": { "Delete a Document": { "value": "/v2/document-management/documents/12345" }, "Document not found": { "value": "/v2/document-management/documents/54321" } }, "parameters": [ { "name": "document_id", "in": "path", "description": "Document ID of document to delete.", "example": 123, "schema": { "type": "string" }, "required": true } ], "responses": { "204": { "description": "The document was successfully deleted.", "x-response-example": "Delete a Document" }, "404": { "$ref": "#/components/responses/NotFoundError" } } } } }, "components": { "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer" } }, "responses": { "NotFoundError": { "description": "Requested resource not found.", "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": { "Category Not Found": { "$ref": "#/components/examples/CategoryNotFoundResponse" }, "Document not found": { "$ref": "#/components/examples/DocumentNotFoundResponse" } } } } } }, "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" } ] } } } } } ```