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

# Upload Document From Url

> Upload a PDF form via document URL to enable AI-powered autofill.



## OpenAPI

````yaml post /v1/documents/upload-document-url
openapi: 3.1.0
info:
  title: AI Form-Filler API
  version: 0.1.0
servers:
  - url: https://api.simplicity.ai
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /v1/documents/upload-document-url:
    post:
      tags:
        - Documents
      summary: Upload Document From Url
      description: Upload a PDF form via document URL to enable AI-powered autofill.
      operationId: upload_document_from_url_v1_documents_upload_document_url_post
      parameters:
        - name: document_type
          in: query
          required: false
          description: >-
            Set to **FORM_DOCUMENT** for the PDF form to fill, or
            **SOURCE_DOCUMENT** for knowledge or reference files—including
            images.
          schema:
            anyOf:
              - $ref: '#/components/schemas/DocumentSource'
              - type: 'null'
            default: SOURCE_DOCUMENT
            title: Document Type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UploadDocumentUrlRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreateResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    DocumentSource:
      type: string
      enum:
        - FORM_DOCUMENT
        - SOURCE_DOCUMENT
      title: DocumentSource
      description: >-
        Classifies an uploaded document for the form-filling workflow.


        - **FORM_DOCUMENT** — The PDF form to be filled. Use this for the actual
        application, intake, or questionnaire file the AI should complete. Only
        PDF is supported for form documents.


        - **SOURCE_DOCUMENT** — Supporting material used as context when filling
        a form: PDFs, **images** (for example photos of IDs or receipts), and
        other reference files (policies, prior submissions, spreadsheets,
        notes). This is the default when the parameter is omitted. Upload
        multiple source documents and reference them when creating or
        autofilling a form alongside a **FORM_DOCUMENT**.
    UploadDocumentUrlRequest:
      properties:
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
      type: object
      required:
        - url
      title: UploadDocumentUrlRequest
    TaskCreateResponse:
      properties:
        task_id:
          type: string
          title: Task Id
        status:
          $ref: '#/components/schemas/TaskStatus'
          default: processing
      type: object
      required:
        - task_id
        - status
      title: TaskCreateResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
      title: TaskStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````