---
title: "Get presigned URL for S3 file upload"
method: POST
path: "/api/transactions/v2/upload-url"
tags: ["Transactions Module V2"]
---

# Get presigned URL for S3 file upload

`POST /api/transactions/v2/upload-url`

Returns a presigned URL that allows direct file upload to S3 bucket. Use this URL to upload files directly to S3.

## Request body

- GetPresignedUrlDto
  - `id_file_template` string, required — Id of the file template
  - `external_code` string — External code of the file
  - `mode` 'INSERT' | 'UPSERT' | 'MERGE' | 'VOID', required — Insert transactions mode
  - `id_lote` string — Lote id required for merge mode
  - `batch_code` string — User-defined code for grouping related batches (not unique)

## Response `200`

Presigned URL generated successfully

- GetPresignedUrlResponseDto
  - `uploadUrl` string, required — Pre-signed URL for uploading the file directly to S3
  - `fileKey` string, required — S3 file key where the file will be stored
  - `expiresAt` string, required — URL expiration timestamp
  - `bucketName` string, required — S3 bucket name

## Other responses

- `201`
- `401` — Invalid JWT token - Authentication required
- `500` — Internal server error

---

[API](https://skmtc.dev/complif/apis/complif-apis.md) · [All operations](https://skmtc.dev/complif/apis/complif-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/complif/complif-apis/revisions/2bbf0308cd2e/schema)
