Sync Conversion
The sync conversion endpoint generates a PDF and returns a temporary URL for accessing the document once processing is complete. This method is ideal for workflows where direct access isn’t immediately necessary, but where the PDF can be downloaded via url.
Endpoint Details
Method: POST
https://api.pdfbolt.com/v1/sync
Example
- Request
- Response
{
"url": "https://example.com"
}
{
"requestId": "ee57bcb5-b02b-4ae7-af37-6e91549f647d",
"status": "SUCCESS",
"errorCode": null,
"errorMessage": null,
"documentUrl": "https://s3-your-custom-bucket.com/document.pdf",
"expiresAt": "2024-11-19T23:59:59Z",
"isAsync": false,
"duration": 1000,
"documentSizeMb": 0.36
}
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
(URL)
Required: No
Details: The customS3PresignedUrl
property allows you to specify a URL for uploading your document directly to your S3 bucket. For detailed instructions, please refer to Uploading to Your S3 Bucket section. If no URL is provided, your document will be temporarily stored in our S3 bucket.
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. It determines whether the file will be displayed inline in the browser or downloaded as an attachment.
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
Parameter | Type | Description | Possible Values | Example Value |
---|---|---|---|---|
requestId | string (UUID) | Unique identifier for the request. | Any valid UUID | ee57bcb5-b02b-4ae7-af37-6e91549f647d |
status | string (Enum) | Status of the request. | SUCCESS FAILURE | SUCCESS |
errorCode | string | Error code. Will be null for /sync endpoint. | null | null |
errorMessage | string | Error message. Will be null for /sync endpoint. | null | null |
documentUrl | string (URL) | URL to the generated document. | Any valid URL | https://s3-your-custom-bucket.com/document.pdf |
expiresAt | string (ISO 8601) | Expiration date and time of the document. Will be null if customS3PresignedUrl is provided. | ISO 8601 datetime string in UTC or null | 2024-11-19T23:59:59Z or null |
isAsync | boolean | Indicates if the operation is asynchronous. | true false | false |
duration | number | Duration of the request in milliseconds. Will be null if status is FAILURE . | Any positive number or null | 1000 or null |
documentSizeMb | number | Size of the document in megabytes. Will be null if status is FAILURE . | Any positive number or null | 0.36 or null |