Skip to main content
DELETE
/
jobs
/
{id}
/
file
Delete Job File
curl --request DELETE \
  --url https://api.example.com/jobs/{id}/file \
  --header 'x-api-key: <x-api-key>'
{
  "message": "File deleted successfully",
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "deleted_key": "videos/my-video.mp4"
}

Overview

Permanently delete a job’s downloaded file from S3 storage. The job record is kept in the database, but the s3_key field is cleared. Use this to free up storage space for completed downloads you no longer need.

Header Parameters

x-api-key
string
required
Your API key for authentication

Path Parameters

id
uuid
required
The job UUID

Response

message
string
Success message
job_id
string
The job ID
deleted_key
string
The S3 key that was deleted

Examples

curl -X DELETE "https://tornado.velys.software/jobs/550e8400-e29b-41d4-a716-446655440000/file" \
  -H "x-api-key: sk_your_api_key"

Success Response

{
  "message": "File deleted successfully",
  "job_id": "550e8400-e29b-41d4-a716-446655440000",
  "deleted_key": "videos/my-video.mp4"
}

Error Responses

{
  "error": "Job has no file to delete"
}

Notes

  • This permanently deletes the file from S3 storage
  • The job record is kept in the database for reference
  • You cannot recover deleted files
  • Only works for jobs with status Completed
  • Jobs without an s3_key (failed or pending) cannot have files deleted