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

# Extend write leases

> Extends the leases of claimed writes. A lease never runs past 12 hours from the claim that holds it.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/writeback/leases
openapi: 3.1.0
info:
  title: Elastly API
  version: '2026-11-01'
servers:
  - url: https://api.elastly.ai
security: []
paths:
  /v1/writeback/leases:
    post:
      summary: Extend write leases
      description: >-
        Extends the leases of claimed writes. A lease never runs past 12 hours
        from the claim that holds it.
      operationId: extendWritebackLeases
      parameters:
        - schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
          required: false
          name: Elastly-Version
          in: header
        - schema:
            type: string
            pattern: ^[\x21-\x7e]{1,255}$
          required: true
          name: Idempotency-Key
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      receipt:
                        type: string
                        format: uuid
                      leaseSeconds:
                        type: integer
                        minimum: 30
                        maximum: 43200
                        default: 300
                    required:
                      - id
                      - receipt
                    additionalProperties: false
                  minItems: 1
                  maxItems: 100
              required:
                - items
              additionalProperties: false
      responses:
        '200':
          description: Extend write leases
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
            Idempotent-Replayed:
              description: >-
                Present and true when the response replays an earlier request
                with the same idempotency key
              schema:
                type: string
                enum:
                  - 'true'
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        state:
                          type: string
                          enum:
                            - extended
                            - lease_lost
                        leaseExpiresAt:
                          type:
                            - string
                            - 'null'
                          format: date-time
                      required:
                        - id
                        - state
                        - leaseExpiresAt
                      additionalProperties: false
                required:
                  - results
                additionalProperties: false
        '400':
          description: >-
            unsupported_api_version, invalid_request, idempotency_key_required,
            invalid_idempotency_key
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '401':
          description: unauthenticated
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: >-
            insufficient_scope, plan_required, workspace_read_only,
            workspace_locked, workspace_purging, writeback_unavailable,
            write_access_revoked
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '409':
          description: connection_unavailable, idempotency_request_in_progress
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '422':
          description: idempotency_key_reused
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '429':
          description: rate_limited
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '503':
          description: service_unavailable, writeback_paused, connection_unavailable
          headers:
            Elastly-Version:
              description: The API version that served the response
              schema:
                type: string
            Retry-After:
              description: Seconds to wait before retrying the request
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      security:
        - apiKey: []
components:
  schemas:
    ApiError:
      type: object
      properties:
        error:
          type: string
          enum:
            - invalid_request
            - unauthenticated
            - access_denied
            - rate_limited
            - plan_required
            - workspace_read_only
            - workspace_locked
            - workspace_purging
            - service_unavailable
            - insufficient_scope
            - not_found
            - idempotency_key_reused
            - idempotency_key_required
            - invalid_idempotency_key
            - idempotency_request_in_progress
            - unsupported_api_version
            - invalid_cursor
            - quote_ref_customer_mismatch
            - channel_publishing
            - connection_unavailable
            - import_not_found
            - import_state_conflict
            - file_too_large
            - unsupported_format
            - writeback_unavailable
            - write_access_revoked
            - writeback_paused
            - too_many_claims
            - quote_not_found
        requestId:
          type: string
      required:
        - error
        - requestId
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````

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