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

# Inspect document variables before creating or updating a saved record



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/dev/documents/{documentId}/records/prepare
openapi: 3.0.0
info:
  title: Autype Developer API
  description: >-
    Autype Developer API for programmatic document generation.


    ## Authentication

    Use an API key in `X-API-Key`. Autype's trusted MCP service may instead use
    a short-lived, Developer-API-audience OAuth token obtained through
    server-side token exchange. Raw MCP resource tokens, login JWTs, and
    third-party tokens are not accepted.


    ## Rate Limiting

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


    ## Automation Credits

    Developer API rendering and bulk operations consume automation credits from
    your organization. AI documents, assistant tasks, translations, and AI
    images use separate plan allowances.
  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, ODT, or page images
  - 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/documents/{documentId}/records/prepare:
    post:
      tags:
        - developer-api
      summary: Inspect document variables before creating or updating a saved record
      operationId: DeveloperFilloutsController_prepare[0]_v1
      parameters:
        - name: documentId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PrepareDocumentFilloutDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PrepareDocumentFilloutResponseDto'
      security:
        - mcp-oauth: []
        - api-key: []
components:
  schemas:
    PrepareDocumentFilloutDto:
      type: object
      properties:
        documentVersionId:
          type: string
          description: >-
            Document version to inspect. Defaults to the latest saved version
            when available.
        variableValues:
          type: object
          description: >-
            Candidate values to compare with the document variables. Useful
            before creating or updating a record.
          example:
            customerName: Acme GmbH
            amount: 12500
    PrepareDocumentFilloutResponseDto:
      type: object
      properties:
        documentId:
          type: string
        documentVersionId:
          type: object
        fields:
          type: array
          items:
            $ref: '#/components/schemas/DocumentFilloutVariableFieldDto'
        referencedVariables:
          type: array
          items:
            type: string
        compatibility:
          $ref: '#/components/schemas/DocumentFilloutCompatibilityDto'
      required:
        - documentId
        - fields
        - referencedVariables
        - compatibility
    DocumentFilloutVariableFieldDto:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - text
            - number
            - image
            - list
            - table
            - unknown
        referenced:
          type: boolean
        hasDefaultValue:
          type: boolean
        defaultValue:
          type: object
        currentValue:
          type: object
      required:
        - name
        - type
        - referenced
        - hasDefaultValue
    DocumentFilloutCompatibilityDto:
      type: object
      properties:
        missingValues:
          type: array
          items:
            type: string
        missingRequiredValues:
          description: >-
            Missing values that do not have a usable default in the inspected
            document.
          type: array
          items:
            type: string
        unusedValues:
          type: array
          items:
            type: string
        typeMismatches:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              expectedType:
                type: string
              actualType:
                type: string
        missingDefinitions:
          type: array
          items:
            type: string
        unusedDefinitions:
          type: array
          items:
            type: string
      required:
        - missingValues
        - missingRequiredValues
        - unusedValues
        - typeMismatches
        - missingDefinitions
        - unusedDefinitions
  securitySchemes:
    mcp-oauth:
      scheme: bearer
      bearerFormat: Autype Developer API OAuth token
      type: http
      description: >-
        Short-lived, Developer-API-audience token obtained by the trusted MCP
        service through token exchange (mcp_at_...). Raw MCP resource tokens are
        rejected.
    api-key:
      type: apiKey
      in: header
      name: X-API-Key
      description: API Key (starts with ak_...)

````