Skip to main content
POST
/
v1
/
file
/
upload
/
url
Upload File from URL
curl --request POST \
  --url https://api.pdf.co/v1/file/upload/url \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "<string>",
  "name": "<string>",
  "httpusername": "<string>",
  "httppassword": "<string>"
}
'
{
  "status": "success",
  "message": "Success",
  "url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/output.pdf",
  "jobId": "6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA",
  "credits": 2,
  "remainingCredits": 1480582,
  "duration": 33
}

Authorizations

x-api-key
string
header
required

Body

application/json
url
string<uri>
required

URL to the source file url attribute.

name
string

File name for generated output.

httpusername
string

HTTP auth user name if required to access source URL.

httppassword
string

HTTP auth password if required to access source URL.

Response

Success.

status
string

Status of the API response.

Example:

"success"

message
string

Descriptive message for the response status.

Example:

"Success"

url
string<uri>

URL to the output file.

Example:

"https://pdf-temp-files.s3.us-west-2.amazonaws.com/output.pdf"

jobId
string

Unique identifier for the job.

Example:

"6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA"

credits
integer

Credits used for this operation.

Example:

2

remainingCredits
integer

Credits remaining after this operation.

Example:

1480582

duration
integer

Time taken to complete the request, in milliseconds.

Example:

33