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

# Retry failed files

> Retry processing of files that previously failed to process. This will re-attempt the processing of the specified files.



## OpenAPI

````yaml post /v1/files/retry
openapi: 3.0.3
info:
  title: API
  version: '1.0'
servers:
  - url: https://api.writer.com
security:
  - bearerAuth: []
paths:
  /v1/files/retry:
    post:
      tags:
        - File API
      summary: Retry failed files
      description: >-
        Retry processing of files that previously failed to process. This will
        re-attempt the processing of the specified files.
      operationId: gatewayRetryFailedFiles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/retry_files_request'
        required: true
      responses:
        '200':
          description: The retry request is being processed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/retry_files_response'
              example:
                success: true
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: cURL
          source: >-
            curl --location --request POST https://api.writer.com/v1/files/retry
            \
             --header "Authorization: Bearer <token>" \
             --header "Content-Type: application/json" \
             --data-raw '{"file_ids":["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"]}'
        - lang: JavaScript
          source: |-
            import Writer from 'writer-sdk';

            const client = new Writer({
              apiKey: process.env['WRITER_API_KEY'], // This is the default and can be omitted
            });

            async function main() {
              const response = await client.files.retry({
                file_ids: [
                  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                ],
              });

              console.log(response.success);
            }

            main();
        - lang: Python
          source: |-
            import os
            from writerai import Writer

            client = Writer(
                # This is the default and can be omitted
                api_key=os.environ.get("WRITER_API_KEY"),
            )
            response = client.files.retry(
                file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],
            )
            print(response.success)
components:
  schemas:
    retry_files_request:
      title: retry_files_request
      required:
        - file_ids
      type: object
      properties:
        file_ids:
          type: array
          items:
            type: string
            format: uuid
          description: The unique identifier of the files to retry.
    retry_files_response:
      title: retry_files_response
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the retry operation was successful.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where
        `<token>` is your [Writer API
        key](https://dev.writer.com/api-reference/api-keys).

````