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

# Upload file for document

> Upload a file for a document.



## OpenAPI

````yaml /reference/build-integrations.json post /v1/documents/{documentId}/uploads
openapi: 3.0.1
info:
  title: Build integrations
  description: >-
    The API that enables syncing and viewing resources


    **Note for Vanta Gov (FedRAMP) customers:** Select `Vanta Gov (FedRAMP)`
    from the server dropdown to issue requests against
    `https://api.vanta-gov.com`. The OAuth token and authorization URLs shown
    below default to the commercial hosts — Gov customers should replace
    `api.vanta.com` with `api.vanta-gov.com` and `app.vanta.com` with
    `app.vanta-gov.com`.
  termsOfService: https://www.vanta.com/terms
  contact:
    name: API Support
    url: https://help.vanta.com/
    email: support@vanta.com
  license:
    name: Vanta Terms of Service
    url: https://www.vanta.com/terms
  version: 0.0.1
servers:
  - url: https://api.vanta.com
    description: Vanta (Commercial)
  - url: https://api.vanta-gov.com
    description: Vanta Gov (FedRAMP)
security:
  - oauth:
      - connectors.self:read-resource
      - connectors.self:write-resource
tags:
  - name: API Endpoint Vulnerabilities
  - name: Background Checks
  - name: Custom Resources
  - name: Documents
  - name: MacOS User Computers
  - name: Package Vulnerabilities
  - name: Secrets
  - name: Security Tasks
  - name: Static Code Analysis Vulnerabilities
  - name: User Accounts
  - name: User Security Training Statuses
  - name: Vulnerable Components
  - name: Windows User Computers
paths:
  /v1/documents/{documentId}/uploads:
    post:
      tags:
        - Documents
      summary: Upload file for document
      description: Upload a file for a document.
      operationId: UploadFileForDocument
      parameters:
        - in: path
          name: documentId
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                effectiveAtDate:
                  type: string
                  description: Date indicating when the document is effective from.
                description:
                  type: string
                  description: Description of the uploaded document.
              required:
                - file
      responses:
        '201':
          description: File uploaded for document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadedFileT'
              examples:
                Example 1:
                  value:
                    id: '1'
                    fileName: Document Name
                    title: Document title
                    description: Document Description
                    url: https://example.com
                    creationDate: '2024-03-17T00:00:00.000Z'
                    updatedDate: '2024-03-18T00:00:00.000Z'
                    effectiveDate: '2024-03-17T00:00:00.000Z'
                    deletionDate: null
                    mimeType: application/pdf
                    uploadedBy:
                      id: 66993da0cf4ba2ad40599ba7
                      type: USER
      security:
        - bearerAuth: []
components:
  schemas:
    UploadedFileT:
      properties:
        id:
          type: string
          description: Unique identifier for the document.
        fileName:
          type: string
          nullable: true
          description: The file name of the document.
        title:
          type: string
          description: The document's title.
        description:
          type: string
          nullable: true
          description: The document's description
        mimeType:
          type: string
          description: Mime type of the document.
        uploadedBy:
          properties:
            type:
              $ref: '#/components/schemas/UploadedDocumentUploadedByType'
            id:
              type: string
          required:
            - type
            - id
          type: object
          nullable: true
          description: The actor who uploaded this document. It could be a user or an app.
        creationDate:
          type: string
          format: date-time
          description: Date of when the document was uploaded.
        updatedDate:
          type: string
          format: date-time
          description: Date when the document was last updated.
        deletionDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Date of when the document was deleted. Is set to null if the
            document has not been deleted.
        effectiveDate:
          type: string
          format: date-time
          nullable: true
          description: The document's effective date.
        url:
          type: string
          description: The document's URL.
      required:
        - id
        - fileName
        - title
        - description
        - mimeType
        - uploadedBy
        - creationDate
        - updatedDate
        - deletionDate
        - effectiveDate
        - url
      type: object
      additionalProperties: false
    UploadedDocumentUploadedByType:
      enum:
        - USER
        - APPLICATION
      type: string
  securitySchemes:
    oauth:
      type: oauth2
      x-default: vat_llamainapajama
      flows:
        authorizationCode:
          authorizationUrl: https://app.vanta.com/oauth/authorize
          tokenUrl: https://api.vanta.com/oauth/token
          scopes:
            connectors.self:write-resource: Send data to your account.
            connectors.self:read-resource: Read data from your account.
    bearerAuth:
      type: http
      scheme: bearer

````