---
title: "Cancel an audio upload that is still processing"
method: POST
path: "/api/audio/{audioId}/cancel"
tags: ["Audio"]
---

# Cancel an audio upload that is still processing

`POST /api/audio/{audioId}/cancel`

## Request

- Base URL: `https://api.sponsorunited.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.sponsorunited.com/api/audio/{audioId}/cancel`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sponsorunited/apis/sponsorunited-api/docs/api/audio/:audioId/cancel/post.ts> (a function with typed inputs; its response is checked against the schema)

Stops the transcription of the scout's own audio while it is processing: the audio becomes CANCELLED, results that arrive later are ignored and create no deals, and the scout gets the transcription-cancelled Pusher event. The results already saved (its rows, clips, the audits they leave empty, its chunk records and its transcript file) are removed in the background, and the scout gets the transcription-results-removed Pusher event when that is done. The removal stops, removing nothing more and sending no event, once a scouting report holding the audio's rows is approved. Cancelling an audio that is already cancelled succeeds again and queues that removal again when some of its results are still there, e.g. when queuing it failed the first time. Refused for an audio of another scout and an audio with no scouting report; approving a report removes its uploads from it, so this includes an audio whose report was approved. An audio not yet cancelled is also refused when it is on any approved report or is not processing.

## Path parameters

- `audioId` integer, required

## Response `200`

The audio, now cancelled.

- object
  - `data` AudioResource
    - `id` integer
    - `original_name` string
    - `stored_name` string
    - `vtt_url` string
    - `processed_json_file_url` string, nullable: Signed link to the transcript; null when there is none or the audio is cancelled
    - `original_file_size` string
    - `item_subplatform_id` integer, nullable: Restricts asset matching to this subplatform during transcription
    - `transcribe_job_status` 'IN_PROGRESS' | 'COMPLETE' | 'FAILED' | 'CANCELLED', nullable: Null until a transcription dispatch is attempted; CANCELLED once the scout cancels it while it is processing
    - `chunks_total` integer, nullable: How many chunks the transcript was split into; null unless results arrive chunk by chunk
    - `chunks_done` integer, nullable: Chunks saved or failed so far; null when chunks_total is null
    - `failed_chunks` object[], nullable: Chunks whose deals could not be detected or saved; null when chunks_total is null
      - `chunk_number` integer
      - `start_seconds` number, float, nullable
      - `end_seconds` number, float, nullable
      - `reason` 'too_large' | 'timeout' | 'detection_error' | 'callback_not_delivered' | 'save_error' | 'no_scouting_report' | 'callback_processing_failed', nullable
    - `linked_rows_count` integer, nullable: How many rows (item values) hold a clip of this audio, each counted once: what cancelling the audio removes. Null where the endpoint does not count them

## Other responses

- `401`: Unauthenticated
- `403`: The audio belongs to another scout, or is not on a scouting report, which includes an audio whose report was approved.
- `404`: Audio not found
- `409`: A scouting report holding the audio is approved, the audio is not processing (complete, failed for its task, or never sent for transcription), or results for the report were still being saved, so nothing was cancelled and the call can be retried.

---

[API](https://skmtc.dev/sponsorunited/apis/sponsorunited-api.md) - [All operations](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sponsorunited/apis/sponsorunited-api/revisions/cbf1ca5bff8f?raw)
