> ## Documentation Index
> Fetch the complete documentation index at: https://docs.relettr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit regions

> Batch edit `ko`, `en`, `type` and `include`. Requires `If-Match` with
the ETag from `GET /regions`; a stale ETag returns
`412 precondition_failed`, so two editors never overwrite each other.

Returns the list of parts that need a re-render. Nothing is rendered
until you call `POST /rerender`.




## OpenAPI

````yaml /openapi.yaml patch /chapters/{chapter_id}/regions
openapi: 3.1.0
info:
  title: Relettr API
  version: '1'
  summary: Translate manhwa chapters (Korean comics) into lettered English.
  description: |
    The Relettr public REST API, version 1.

    Every request is authenticated with an API key sent as a bearer token
    (`rl_live_…` or `rl_test_…`). Credits are integers; 100 credits = $1.

    Within v1 only additive changes are made: new endpoints, new optional
    fields, new event types and new enum values. Ignore unknown fields, and
    treat an unknown chapter `status` as non-terminal.
  contact:
    name: Relettr support
    email: support@relettr.com
servers:
  - url: https://api.relettr.com/v1
    description: Production (live and test keys)
security:
  - bearer: []
tags:
  - name: Chapters
    description: Create, upload, quote, start, poll and download a chapter.
  - name: Regions and review
    description: >-
      Read and edit the translated text, re-render, and resolve failed-mask
      zones.
  - name: Series
    description: Series hold the binding glossary and the context shared between chapters.
  - name: Glossary
    description: Glossary entries of a series.
  - name: Webhooks
    description: Registered webhook endpoints.
  - name: Events
    description: The events that are delivered to webhooks, as a list you can page through.
  - name: Credits
    description: Balance, usage, ledger and price estimates.
  - name: Status
    description: Service status. No authentication.
  - name: Test helpers
    description: Endpoints that exist only for `rl_test_` keys.
paths:
  /chapters/{chapter_id}/regions:
    parameters:
      - $ref: '#/components/parameters/ChapterId'
    patch:
      tags:
        - Regions and review
      summary: Edit regions
      description: |
        Batch edit `ko`, `en`, `type` and `include`. Requires `If-Match` with
        the ETag from `GET /regions`; a stale ETag returns
        `412 precondition_failed`, so two editors never overwrite each other.

        Returns the list of parts that need a re-render. Nothing is rendered
        until you call `POST /rerender`.
      operationId: editRegions
      parameters:
        - name: If-Match
          in: header
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - edits
              properties:
                edits:
                  type: array
                  minItems: 1
                  items:
                    $ref: '#/components/schemas/RegionEdit'
            example:
              edits:
                - id: p03r012
                  en: Stay behind me.
                - id: p03r013
                  include: false
      responses:
        '200':
          description: Saved.
          headers:
            ETag:
              $ref: '#/components/headers/ETag'
          content:
            application/json:
              schema:
                type: object
                properties:
                  dirty_parts:
                    type: array
                    items:
                      type: integer
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '412':
          $ref: '#/components/responses/PreconditionFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    ChapterId:
      name: chapter_id
      in: path
      required: true
      schema:
        type: string
        examples:
          - ch_7Kq2mXaB3cD4eF5gH6iJ7k
  schemas:
    RegionEdit:
      type: object
      required:
        - id
      properties:
        id:
          type: string
        ko:
          type: string
        en:
          type: string
        type:
          type: string
        include:
          type: boolean
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - type
            - code
            - message
            - request_id
          additionalProperties: true
          description: |
            Some codes add fields: `required` and `available` (402),
            `scope`, `limit` and `used_this_month` (spend limits), `limit` and
            `active` (concurrency), `estimated_wait_s` (503), `status` and
            `allowed_from` (invalid_state), `missing_indexes`
            (upload_incomplete).
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - authentication
                - permission
                - not_found
                - conflict
                - payment_required
                - rate_limited
                - capacity
                - api_error
            code:
              type: string
              examples:
                - parameter_invalid
            message:
              type: string
            param:
              type: string
              examples:
                - files[3].content_type
            doc_url:
              type: string
              format: uri
            request_id:
              type: string
  headers:
    ETag:
      description: >-
        Version tag. Send back in `If-None-Match` (polling) or `If-Match`
        (editing).
      schema:
        type: string
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  responses:
    BadRequest:
      description: '`parameter_invalid`, `parameter_missing` or `json_invalid`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: '`api_key_missing`, `api_key_invalid` or `api_key_revoked`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: '`not_found`. Also returned for ids that belong to another account.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: |
        `invalid_state`, `chapter_exists`, `idempotency_key_reused`,
        `idempotency_in_progress`, `chapter_not_ready`, `chapter_locked` or
        `quote_exceeds_max`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PreconditionFailed:
      description: >-
        `precondition_failed`. The `If-Match` ETag is stale; fetch the regions
        again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: '`rate_limited` or `concurrency_limit`.'
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: |
        An API key: `rl_live_…` for real work, `rl_test_…` for test mode.
        Create keys on the site. Never put a key in browser code.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.