Skip to content
Docs menu

Delete a job

Deletes the job with all its tasks and files right away.

DELETEhttps://api.switchfile.io/v2/jobs/{id}

Needs an API key: Authorization: Bearer YOUR_API_KEY. See Authentication.

Example

curl -X DELETE "https://api.switchfile.io/v2/jobs/6e2c1b1f-3c1a-4d4e-9a57-0d7b2f6a8e10" \
  -H "Authorization: Bearer $SWITCHFILE_API_KEY"

Parameters

Path parameters

  • idstring (uuid)required

    ID of the job

Responses

  • 204Deleted
  • 401The API key is missing or not valid
    401 application/json
    {
      "message": "Missing or invalid API key.",
      "code": "UNAUTHENTICATED"
    }
  • 404Does not exist for this account
    404 application/json
    {
      "message": "Job not found.",
      "code": "NOT_FOUND"
    }
  • 411The request has a body but no Content-Length header
    411 application/json
    {
      "message": "A Content-Length header is required for this request.",
      "code": "LENGTH_REQUIRED"
    }
  • 413The request or the file is too large
    413 application/json
    {
      "message": "The request body is larger than the allowed maximum.",
      "code": "PAYLOAD_TOO_LARGE"
    }
  • 422Invalid data. errors names the fields
    422 application/json
    {
      "message": "id: Expected string to match 'uuid' format",
      "code": "INVALID_DATA",
      "errors": {
        "id": [
          "Expected string to match 'uuid' format"
        ]
      }
    }
  • 429Too many requests or a daily quota is used up. See Retry-After
    429 application/json
    {
      "message": "Too many requests. Try again in 12 seconds.",
      "code": "RATE_LIMIT_EXCEEDED"
    }

Error bodies and codes are explained in Errors.