Skip to main content

Delete a document

Deleting a document will delete all associated data and files. This action cannot be undone.

Guide to implementing API#

API Endpoint#

DELETE https://api.documentpro.ai/files

Example Implementation using Python#

import requests
# Your API keyapi_key = 'YOUR_API_KEY'
# The request ID of the document you want to retryrequest_id = 'YOUR_REQUEST_ID'url = f"https://api.documentpro.ai/files?request_id={request_id}"
payload = {}headers = {  'x-api-key': api_key}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response)

Response body#

A 200 response code will have the following response.

{    "success": true,    "message": "File deleted successfully"}

For status codes 400, 403, 404 and 500 you will get the following response body.

{    "success": false,    "error": "{error message}"}