Delete a document
You might want to delete a document if the incorrect document was uploaded or the wrong file was shared. Both you and your end users can delete uploaded documents.
There are two methods you can use to delete documents. Note that your end users can delete documents through their banking interface.
- Run an API mutation to delete the document.
- Delete it directly from your Dashboard.
Prerequisites
If you're using the API, you'll need either a project access token, or a user access token for the associated user.
Also, the document must have the status Uploaded
.
API guide​
- First, retrieve the document ID.
- Call the
deleteSupportingDocument
mutation. - Enter the document ID retrieved in step 1.
- Add optional messages to the success payload, either for validation or in case of rejection.
Mutation​
🔎 Open the mutation in API Explorer
mutation DeleteDocument {
deleteSupportingDocument(input: { id: "$DOCUMENT_ID" }) {
... on DeleteSupportingDocumentSuccessPayload {
id
}
}
}
Payload​
If the deletion is successful, the API Explorer returns the document ID. You can confirm that the document no longer exists by checking your Dashboard.
{
"data": {
"deleteSupportingDocument": {
"id": "f193d0f6-fe7e-4592-9b5f-bce46a968553"
}
}
}
Dashboard: Onboarding​
Use the Dashboard to delete a document.
- Go to Data > Onboardings > Supporting documents.
- Click the trash icon for any document on your list.