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

# Fill a form with sourced answers

> Fills a form that has no document type (a PDF with fillable boxes, a PDF whose questions are printed flat into the page, or a Word application) with answers, each with its source and where it came from, and the boxes the subject's Records facts answer, and stores the filled copy as a draft Document of the subject in app_id's Documents, in the form's own format. An answer with no source is refused, a signature box is never filled, and a box no answer names stays blank and comes back in blank and questions.needed. The same answers sent again land on the same Document. An ACORD form carries the pilot license mark unless the org holds the ACORD license. A form that cannot be filled answers status blocked or a 422 and stores nothing. Nothing is sent or signed.



## OpenAPI

````yaml /openapi.generated.json post /documents/forms/fill
openapi: 3.1.0
info:
  description: >-
    Public API reference. Generated from apps/engine/openapi.yaml by make
    docs-openapi-write. Do not edit.
  title: Nexio platform API
  version: '1'
servers:
  - url: https://api.usenexio.com
security: []
tags:
  - name: Access
  - name: Catalog
  - name: Conversations
  - name: Documents
  - name: Engines
  - name: Events
  - name: Feedback
  - name: Graph
  - name: Records
  - name: Roadmap
  - name: Runs
  - name: Webhooks
  - name: accounts
  - name: actions
  - name: activities
  - name: activity-feed
  - name: attachments
  - name: audit
  - name: benefit-plans
  - name: billing-transactions
  - name: carrier_documents
  - name: certificate-holders
  - name: certificate_drafts
  - name: certificates
  - name: change_feed
  - name: claims
  - name: classes
  - name: codes
  - name: commission_facts
  - name: connections
  - name: contacts
  - name: contingencies
  - name: conversations
  - name: customer
  - name: customer_contacts
  - name: deals
  - name: dependents
  - name: document_extractions
  - name: documents
  - name: drivers
  - name: eforms
  - name: employees
  - name: events
  - name: feature_requests
  - name: form-templates
  - name: invoices
  - name: leads
  - name: line_schedules_other
  - name: loss_history
  - name: machines
  - name: markets
  - name: motor-carriers
  - name: notes
  - name: opportunities
  - name: opportunity-signals
  - name: pages
  - name: personal_lines_detail
  - name: placement_choices
  - name: placement_feedback
  - name: placements
  - name: policies
  - name: policy_parties
  - name: policy_personnel
  - name: policy_transactions
  - name: premium_rows
  - name: procedures
  - name: proposals
  - name: quote_comparisons
  - name: quotes
  - name: records
  - name: register-views
  - name: renewal-entries
  - name: risk_review_choices
  - name: rollups
  - name: seats
  - name: sec-filings
  - name: service_agreements
  - name: submissions
  - name: suspenses
  - name: tasks
  - name: umbrella_underlying
  - name: underwriting_questions
  - name: uploaded_documents
  - name: vehicles
  - name: workflows
paths:
  /documents/forms/fill:
    post:
      tags:
        - Documents
      summary: Fill a form with sourced answers
      description: >-
        Fills a form that has no document type (a PDF with fillable boxes, a PDF
        whose questions are printed flat into the page, or a Word application)
        with answers, each with its source and where it came from, and the boxes
        the subject's Records facts answer, and stores the filled copy as a
        draft Document of the subject in app_id's Documents, in the form's own
        format. An answer with no source is refused, a signature box is never
        filled, and a box no answer names stays blank and comes back in blank
        and questions.needed. The same answers sent again land on the same
        Document. An ACORD form carries the pilot license mark unless the org
        holds the ACORD license. A form that cannot be filled answers status
        blocked or a 422 and stores nothing. Nothing is sent or signed.
      operationId: fillDocumentForm
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentFormFillRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentsFormFillJSON'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Not Found
        '412':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Precondition Failed
        '413':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Request Entity Too Large
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Internal Server Error
        '503':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: Service Unavailable
      security:
        - bearer: []
