Skip to main content

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.

  1. Run an API mutation to delete the document.
  2. 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​

  1. First, retrieve the document ID.
  2. Call the deleteSupportingDocument mutation.
  3. Enter the document ID retrieved in step 1.
  4. 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​

Use the Dashboard to delete a document.

  1. Go to Data > Onboardings > Supporting documents.
  2. Click the trash icon for any document on your list.