This endpoint allows you to delete a specific document attached to an application, identified by its unique application ID ({id}) and document ID ({documentID}). Once deleted, the document will no longer be associated with the application.
Parameter Description {id}The unique application identifier returned during application creation or listing endpoints. {documentID}The unique identifier of the document, returned during document upload.
This API does not require body parameters.
Field Name Type Description HTTP Status Code Integer Returns 200 for successful deletion. statusString Status of the API request (SUCCESS, FAILED). successBoolean Indicates if the document deletion was successful. resultString A confirmation message for the deletion (e.g., "Document deleted successfully."). errorsArray of Strings Any errors encountered during the deletion process.
❗️
Deleted documents cannot be recovered. Use this endpoint with caution.
Ensure secure handling of document deletions, especially for sensitive or regulated data.
Bash
curl --request DELETE \
--url https://api-sandbox.flexfactor.io/v1/onboarding/application/{application_id}/documents/{document_id} \
--header 'Authorization: Bearer {the token returned by /oauth2}' \
--header 'accept: application/json'
JSON
{
"status": "SUCCESS",
"success": true,
"result": "Document deleted successfully.",
"errors": []
}
JSON
{
"status": "FAILED",
"success": false,
"result": null,
"errors": [
"Document not found.",
"Document deletion not allowed for submitted applications."
]
}
If the document ID or application ID is invalid, the API will return an error.
If the bearer token is unauthorized, the API will respond with an Unauthorized error.
HTTP
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"errors": [
"Document not found."
]
}
HTTP
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"errors": [
"Authentication failed. Invalid bearer token."
]
}