---
title: "Generate document upload URL"
method: POST
path: "/v1/contracts/{contractId}/generate-document-upload-url"
tags: ["v1 - Contracts"]
---

# Generate document upload URL

`POST /v1/contracts/{contractId}/generate-document-upload-url`

## Request

- Base URL: `https://light.inc` (the document declares no server; this is the origin it was published from)
- URL: `https://light.inc/v1/contracts/{contractId}/generate-document-upload-url`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Generates a pre-signed URL to upload the main contract document (PDF). After uploading to this URL, the document will appear in the contract's document preview.

## Path parameters

- `contractId` string, uuid, required

## Request body

- ExternalContractDocumentUploadRequestV1Model
  - `filename` string: Name of the file to upload

## Response `default`

default response

- ExternalContractDocumentUploadUrlResponseV1Model
  - `uploadUrl` string: Pre-signed URL to upload the document to
  - `key` string: Key to identify the uploaded document
  - `metadata` object, nullable: Metadata to include with the upload request

---

[API](https://skmtc.dev/light/apis/light-api.md) - [All operations](https://skmtc.dev/light/apis/light-api/llms.txt) - [OpenAPI document](https://skmtc.dev/light/apis/light-api/revisions/84f51306f648?raw)
