cURL
curl --request POST \ --url https://api.weblinq.dev/v1/files/delete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "fileId": "<string>", "deleteFromR2": false }'
{ "success": true, "data": { "fileId": "<string>", "wasFound": true, "deletedFromDatabase": true, "deletedFromR2": true, "deletedFile": { "id": "<string>", "type": "screenshot", "url": "<string>", "filename": "<string>", "r2_key": "<string>", "public_url": "<string>", "metadata": "<string>", "created_at": "<string>", "expires_at": "<string>" }, "error": "<string>" }, "creditsCost": 123, "requestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "timestamp": "2023-11-07T05:31:56Z" }
Delete a file from database and optionally from R2 storage
Enter your API token or session token
File deletion parameters
1
Also delete the file from R2 storage
File deleted successfully
Show child attributes
Unique request identifier for tracing
ISO timestamp when the response was generated
Credits consumed by this operation