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
- First, retrieve the document ID.
- Call the
deleteSupportingDocumentmutation. - 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 in API Explorermutation 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"
}
}
}
Also available
Delete a documentFrom the Dashboard