# Delete transcription Delete a transcription by ID. Performs a soft delete locally and attempts to delete the associated data from the upstream provider. Soft-deletes the transcription record from the database and attempts to delete the associated data from the upstream transcription provider. If the upstream deletion fails, the local record is still marked as deleted and the upstream deletion is scheduled for retry. The response includes a `deleted_upstream` flag indicating whether the upstream deletion was successful. #### Path Parameters **`transcription_id`** string required The transcription ID with `trans_` prefix (e.g., `trans_a1b2c3d4e5f6...`). ## Returns Returns a success envelope with: - **`data.deleted`** -- `true` confirming the deletion. - **`data.transcription_id`** -- The ID of the deleted transcription. - **`data.deleted_at`** -- ISO 8601 timestamp of when the deletion occurred. - **`data.deleted_upstream`** -- `true` if the upstream provider data was also deleted, `false` if the upstream deletion failed (will be retried). - **`metadata`** -- Request metadata: `request_id`, `timestamp`, `processing_time_ms`. Request ```bash cURL curl -s -X DELETE https://api.aitronos.com/v1/audio/transcribe/trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6 \ -H "Authorization: Bearer $ACCESS_TOKEN" | python3 -m json.tool ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.audio.delete_transcription( transcription_id="trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", ) print(f"Deleted: {result.data.deleted}") print(f"Deleted at: {result.data.deleted_at}") ``` ```python Python import requests transcription_id = "trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" url = f"https://api.aitronos.com/v1/audio/transcribe/{transcription_id}" headers = {"Authorization": "Bearer YOUR_ACCESS_TOKEN"} response = requests.delete(url, headers=headers) data = response.json() print(f"Deleted: {data['data']['deleted']}") print(f"Upstream deleted: {data['data']['deleted_upstream']}") ``` ```javascript JavaScript const accessToken = process.env.ACCESS_TOKEN; const transcriptionId = 'trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6'; const response = await fetch( `https://api.aitronos.com/v1/audio/transcribe/${transcriptionId}`, { method: 'DELETE', headers: { 'Authorization': `Bearer ${accessToken}`, }, } ); const data = await response.json(); console.log('Deleted:', data.data.deleted); console.log('Deleted at:', data.data.deleted_at); ``` Response ```json 200 OK { "success": true, "data": { "deleted": true, "transcription_id": "trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", "deleted_at": "2026-03-02T14:00:00Z", "deleted_upstream": true }, "metadata": { "request_id": "req_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d", "timestamp": "2026-03-02T14:00:00Z", "processing_time_ms": 180 } } ``` ```json 404 Not Found { "success": false, "error": { "code": "NOT_FOUND", "message": "We couldn't find the resource you're looking for.", "system_message": "Transcription not found", "type": "client_error", "status": 404, "details": { "transcription_id": "trans_nonexistent" }, "trace_id": "abc-123-def", "timestamp": "2026-03-02T14:00:00Z" } } ``` ```json 403 Forbidden { "success": false, "error": { "code": "INSUFFICIENT_PERMISSIONS", "message": "You don't have permission to access this resource.", "system_message": "You don't have access to this transcription", "type": "client_error", "status": 403, "details": { "transcription_id": "trans_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6", "organization_id": "org_wrong" }, "trace_id": "abc-123-def", "timestamp": "2026-03-02T14:00:00Z" } } ``` ## Related Resources - [Create Transcription](/docs/api-reference/audio/create-transcription) - [Get Transcription](/docs/api-reference/audio/get-transcription) - [List Transcriptions](/docs/api-reference/audio/list-transcriptions) - [Get Paragraphs](/docs/api-reference/audio/get-paragraphs) - [Get Sentences](/docs/api-reference/audio/get-sentences) - [Get Subtitles](/docs/api-reference/audio/get-subtitles) - [Search Transcript](/docs/api-reference/audio/search-transcript) - [Get Redacted Audio](/docs/api-reference/audio/get-redacted-audio) - [Upload Audio File](/docs/api-reference/audio/upload-audio)