Skip to main content

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

{
"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 (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

ParameterTypeDescriptionPossible ValuesExample Value
requestIdstring (UUID)Unique identifier for the request.Any valid UUIDee57bcb5-b02b-4ae7-af37-6e91549f647d
statusstring (Enum)Status of the request.SUCCESS
FAILURE
SUCCESS
errorCodestringError code. Will be null for /sync endpoint.nullnull
errorMessagestringError message. Will be null for /sync endpoint.nullnull
documentUrlstring (URL)URL to the generated document.Any valid URLhttps://s3-your-custom-bucket.com/document.pdf
expiresAtstring (ISO 8601)Expiration date and time of the document. Will be null if customS3PresignedUrl is provided.ISO 8601 datetime string in UTC or null2024-11-19T23:59:59Z or null
isAsyncbooleanIndicates if the operation is asynchronous.true
false
false
durationnumberDuration of the request in milliseconds. Will be null if status is FAILURE.Any positive number or null1000 or null
documentSizeMbnumberSize of the document in megabytes. Will be null if status is FAILURE.Any positive number or null0.36 or null