POST /v1/file/delete

All temporary files are auto removed after 1 hour. You may use File Upload methods to explicitly force remove temp files once you don’t need them.

Attributes

Attributes are case-sensitive and should be inside JSON for POST request. for example: { "url": "https://example.com/file1.pdf" }
AttributeTypeRequiredDefaultDescription
urlstringYes-URL of the previously uploaded temporary file or output file that was generated by the API method.

Query parameters

No query parameters accepted.

Responses

ParameterTypeDescription
errorbooleanIndicates whether an error occurred (false means success)
statusstringStatus code of the request (200, 404, 500, etc.). For more information, see Response Codes.
messagestringMessage of the request
creditsintegerNumber of credits consumed by the request
durationintegerTime taken for the operation in milliseconds
errorCodeintegerError code of the request (400, 401, 402, 403, 404, 500, etc.)
remainingCreditsintegerNumber of credits remaining in the account

Example Payload

To see the request size limits, please refer to the Request Size Limits.
{
  "url": "https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf"
}

Example Response

To see the main response codes, please refer to the Response Codes page.
{
  "error": false,
  "status": 200,
  "remainingCredits": 9999986
}

Code Samples

curl --location --request POST 'https://api.pdf.co/v1/file/delete'
--header 'x-api-key: *******************'
--data-raw '{
    "url": "https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf"
}'