Skip to main content

Audience:

Developers

Delete a document using the API

Delete a document you or your end users uploaded, with the API.

Prerequisites

You'll need either a project access token, or a user access token for the associated user.

The document must have the status Uploaded.

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 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"
}
}
}