Cancel a job

June 3, 2026

Table of contents

  1. Request Headers
  2. Responses
  3. Model
  4. Examples
  5. Try It

Cancel a running async job and free its concurrency slot. The job record is marked failed with error code user_cancelled (terminal records are simply removed from the running set).

https://api.useapi.net/v1/flowmusic/jobs/jobid

  • jobid is URL-encoded in the path.

Request Headers

Authorization: Bearer {API token}
Content-Type: application/json

Responses

  • 204 No Content — cancelled (or slot already freed). No body.

  • 401 Unauthorized — invalid API token.

  • 403 — the jobid does not belong to your account.

  • 404 — no job with that id.

Model

A successful cancel returns 204 No Content with no body. Only the error responses (403 / 404) carry a JSON { error, code }.

Examples

  • JOBID="job:56ef7890-...-bot:flowmusic"
    curl -X DELETE -H "Authorization: Bearer YOUR_API_TOKEN" \
         "https://api.useapi.net/v1/flowmusic/jobs/$(python3 -c "import urllib.parse,sys;print(urllib.parse.quote(sys.argv[1],safe=''))" "$JOBID")"
    
  • import requests, urllib.parse
    jobid = 'job:56ef7890-...-bot:flowmusic'
    r = requests.delete('https://api.useapi.net/v1/flowmusic/jobs/' + urllib.parse.quote(jobid, safe=''),
                        headers={'Authorization': 'Bearer YOUR_API_TOKEN'})
    print(r.status_code)  # 204
    

Try It