---
title: "Create an upload URL"
method: POST
path: "/parser/upload-url"
tags: ["Parsing API"]
---

# Create an upload URL

`POST /parser/upload-url`

## Request

- Base URL: `https://contracko.com/api/v1`
- URL: `https://contracko.com/api/v1/parser/upload-url`
- Auth: one of:
  - API key in header `x-contracko-api-key`
  - HTTP bearer

Create a signed upload URL for a source file. Upload the file with HTTP PUT, then use the returned `fileKey` when you queue a batch.

## Request body

- object: Request body for creating an upload URL.
  - `fileName` string, required: Original file name including extension
  - `mimeType` string, required: RFC MIME type of the source file
  - `fileSize` integer, required: File size in bytes
  - `pageCountEstimate` integer: Optional page count estimate to improve credit estimation

## Response `200`

Upload URL returned.

- object
  - `fileKey` string, required: File reference to include in POST /parser/jobs
  - `uploadUrl` string, required: Single-use signed URL for file upload
  - `expiresIn` integer, required: Number of seconds until URL expiration
  - `credits` integer, required: Estimated credits for this file

## Other responses

- `400`: Request validation failed (payload, query, or path format is invalid).
- `401`: Authentication failed (missing, invalid, revoked, or expired API key).
- `403`: Access denied because this API key does not include parsing access or the Parsing API is not available for this workspace.
- `413`: Payload is too large for endpoint file-size or batch-size limits.
- `415`: File type is not supported for the selected operation.
- `422`: Request is well-formed but contains values the API cannot process.
- `429`: Retry later because the request rate limit was reached or too many parser batches are already running for this workspace.
- `500`: The server could not complete the request.

---

[API](https://skmtc.dev/contracko/apis/contracko-parsing-api.md) · [All operations](https://skmtc.dev/contracko/apis/contracko-parsing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contracko/apis/contracko-parsing-api/revisions/2f90b1d3cafd?raw)