components:
  schemas:
    DocumentFormFillRequest:
      additionalProperties: false
      properties:
        answers:
          description: >-
            Every answer, each with its source. A box no answer names stays
            blank.
          items:
            $ref: '#/components/schemas/DocumentFormAnswer'
          type:
            - array
            - 'null'
        app_id:
          description: The app whose Documents hold the form and receive the filled copy.
          type: string
        name:
          description: >-
            The filled copy's file name. Default: the form's name with ' -
            filled.pdf'.
          type: string
        ref:
          $ref: '#/components/schemas/DocumentFormRef'
          description: The form to fill.
        refill:
          description: >-
            An earlier filled copy of this same form, by the document id its
            fill answered. Its written answers are kept, each answer sent
            replaces that box's, and an answer of empty text takes that box's
            earlier answer off. When the same person filed it in the same turn,
            the new copy replaces it on the subject's Documents; otherwise both
            are kept.
          type: string
        subject:
          description: >-
            The Records record reference the filled copy is about, or
            seat:&lt;your user id&gt; for a copy about no account on file (a
            prospect): no Records fact is read, and only that seat reads,
            refills or downloads the copy.
          type: string
        turn:
          description: >-
            The Assistant turn filing the copy. A new copy records it, so the
            turn's outcome counts the copy it made.
          type: string
      required:
        - app_id
        - ref
        - subject
        - answers
      type: object
    DocumentsFormFillJSON:
      additionalProperties: false
      properties:
        data:
          $ref: '#/components/schemas/DocumentFormFill'
      required:
        - data
      type: object
    Problem:
      additionalProperties: false
      properties:
        code:
          description: >-
            The stable machine-readable error code, UPPER_SNAKE_CASE, one
            meaning forever.
          enum:
            - INVALID_ARGUMENT
            - UNAUTHENTICATED
            - CAPABILITY_DENIED
            - NOT_VISIBLE_OR_ABSENT
            - IDEMPOTENT_REQUEST_IN_FLIGHT
            - ETAG_MISMATCH
            - VALIDATION_FAILED
            - IDEMPOTENCY_KEY_PAYLOAD_MISMATCH
            - SOURCE_UNAVAILABLE
            - RATE_LIMITED
            - INTERNAL
            - DEADLINE_EXCEEDED
            - UNAVAILABLE
            - CLIENT_CLOSED_REQUEST
          type: string
        detail:
          description: A human-readable sentence about this occurrence.
          type: string
        details:
          description: >-
            Structured detail for the reason (for example which owner selection
            rule failed). A Records refusal names its reason code in
            details.reason; a projection refusal (SOURCE_UNAVAILABLE) also names
            its closed subtype in details.subtype (admission_pending, no_build,
            binding_changed, agency_admission_unbounded,
            authority_coordinates_changed, guard_absent, derivation_unaccepted),
            and only admission_pending, which clears by itself, also carries
            details.retry_after_ms, equal to retry_after_ms and the Retry-After
            header.
        errors:
          description: Each invalid parameter, for INVALID_ARGUMENT.
          items:
            $ref: '#/components/schemas/ProblemError'
          type:
            - array
            - 'null'
        instance:
          description: The request path this occurrence answered.
          type: string
        reason:
          description: >-
            The finer cause within the code, UPPER_SNAKE_CASE (for example
            SCOPE_UNAVAILABLE under CAPABILITY_DENIED).
          type: string
        request_id:
          description: The request id, as echoed in the Nexio-Request-Id response header.
          type: string
        retry_after_ms:
          description: When a retry may succeed, the wait before it.
          format: int64
          type: integer
        status:
          description: The HTTP status code.
          format: int64
          type: integer
        title:
          description: The HTTP status phrase.
          type: string
        type:
          description: A URI naming the problem type, derived from the code.
          type: string
      required:
        - type
        - title
        - status
        - code
        - request_id
      type: object
    DocumentFormAnswer:
      additionalProperties: false
      properties:
        field:
          description: The box name exactly as inspect listed it.
          type: string
        from:
          description: >-
            The record the value was read from, or the producer's words.
            Required: a value with no origin is a guess.
          type: string
        source:
          description: account, prior_year or producer.
          type: string
        value:
          description: 'What the box prints: a string, or a boolean for a checkbox.'
      required:
        - field
        - value
        - source
        - from
      type: object
    DocumentFormRef:
      additionalProperties: false
      properties:
        attachment:
          description: >-
            A conversation attachment holding the form: its id, its doc:
            address, or its file name as the conversation lists it. Read as the
            caller, inside conversation only; a scoped key also needs
            conversations:use.
          type: string
        conversation:
          description: >-
            The conversation the attachment was sent in. Required with
            attachment.
          type: string
        document:
          description: A ready Document of the org, under app_id, holding the form.
          type: string
        record:
          description: >-
            A filed Records document holding the form, by its Records id, read
            through the Records documents content route as the caller.
          type: string
        template:
          description: >-
            An active shared carrier template id, admitted under the carrier
            library grant.
          type: string
      type: object
    DocumentFormFill:
      additionalProperties: false
      properties:
        blank:
          items:
            $ref: '#/components/schemas/DocumentFormBlankBox'
          type:
            - array
            - 'null'
        cleared:
          description: >-
            The boxes an answer of empty text named that this copy leaves blank;
            on a refill, each one's earlier answer is taken off. A box an empty
            answer named that is not blank (the subject's Records fill it, the
            applicant answered it) is a problem instead.
          items:
            type: string
          type:
            - array
            - 'null'
        confirm:
          description: Boxes answered from last year's copy, for the producer to confirm.
          items:
            $ref: '#/components/schemas/DocumentFormBlankBox'
          type:
            - array
            - 'null'
        document:
          $ref: '#/components/schemas/DocumentGenerated'
        facts_unread:
          description: >-
            Why the subject's Records facts were not read, so only the answers
            sent filled the copy.
          type: string
        filled:
          items:
            $ref: '#/components/schemas/DocumentFormFilledBox'
          type:
            - array
            - 'null'
        kept:
          description: >-
            Boxes the applicant answered on the signed copy attached in the
            conversation, kept as written.
          items:
            $ref: '#/components/schemas/DocumentFormBlankBox'
          type:
            - array
            - 'null'
        known:
          description: >-
            The boxes filled from the subject's Records facts; a box the request
            answers takes the request's answer.
          items:
            type: string
          type:
            - array
            - 'null'
        problems:
          items:
            $ref: '#/components/schemas/DocumentFormProblem'
          type:
            - array
            - 'null'
        questions:
          $ref: '#/components/schemas/DocumentFormQuestions'
        replaced:
          description: >-
            The earlier copy (refill) this copy replaced on the subject's
            Documents.
          type: string
        signatures_cleared:
          description: >-
            Signature, initials and date-signed boxes the form carried, cleared
            on the copy: the applicant signs the filled copy again.
          format: int64
          type: integer
        status:
          description: filled or blocked.
          type: string
        stored:
          description: >-
            False when this exact fill was already stored and its Document is
            answered.
          type: boolean
        unanswered:
          description: >-
            Boxes whose answer only said the files do not hold the fact ("not
            supplied", "unknown"): not written, so the box stays blank. Ask for
            each one; never write such a sentence into a form.
          items:
            $ref: '#/components/schemas/DocumentFormBlankBox'
          type:
            - array
            - 'null'
      required:
        - status
        - stored
      type: object
    ProblemError:
      additionalProperties: false
      properties:
        location:
          description: Where the input was, for example query.limit.
          type: string
        message:
          type: string
        value: {}
      required:
        - message
      type: object
    DocumentFormBlankBox:
      additionalProperties: false
      properties:
        field:
          type: string
        label:
          type: string
        page:
          format: int64
          type: integer
      required:
        - field
        - label
        - page
      type: object
    DocumentGenerated:
      additionalProperties: false
      properties:
        content_type:
          type: string
        id:
          type: string
        name:
          type: string
        page_count:
          format: int64
          type: integer
        size_bytes:
          format: int64
          type: integer
      required:
        - id
        - name
      type: object
    DocumentFormFilledBox:
      additionalProperties: false
      properties:
        field:
          type: string
        from:
          type: string
        label:
          type: string
        page:
          format: int64
          type: integer
        source:
          type: string
        value: {}
      required:
        - field
        - label
        - page
        - value
        - source
        - from
      type: object
    DocumentFormProblem:
      additionalProperties: false
      properties:
        field:
          type: string
        message:
          type: string
      required:
        - message
      type: object
    DocumentFormQuestions:
      additionalProperties: false
      properties:
        answered:
          format: int64
          type: integer
        followups:
          format: int64
          type: integer
        needed:
          items:
            $ref: '#/components/schemas/DocumentFormQuestion'
          type:
            - array
            - 'null'
        total:
          format: int64
          type: integer
      required:
        - total
        - answered
        - needed
        - followups
      type: object
    DocumentFormQuestion:
      additionalProperties: false
      properties:
        label:
          type: string
        page:
          format: int64
          type: integer
      required:
        - page
        - label
      type: object
  securitySchemes:
    bearer:
      description: The org's platform API key.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.