---
title: "Edit saved subtitles"
method: POST
path: "/actions/subtitles_history_update"
tags: ["subtitles"]
---

# Edit saved subtitles

`POST /actions/subtitles_history_update`

## Request

- Base URL: `https://api.voicecheap.ai/v1`
- URL: `https://api.voicecheap.ai/v1/actions/subtitles_history_update`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Update saved SRT and layout using its latest revision. A stale revision is rejected so concurrent edits cannot overwrite one another.

## Headers

- `Idempotency-Key` string, uuid

## Request body

- object
  - `historyId` string, required
  - `currentSrtContent` string, required
  - `expectedRevision` integer, required
  - `layoutOptions` object
    - `maxLinesPerCaption` union, required
      - 1
      - 2
      - 3
    - `maxCharactersPerLine` integer, required
  - `styleOptions` object
    - `fontFamily` 'sans' | 'serif' | 'mono', required
    - `fontSize` 'small' | 'medium' | 'large', required
    - `textColor` 'white' | 'yellow' | 'cyan', required
    - `backgroundStyle` 'outline' | 'box' | 'shadow', required
    - `position` 'bottom' | 'middle', required
  - `requestId` string, uuid: UUID v4 for this action. Reuse the same ID with identical arguments on retries.

## Response `200`

Completed result or saved request state.

- object
  - `data` unknown, required
  - `requestId` string, uuid

## Other responses

- `202`: The action is running. Poll action_request_get with requestId and operation.
- `400`: Invalid arguments.
- `401`: Invalid or expired API key.
- `403`: Permission or subscription required.
- `409`: Idempotency conflict or account concurrency limit.
- `429`: Shared account rate or monthly limit reached.

---

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