Skip to main content
Segments, speakers and translation settings carry an opaque, strong ETag, in the ETag header and in the etag field of the body, so lists have it too. A write commits only while the resource still matches the ETag you read, so two writers cannot silently overwrite each other.

Edit a segment

Read it, then send its etag unchanged, quotes included, in If-Match.
The answer holds the changed segments and effects: which segments need a redub, whether a translation started (effects.retranslation), and whether a restore point was saved. If a translation started, wait for its job before you dub. Then estimateDub with mode: changed_segments prices the redub.

Which operations take what

What the answers mean

In project_not_ready and dub_in_progress, job_id is null when the run was started outside the API, for example in the web app. Then read the project with getProject and retry later.
On a 412, do not resend the old values over the new state. Read the segment, decide what your change means now, and apply that.

What changes an ETag

A segment’s ETag is a hash of its editable content: times, speaker, source and translation text, review flag, selected variant, and an audio marker. So a segment generation or a dub can change it, even though you edited nothing. A SegmentClip holds the ETag right after synthesis in segment_etag: read the segment again before you edit it. A job’s ETag is different: it is only a header of getJob, for If-None-Match. See Jobs.