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" }| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | - | URL of the previously uploaded temporary file or output file that was generated by the API method. |
Query parameters
No query parameters accepted.Responses
| Parameter | Type | Description |
|---|---|---|
error | boolean | Indicates whether an error occurred (false means success) |
status | string | Status code of the request (200, 404, 500, etc.). For more information, see Response Codes. |
message | string | Message of the request |
credits | integer | Number of credits consumed by the request |
duration | integer | Time taken for the operation in milliseconds |
errorCode | integer | Error code of the request (400, 401, 402, 403, 404, 500, etc.) |
remainingCredits | integer | Number of credits remaining in the account |
Example Payload
To see the request size limits, please refer to the Request Size Limits.
Example Response
To see the main response codes, please refer to the Response Codes page.
Inconsistent URL Encoding in cURL Output: When using cURL to make API requests, the output JSON may show URL characters encoded as Unicode escape sequences. For example, the ampersand character (
&) may appear as \u0026 in the cURL output. This is normal JSON encoding behavior and does not affect the validity of the URL. The URL will function correctly when used, as JSON parsers automatically decode these escape sequences. If you’re parsing the response programmatically, your JSON parser will handle this conversion automatically.Code Samples
- CURL
- JavaScript/Node.js
- Python
- PHP