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

# Generate document upload URL

> Generates a secure upload URL for invoice payable documents



## OpenAPI

````yaml /openapi-public.json post /v1/invoice-payables/{invoicePayableId}/document/upload-url
openapi: 3.0.1
info:
  title: Light API
  version: 1.0.0
servers: []
security:
  - apiKeyAuth: []
  - bearerAuth: []
paths:
  /v1/invoice-payables/{invoicePayableId}/document/upload-url:
    post:
      tags:
        - v1 - Invoice Payables
      summary: Generate document upload URL
      description: Generates a secure upload URL for invoice payable documents
      operationId: createInvoicePayableDocumentUploadUrl
      parameters:
        - name: invoicePayableId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: >-
                #/components/schemas/ExternalUploadInvoicePayableDocumentRequestV1Model
      responses:
        default:
          description: default response
          content:
            application/json;charset=UTF-8:
              schema:
                $ref: >-
                  #/components/schemas/ExternalInvoicePayableUploadUrlResponseV1Model
components:
  schemas:
    ExternalUploadInvoicePayableDocumentRequestV1Model:
      type: object
      properties:
        documentName:
          type: string
          description: Original file name of the document.
        contentType:
          type: string
          description: MIME type of the uploaded document (e.g. application/pdf).
    ExternalInvoicePayableUploadUrlResponseV1Model:
      type: object
      properties:
        uploadUrl:
          type: string
          description: >-
            Pre-signed URL to which the invoice payable document can be
            uploaded.
          format: url
        headers:
          type: object
          additionalProperties:
            type: string
            description: >-
              HTTP headers required when uploading the document to the
              pre-signed URL.
          description: >-
            HTTP headers required when uploading the document to the pre-signed
            URL.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      description: >-
        Basic authentication header of the form **Basic** **<api_key>**, where
        **<api_key>** is your api key.
      name: Authorization
      in: header
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````