Delete Document
Delete a specific document using the Docstron API. This endpoint allows you to permanently remove a document from your account.
Endpoint
Section titled “Endpoint”DELETE https://api.docstron.com/v1/documents/{document_id}
Authentication
Section titled “Authentication”This endpoint requires authentication using a Bearer token. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Parameters
Section titled “Parameters”Path Parameters
Parameter | Type | Required | Description |
---|---|---|---|
document_id | string | Yes | The unique identifier of the document (e.g., document-49da9cea-b1b9-4216-aa21-7690850d2f4c ) |
Request Examples
Section titled “Request Examples”curl --location --request DELETE 'https://api.docstron.com/v1/documents/document-49da9cea-b1b9-4216-aa21-7690850d2f4c' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --data ''
Response
Section titled “Response”200 - Success Response
{ "success": true, "message": "Document successfully deleted.", "data": []}
Response Fields
Section titled “Response Fields”Field | Type | Description |
---|---|---|
success | boolean | Indicates if the request was successful |
message | string | A message describing the response |
data | array | Empty array for delete operations |
Error Responses
Section titled “Error Responses”404 - Document Not Found
Returned when the provided document_id
does not exist or is invalid.
{ "success": false, "message": "Document not found.", "data": []}
Common causes:
- Invalid or mistyped
document_id
- Document has already been deleted
- The document belongs to a different account
Solution: Verify the document_id
is correct. Check if the document still exists before attempting deletion.
500 - Internal Server Error
Returned when an unexpected server error occurs while deleting the document.
{ "success": false, "message": "Failed to delete the document.", "data": []}
Common causes:
- Temporary server issue
- Database connectivity problem
- Service maintenance
Solution: Wait a few moments and retry the request. If the problem persists, contact support@docstron.com.
Need Help?
Section titled “Need Help?”If you have questions about applications or need assistance:
- 📧 Email: support@docstron.com
- 💬 Live Chat: Available in your dashboard
- 📚 Documentation: You’re reading it!