> ## 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.

# Fill PDF form fields

> Fill form fields in a PDF with provided values. Supports text fields, checkboxes, dropdowns, and radio groups. Optionally flatten fields to make them non-editable.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/tools/pdf/fill-form
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/pdf/fill-form:
    post:
      tags:
        - developer-api
      summary: Fill PDF form fields
      description: >-
        Fill form fields in a PDF with provided values. Supports text fields,
        checkboxes, dropdowns, and radio groups. Optionally flatten fields to
        make them non-editable.
      operationId: ToolsController_pdfFillForm_v1
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PdfFillFormDto'
      responses:
        '201':
          description: Fill form job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsJobResponseDto'
      security:
        - api-key: []
components:
  schemas:
    PdfFillFormDto:
      type: object
      properties:
        fileId:
          type: string
          description: File ID of the PDF with form fields
          example: 550e8400-e29b-41d4-a716-446655440000
        fields:
          type: object
          description: >-
            Map of field names to values. Use string for text/dropdown/radio
            fields, boolean for checkboxes.
          example:
            name: John Doe
            agree: true
            country: DE
        flatten:
          type: boolean
          description: >-
            Whether to flatten form fields after filling (makes them
            non-editable). Default: false.
          example: false
        webhook:
          description: Optional webhook configuration
          allOf:
            - $ref: '#/components/schemas/WebhookConfigDto'
      required:
        - fileId
        - fields
    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_...)

````