Get Upload URL

GET
/api/v1/document/{extractionSchemaId}/get-url

Request a pre-signed URL for secure file upload to cloud storage. This endpoint returns both the upload URL and a file ID that you'll use in subsequent processing requests.

Request Parameters

Path Parameters
required
extractionSchemaIdstring

The unique identifier of the extraction schema you want to use for processing. You can find this ID at the bottom of your model's data page.

Query Parameters
required
filenamestring

The original filename of the document you want to upload. This is used for file type detection and storage organization.

Headers
required
Authorizationstring

Bearer token for authentication. Format: Bearer your-api-token-here

Response

Success Response (200)

Returns a JSON object containing the pre-signed URL and file ID.

success-response.json

Response Fields

url
string

Pre-signed URL for uploading the file to cloud storage. This URL is temporary and expires after a short period.

fileId
string

Unique identifier for the file record. Use this ID in subsequent API calls to process the uploaded file.

Error Response (400)

Returns an error if required parameters are missing or invalid.

error-response.json

Code Examples

get-upload-url.js