Quick Start with Postman
Tools like Postman simplify testing and interaction with the PDFBolt API, making it easy to explore its features without writing code. You can start right away by watching the quick start video, using our Postman collection, or following the step-by-step guide below.
Quick Start Video
Quick API Testing
Getting started with the PDFBolt API has never been easier!
- To simplify testing, we've prepared a Postman collection with all available API endpoints.
- With just a single click, you can fork the collection and start experimenting directly in Postman.
- Simply set your API key as an environment variable. You can find your API key in the Admin Dashboard under the API Keys section.
Quick Start from Scratch
1️⃣ Get Your API Key
- Your API Key can be found in the Admin Dashboard under the API Keys section after signing up.
- The API Key is required to authorize your requests to the PDFBolt API.
2️⃣ Set Up Postman for PDFBolt
1. Create a New Request:
- Open Postman and create a new Request.
- Set the HTTP Method to
POST
. - Enter one of the following PDFBolt API endpoint URLs based on your use case:
https://api.pdfbolt.com/v1/direct
https://api.pdfbolt.com/v1/sync
https://api.pdfbolt.com/v1/async
2. Set Up Authorization:
- Go to the Authorization tab.
- Choose API Key as the Auth Type.
- Enter the following values:
- Key:
API_KEY
- Value: Your unique API key.
- Select Header to include the key in the request headers.
- Key:
📌 Setting Up Your API Key as an Environment Variable in Postman
Instead of manually entering your API key every time, store it as an environment variable in Postman for easier reuse in future requests.
How to set it up in Postman:
- Open Postman and go to Environments.
- Click ➕ to create a new environment.
- Create a new variable called
API_KEY
and set its type to Secret. - Paste your API key into Initial value and Current value, then save the environment.
- In your request headers, instead of manually entering the key, use
{{API_KEY}}
.
This way, Postman will automatically insert your API key, improving security and efficiency.
3. Define the Request Body:
- Navigate to the Body tab.
- Select raw and set the content type to
JSON
. - Use the following example request body to generate a PDF:
{
"url": "https://en.wikipedia.org/wiki/Coffee",
"printBackground": true,
"pageRanges": "1-3",
"margin": {
"top": "30px",
"right": "20px",
"left": "20px",
"bottom": "30px"
}
}
If you want to use the /async
endpoint, ensure you include the webhook
parameter in your request.
4. Send the Request:
- Click Send to execute the request.
- Upon success, the response will contain either a raw PDF or a download URL, depending on the endpoint used.
3️⃣ What’s next?
Test API Endpoints and experiment with Conversion Parameters directly in Postman. Modify the request body to include additional parameters to customize your document generation process.
📄️ API Endpoints
📄️ Conversion Parameters
Here’s why they’re a great choice:
- Quick Testing: Easily test your requests without hassle.
- Code-Free Interaction: Generate PDFs and interact with the API without writing code.
- Effortless Configuration: Easily set up endpoints, parameters, and authorization.
- Debugging Support: Inspect requests and responses for effective troubleshooting and optimization.