Skip to main content

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:

{
"url": "https://example.com"
}

Body Parameters

info

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.

ParameterTypeDescriptionPossible ValuesExample Value
requestIdstring (UUID)
  • Unique identifier for the request.
Any valid UUIDee57bcb5-b02b-4ae7-af37-6e91549f647d
statusstring (Enum)
  • Status of the request.
SUCCESSSUCCESS
errorCodestring
  • Error code.
  • This field is null for successful requests.
nullnull
errorMessagestring
  • Error message.
  • This field is null for successful requests.
nullnull
documentUrlstring (URL)
  • URL to the generated document.
  • This will be null if customS3PresignedUrl is used, as the PDF is uploaded directly to the provided S3 bucket.
Any valid URL or nullhttps://s3-your-custom-bucket.com/document.pdf
expiresAtstring (ISO 8601)
  • Expiration date and time of the document stored in the default PDFBolt S3 bucket.
  • Will be null if customS3PresignedUrl is provided.
ISO 8601 datetime string in UTC or null2024-11-19T23:59:59Z
isAsyncboolean
  • Indicates if the operation is asynchronous.
  • Will always be false for the /sync endpoint.
falsefalse
durationnumber
  • Total processing time for the request.
  • Measured in milliseconds.
Any positive number1000
documentSizeMbnumber
  • Size of the document in megabytes.
Any positive number0.55
isCustomS3Bucketboolean
  • Indicates if the generated document was uploaded to a user-provided custom S3 bucket or PDFBolt's default storage.
true
false
false