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

# Retry Failed Documents

> Retry failed documents in a batch with intelligent filtering by error type and tier.



## OpenAPI

````yaml post /v1/buckets/{bucket_identifier}/batches/{batch_id}/retry
openapi: 3.1.0
info:
  title: Mixpeek API
  description: >-
    This is the Mixpeek API, providing access to various endpoints for data
    processing and retrieval.
  termsOfService: https://mixpeek.com/terms
  contact:
    name: Mixpeek Support
    url: https://mixpeek.com/contact
    email: info@mixpeek.com
  version: '0.82'
servers:
  - url: https://api.mixpeek.com
    description: Production
security: []
paths:
  /v1/buckets/{bucket_identifier}/batches/{batch_id}/retry:
    post:
      tags:
        - Bucket Batches
      summary: Retry Failed Documents
      description: >-
        Retry failed documents in a batch with intelligent filtering by error
        type and tier.
      operationId: retry_batch_v1_buckets__bucket_identifier__batches__batch_id__retry_post
      parameters:
        - name: bucket_identifier
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier of the bucket.
            title: Bucket Identifier
          description: The unique identifier of the bucket.
        - name: batch_id
          in: path
          required: true
          schema:
            type: string
            description: The unique identifier of the batch.
            title: Batch Id
          description: The unique identifier of the batch.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetryBatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: >-
                  Response Retry Batch V1 Buckets  Bucket Identifier  Batches 
                  Batch Id  Retry Post
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    RetryBatchRequest:
      properties:
        retry_mode:
          type: string
          enum:
            - transient_only
            - all
          title: Retry Mode
          description: >-
            Determines which types of failed documents to retry.
            'transient_only': Only retry documents that failed with transient
            errors (network issues, timeouts, rate limits). This is the
            recommended default as it avoids retrying documents with permanent
            failures (invalid data, missing fields, incompatible formats).
            'all': Retry all failed documents regardless of error type. Use this
            for force retries after fixing data issues or updating extraction
            logic.
          default: transient_only
          examples:
            - transient_only
            - all
        tier_nums:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Tier Nums
          description: >-
            List of specific tier numbers to retry failures from. OPTIONAL - If
            not provided or empty list, retries failures from all tiers. Use
            this to selectively retry a specific processing stage. Example: [2]
            would only retry failures from tier 2 (the third processing stage).
            Tier numbering starts at 0 (bucket → collection), tier 1+ are
            collection → collection.
          examples:
            - - 2
            - - 1
              - 2
            - null
        max_retry_count:
          type: integer
          maximum: 10
          minimum: 1
          title: Max Retry Count
          description: >-
            Maximum number of times a document can be retried. Documents that
            have been retried this many times already are excluded. Prevents
            infinite retry loops for documents with persistent issues. Default
            is 3 retries per document. Set to higher value for more aggressive
            retries.
          default: 3
          examples:
            - 3
            - 5
            - 1
      type: object
      title: RetryBatchRequest
      description: >-
        Request to retry failed documents in a batch.


        Allows selective retry of failed documents with intelligent filtering by
        error type

        and tier. Retries use exponential backoff and respect max retry limits.


        Use Cases:
            - Retry only transient errors after resolving temporary infrastructure issues
            - Retry specific processing tiers that failed
            - Retry all failed documents regardless of error type (force retry)

        Requirements:
            - retry_mode: REQUIRED. Determines which documents to retry
            - tier_nums: OPTIONAL. Only retry failures from specific tiers (empty = all tiers)
            - max_retry_count: OPTIONAL. Skip documents that have been retried this many times

        Behavior:
            - 'transient_only': Retries only transient errors (network, timeout, rate limit)
            - 'all': Retries both transient and permanent errors
            - Documents beyond max_retry_count are excluded from retry
            - Each retry increments the document's retry_count
      examples:
        - description: Retry only transient errors (default, recommended)
          retry_mode: transient_only
        - description: Retry only tier 2 transient failures
          retry_mode: transient_only
          tier_nums:
            - 2
        - description: Force retry all failures (after fixing data issues)
          retry_mode: all
        - description: Aggressive retry with higher max attempts
          max_retry_count: 5
          retry_mode: transient_only
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Always false for error responses
          default: false
        status:
          type: integer
          title: Status
          description: HTTP status code for this error
        error:
          $ref: '#/components/schemas/ErrorDetail'
          description: Error details payload
      type: object
      required:
        - status
        - error
      title: ErrorResponse
      description: Error response model.
      examples:
        - error:
            details:
              id: ns_123
              resource: namespace
            message: Namespace not found
            type: NotFoundError
          status: 404
          success: false
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ErrorDetail:
      properties:
        message:
          type: string
          title: Message
          description: Human-readable error message
        type:
          type: string
          title: Type
          description: Stable error type identifier (machine-readable)
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
          description: >-
            Fine-grained error code for programmatic handling (e.g.,
            namespace_name_taken, feature_extractor_not_found). Present only
            when consumers may need to branch on a specific error condition.
        details:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Details
          description: >-
            Optional structured details to help debugging (validation errors,
            IDs, etc.)
      type: object
      required:
        - message
        - type
      title: ErrorDetail
      description: Error detail model.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````