# Commit one warm/lightweight episode revision

`POST /v1/datasets/episode-revision`

- Base URL: `https://junction-api.qualiastudios.dev`
- Authentication: an API key in the `X-API-Key` header, or `Authorization: Bearer …`

## Parameters

- `account_id` (query, string | null (uuid)): Act on this account (active)

## Request body

Required: `application/json` `CreateEpisodeRevisionBody`

## Responses

- `200` Successful Response: `application/json` `any`
- `401` Invalid or missing API key: `application/json` `ErrorResponse`
- `422` Validation Error: `application/json` `HTTPValidationError`

## Schemas

```yaml
CreateEpisodeRevisionBody:
  properties:
    episode_id:
      type: string
      format: uuid
    operation_id:
      type: string
      format: uuid
    note:
      type: string
      default: ""
    expected_parent_rev:
      type: integer
      default: 0
    trim_start_s:
      type:
        - number
        - "null"
    trim_end_s:
      type:
        - number
        - "null"
    clear_trim:
      type: boolean
      default: false
    task:
      type:
        - string
        - "null"
    subtasks:
      nullable: true
      items:
        additionalProperties: true
        type: object
      type: array
    clear_subtasks:
      type: boolean
      default: false
    tier:
      type:
        - string
        - "null"
    tags:
      nullable: true
      items:
        type: string
      type: array
    add_tags:
      nullable: true
      items:
        type: string
      type: array
    remove_tags:
      nullable: true
      items:
        type: string
      type: array
    review_state:
      nullable: true
      type: string
      enum:
        - unreviewed
        - auto_accepted
        - human_audited
        - rejected
  type: object
  required:
    - episode_id
    - operation_id
  title: CreateEpisodeRevisionBody
ErrorResponse:
  properties:
    detail:
      type: string
      description: Error message describing what went wrong
  type: object
  required:
    - detail
  title: ErrorResponse
  description: Standard error response.
HTTPValidationError:
  properties:
    detail:
      items:
        $ref: "#/components/schemas/ValidationError"
      type: array
  type: object
  title: HTTPValidationError
ValidationError:
  properties:
    loc:
      items:
        type:
          - string
          - integer
      type: array
      title: Location
    msg:
      type: string
      title: Message
    type:
      type: string
      title: Error Type
    input: {}
    ctx:
      type: object
      title: Context
  type: object
  required:
    - loc
    - msg
    - type
  title: ValidationError
```
