Sync Conversion
The sync conversion endpoint generates a PDF and provides a downloadable URL once the conversion is complete. This method is ideal for workflows where real-time access is not required, but the PDF can be downloaded via url.
Endpoint Details
Method: POST
https://api.pdfbolt.com/v1/sync
Example
Below is an example demonstrating a request and its corresponding response:
- Request
- Response
{
"url": "https://example.com"
}
{
"requestId": "ee57bcb5-b02b-4ae7-af37-6e91549f647d",
"status": "SUCCESS",
"errorCode": null,
"errorMessage": null,
"documentUrl": "https://s3.pdfbolt.com/pdfbolt_dd3f57ef-ea17-48a9-930a-8990ee7f52a7_2024-12-30T14-26-23Z.pdf",
"expiresAt": "2024-12-31T14:26:23Z",
"isAsync": false,
"duration": 1168,
"documentSizeMb": 0.04,
"isCustomS3Bucket": false
}
Body Parameters
In this section, you will find only the parameters specific to the /sync
endpoint. To view the list of common parameters shared across all endpoints, please refer to the Conversion Parameters section.
customS3PresignedUrl
Type: string
Required: No
Details:
The customS3PresignedUrl
allows you to specify a URL for direct upload to your S3 bucket. If not provided, the document is stored in our S3 bucket for 24 hours.
See Uploading to Your S3 Bucket for setup details.
Usage:
{
"url": "https://example.com",
"customS3PresignedUrl": "https://s3-your-custom-bucket.com?token=abcdef"
}
contentDisposition
Type: string
Required: No
Default Value: inline
Details: This parameter specifies how the content should be presented when downloaded from the S3 bucket:
inline
- the PDF will be displayed directly in the browser.attachment
- the PDF will be downloaded as a file, prompting the user with a Save As dialog.
Usage:
{
"url": "https://example.com",
"contentDisposition": "attachment"
}
Response Parameters
The table below outlines the structure of the response for a successful request. To learn more about the structure of responses for failed requests, refer to the Error Response Format.
Parameter | Type | Description | Possible Values | Example Value |
---|---|---|---|---|
requestId | string (UUID) |
| Any valid UUID | ee57bcb5-b02b-4ae7-af37-6e91549f647d |
status | string (Enum) |
| SUCCESS | SUCCESS |
errorCode | string |
| null | null |
errorMessage | string |
| null | null |
documentUrl | string (URL) |
| Any valid URL or null | https://s3-your-custom-bucket.com/document.pdf |
expiresAt | string (ISO 8601) |
| ISO 8601 datetime string in UTC or null | 2024-11-19T23:59:59Z |
isAsync | boolean |
| false | false |
duration | number |
| Any positive number | 1000 |
documentSizeMb | number |
| Any positive number | 0.55 |
isCustomS3Bucket | boolean |
| true false | false |