For AI agents: every API docs page in one plain-text file is at /docs/llms-full.txt, and the documentation index is at /llms.txt. This page is available as Markdown at https://diffio.ai/docs/api-reference/delete-transcript-draft.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

Delete the transcript draft
Deletes a generation's saved transcript draft and advances revision so stale saves from before the delete are rejected.
DELETE https:/
- Key scope:
generations:write - Auth header:
Authorization: Bearer <apiKey> - Body: None
Request
Pass project_id and generation_id in the path, and optional revision in the query string.
Path parameters
Query parameters
| Field | Type | Required | Description |
|---|---|---|---|
#revision | string | Required: No | Optional opaque revision last read; refuses the delete with 409 (revision_conflict) if a newer draft was saved since. |
Headers
| Field | Type | Required | Description |
|---|---|---|---|
#Diffio-End-User | string | Required: No | Optional end-user identifier (up to 128 characters). Scopes the request to that end user's projects; omit to act across the whole account. |
Request
import os
from diffio import DiffioClient
key = os.environ["DIFFIO_API_KEY"]
client = DiffioClient(api_key=key)
deleted = client.transcripts.delete_draft(
"62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
"ce832a32-a1ce-516a-b8bd-75457bd8517f",
revision="1",
)Response
Returns deleted: true and the current post-delete revision.
Success: 200OK.
Response fields
| Field | Type | Present | Description |
|---|---|---|---|
#object | string | Always | Resource type, always "transcript_draft".transcript_draft |
#project_id | string | Always | Identifier of the parent project. |
#generation_id | string | Always | Identifier of the generation. |
#deleted | boolean | Always | Always true.true |
#revision | string | Always | Revision representing the deleted state (unchanged when nothing was saved); pass to the next save. |
Response 200OK.
{
"object": "transcript_draft",
"project_id": "62f62565-049f-5e7e-bbd2-9de0cf7ddbfe",
"generation_id": "ce832a32-a1ce-516a-b8bd-75457bd8517f",
"deleted": true,
"revision": "2"
}Return codes
200OK.Draft deleted (or already absent) and the currentrevisionis returned.400Bad request.revisionquery parameter is not one a draft answer gave, orDiffio-End-Userexceeds 128 characters.invalid_parameterinvalid_header403Forbidden: the key lacks permission.Key is inactive or lacksgenerations:write.permission_denied404Not found.Project not found, or generation not found.project_not_foundgeneration_not_found409Conflict: see error.code for which one.Queryrevisiondoes not match the current draft revision, reported indetails.current_revision.revision_conflict401Unauthorized: the API key is missing or invalid.405Client error.Same on every endpoint401Unauthorized: the API key is missing or invalid. Missing API key (code missing_api_key), or invalid API key (code invalid_api_key).405Client error. HTTP method not supported on this path; check the Allow header (code method_not_allowed).
Example error response
Errors are JSON: an error object with code, message and request_id. An unrecognized key returns 401Unauthorized: the API key is missing or invalid.:
{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key.",
"request_id": "dead773b60e148fd9e22d680a22fa701"
}
}Notes
- Deleting when no draft is saved still succeeds with
200(deleted: true) unless a stalerevisionquery parameter was passed. - Deleting a draft records a tombstone revision so an older editor session saving with a pre-delete
revisionreceives409(revision_conflict).