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

# Create File

> Stages a file for use in a later request, e.g. as a document when creating
a quote. Send either a multipart `file` (processed synchronously, returns
status `ready`) or a JSON `url` (downloaded in the background, returns
status `pending`; poll the file or subscribe to the `file.ready` and
`file.failed` webhook events).



## OpenAPI

````yaml /openapi.json post /files
openapi: 3.1.0
info:
  title: Fortis Evaluations API
  version: 1.0.0
servers:
  - url: https://api.fortiseval.com/v1
    description: Live
  - url: https://sandbox-api.fortiseval.com/v1
    description: Sandbox
security:
  - http: []
paths:
  /files:
    post:
      tags:
        - File
      summary: Create File
      description: >-
        Stages a file for use in a later request, e.g. as a document when
        creating

        a quote. Send either a multipart `file` (processed synchronously,
        returns

        status `ready`) or a JSON `url` (downloaded in the background, returns

        status `pending`; poll the file or subscribe to the `file.ready` and

        `file.failed` webhook events).
      operationId: files.store
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CreateFileRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: File uploaded successfully.
                  data:
                    $ref: '#/components/schemas/FileResource'
                required:
                  - message
                  - data
        '202':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: File ingestion started.
                  data:
                    $ref: '#/components/schemas/FileResource'
                required:
                  - message
                  - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    CreateFileRequest:
      type: object
      properties:
        file:
          type: string
          format: binary
          contentMediaType: application/octet-stream
          description: Exactly one of file (multipart upload) or url (async ingestion)
          maxLength: 153600
        url:
          type: string
          format: uri
          maxLength: 2048
        file_name:
          type:
            - string
            - 'null'
          maxLength: 255
      title: CreateFileRequest
    FileResource:
      type: object
      properties:
        id:
          type: string
          description: The file identifier, usable as a document id when creating quotes.
        status:
          $ref: '#/components/schemas/ApiFileStatus'
        source:
          $ref: '#/components/schemas/ApiFileSource'
        file_name:
          type:
            - string
            - 'null'
        mime_type:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        failure_message:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - status
        - source
        - file_name
        - mime_type
        - size
        - failure_message
        - created_at
        - completed_at
      title: FileResource
    ApiFileStatus:
      type: string
      enum:
        - pending
        - processing
        - ready
        - failed
      title: ApiFileStatus
    ApiFileSource:
      type: string
      enum:
        - direct_upload
        - external_url
      title: ApiFileSource
  responses:
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````