---
title: "Get presigned URL for source upload"
method: POST
path: "/api/v1/external/sources/upload"
tags: ["Sources"]
---

# Get presigned URL for source upload

`POST /api/v1/external/sources/upload`

## Request

- Base URL: `https://api.wove.com`
- URL: `https://api.wove.com/api/v1/external/sources/upload`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/wove/apis/wove-external-api/docs/api/v1/external/sources/upload/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new source record and returns a presigned URL for uploading a rate sheet file.

**Workflow**:
1. Call this endpoint with file metadata
2. Upload the file directly to the returned presigned URL using PUT
3. Call POST /sources/{sourceId}/process to start processing

**Supported file types**: Excel (.xlsx, .xls), CSV, PDF

**File size limit**: 50MB

## Request body

- CreateSourceUploadRequest
  - `filename` string, required: The filename of the rate sheet to upload
  - `contentType` string: MIME type of the file
  - `sourceType` 'contract' | 'spot' | 'tariff': Type of rate sheet
  - `carrierId` string: Optional carrier ID to associate with this source
  - `effectiveDate` string, date: Date when rates become effective
  - `expiryDate` string, date: Date when rates expire
  - `description` string: Optional description of the source

## Response `201`

Source created successfully with upload URL

- object
  - `success` boolean
  - `data` CreateSourceUploadResponse
    - `sourceId` string, required: Unique identifier for the created source
    - `uploadUrl` string, required: Presigned URL for uploading the file (expires in 15 minutes)
    - `expiresAt` string, date-time, required: When the upload URL expires

## Other responses

- `400`: Bad request - invalid parameters
- `401`: Authentication required
- `403`: Insufficient permissions - requires sources:write scope

---

[API](https://skmtc.dev/wove/apis/wove-external-api.md) - [All operations](https://skmtc.dev/wove/apis/wove-external-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wove/apis/wove-external-api/revisions/37290e267e07?raw)
