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

# Convert DOCX to PDF

> Convert a DOCX file to PDF or other formats like ODT.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/tools/convert/docx-to-pdf
openapi: 3.0.0
info:
  title: Autype Developer API
  description: >-
    Autype Developer API for programmatic document generation.


    ## Authentication

    All endpoints require an API key. Include it in the `X-API-Key` header or as
    a Bearer token.


    ## Rate Limiting

    API requests are rate-limited to 100 requests per minute per API key.


    ## Token Billing

    Rendering operations consume tokens from your organization's balance.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.autype.com
    description: Production
security: []
tags:
  - name: Temporary Images
    description: Upload and manage temporary images for document rendering
  - name: Render
    description: Render documents to PDF, DOCX, or ODT
  - name: Bulk Render
    description: Bulk document generation with variable substitution
  - name: Documents
    description: Document variable inspection
  - name: Projects
    description: List organization projects
paths:
  /api/v1/dev/tools/convert/docx-to-pdf:
    post:
      tags:
        - developer-api
      summary: Convert DOCX to PDF
      description: Convert a DOCX file to PDF or other formats like ODT.
      operationId: ToolsController_convertDocxToPdf_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConvertDocxToPdfDto'
      responses:
        '201':
          description: Conversion job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsJobResponseDto'
      security:
        - api-key: []
components:
  schemas:
    ConvertDocxToPdfDto:
      type: object
      properties:
        fileId:
          type: string
          description: File ID of the DOCX file to convert
          example: 550e8400-e29b-41d4-a716-446655440000
        outputFormat:
          type: string
          description: >-
            Output format (default: "pdf"). Allows converting between document
            formats.
          enum:
            - pdf
            - docx
            - odt
          example: pdf
        webhook:
          description: Optional webhook configuration
          allOf:
            - $ref: '#/components/schemas/WebhookConfigDto'
      required:
        - fileId
    ToolsJobResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Job ID
          example: 550e8400-e29b-41d4-a716-446655440000
        action:
          type: string
          description: Action that was performed
          example: pdf.merge
        status:
          type: string
          description: Current job status
          enum:
            - PENDING
            - PROCESSING
            - COMPLETED
            - FAILED
          example: PENDING
        inputFileIds:
          description: Input file IDs used for this job
          example:
            - file-id-1
          type: array
          items:
            type: string
        outputFileId:
          type: object
          description: Output file ID (available when COMPLETED)
          nullable: true
          example: null
        error:
          type: object
          description: Error message (available when FAILED)
          nullable: true
          example: null
        result:
          type: object
          description: >-
            Structured job result data (e.g. OCR markdown/JSON, generated
            filename, PDF metadata, form fields). Available when the job
            produces a direct result instead of an output file.
        metadata:
          type: object
          description: >-
            **Deprecated** — use `result` instead. Additional metadata,
            duplicated from result for backward compatibility.
          deprecated: true
        createdAt:
          format: date-time
          type: string
          description: Job creation timestamp
        startedAt:
          type: object
          description: Job start timestamp
          nullable: true
        completedAt:
          type: object
          description: Job completion timestamp
          nullable: true
      required:
        - id
        - action
        - status
        - inputFileIds
        - outputFileId
        - error
        - createdAt
        - startedAt
        - completedAt
    WebhookConfigDto:
      type: object
      properties:
        webhookUrl:
          type: string
          example: https://example.com/webhook
          description: URL to receive a POST notification when the job completes or fails
        webhookAuth:
          description: >-
            Optional authentication for the webhook request (custom header or
            Basic Auth)
          allOf:
            - $ref: '#/components/schemas/WebhookAuthDto'
    WebhookAuthDto:
      type: object
      properties:
        headerName:
          type: string
          example: X-API-Key
          description: Custom header name
        headerValue:
          type: string
          example: my-secret-key
          description: Custom header value
        basicAuthUsername:
          type: string
          example: user
          description: Username for Basic Auth
        basicAuthPassword:
          type: string
          example: pass
          description: Password for Basic Auth
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````