In this topic, you’ll learn how to delete a PDF in your environment. You will make use of your document ID and an API testing tool. We recommend you to use Insomnia, but any other tool works too. An alternative option is to use Postman, another popular choice.
At the end of this guide, you should have an already existing PDF deleted.
- You have previously created a PDF
- You are aware of document IDs
- You have an API testing tool at hand and know how to use it
- You have created an API key with the appropriate permissions (Renders.Delete)
Read more about:
Inkit Render performs hard-deletion of documents. This means that once you delete your PDF, you cannot recover it.
We have a zero-trust policy. This means we cannot go into your data. Ever. Bear this in mind as you use the techniques laid out in this guide. First, work with a generated sample document, then delete documents you are sure don’t need anymore.
Make sure you have an API key token with the appropriate permissions. You need to have the Renders.delete permission.
Read more about managing API keys here. In this section of the documentation, you’ll see how to add permissions to API keys.
Then, proceed as follows:
- Open your API request testing tool and create a new DELETE request
- Get your document ID and put it into this format:
Your endpoint will look something like this:
- Set this link as the targeted endpoint of your request
- Include your API key in the JSON headers under the variable name: X-Inkit-API-Token
- Send your request
You should have now successfully deleted your PDF. You can replicate this process as often as you like. However, do mind that deletion is permanent. We cannot recover your files. Therefore, be prudent.
Updated 7 months ago