GET /v1/file/upload/get-presigned-url

With this method you can upload files up to 2GB in size. Please note that to process these files you should use async=true mode with data extraction and tools endpoints along with Job Check to check status of background jobs you create.

Query parameters

No query parameters accepted.

Responses

ParameterTypeDescription
presignedUrlstringThe presigned URL to upload the file
urlstringDirect URL to the final PDF file stored in S3.
outputLinkValidTillstringTimestamp indicating when the output link will expire
errorbooleanIndicates whether an error occurred (false means success)
statusstringStatus code of the request (200, 404, 500, etc.). For more information, see Response Codes.
namestringName of the output file
creditsintegerNumber of credits consumed by the request
remainingCreditsintegerNumber of credits remaining in the account
durationintegerTime taken for the operation in milliseconds

Example Response

To see the main response codes, please refer to the Response Codes page.
{
  "presignedUrl": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/A1VGV42YE0NWXMKEB4BUIWNYGKXEWTND/test.pdf?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20220913/us-west-2/s3/aws4_request&X-Amz-Date=20220913T074159Z&X-Amz-SignedHeaders=content-type;host&X-Amz-Signature=53f326afde5bcfb3b2714ee8cb5322795bf10a03feb7dab3764e6ca63c017f43",
  "url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/A1VGV42YE0NWXMKEB4BUIWNYGKXEWTND/test.pdf?X-Amz-Expires=3600&X-Amz-Security-Token=FwoGZXIvYXdzEBgaDLZTUxFLOwF9iiGk%2FyKCATiLp%2FRn9nPmt%2Fey9PcilcRMXtLl0TS6IFNOpk%2BKtSF%2B%2BEVcbNFThw4c1KVx21RQxT5zf7csSEESGov1Xd4uDhF0xGoVkXff9saXGVUtgKrYgPKhUfv5KEO7gz3E0t%2FqCPZJn2KGs1yMbUkohzeIrEd0NH8EVvqfxrfCcW0ZANiG2iMoh8eAmQYyKLjRMfg02ZJPTgoFPQmfMyYt0FacTg4RhkP3PeD9mrWLefDXCwcYkkI%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHFHQYL4OV/20220913/us-west-2/s3/aws4_request&X-Amz-Date=20220913T074159Z&X-Amz-SignedHeaders=host&X-Amz-Signature=9b1a90f36635459bb40f09b0fc6fe3eba185ba3cfdb0a8ef1096ac9efa9b6299",
  "error": false,
  "status": 200,
  "name": "test.pdf",
  "credits": 7,
  "duration": 0,
  "remainingCredits": 98191146
}

Code Samples

curl --location --request GET https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true
--header 'x-api-key: YOUR_API_KEY'