---
title: "Request presigned upload URLs"
method: POST
path: "/v1/files"
tags: ["Files"]
---

# Request presigned upload URLs

`POST /v1/files`

## Request

- Base URL: `https://api.pasito.ai`
- URL: `https://api.pasito.ai/v1/files`
- Auth: HTTP bearer

Returns a presigned S3 `PUT` URL for each requested file, scoped to the given client. Upload each file to its `uploadUrl`, then pass those same URLs (query string optional) to the endpoint that consumes them — `POST /v1/clients/{clientId}/benefit-configurations` or `POST /v1/clients/{clientId}/benefit-elections`. Use the same `clientId` on both calls.

## Request body

- PresignRequest
  - `clientId` string, required: The client these documents belong to — a Pasito com_ id, or your own external client id where the consuming feature accepts one (client benefit elections).
  - `files` FileUploadRequest[], required: One or more files to mint presigned upload URLs for.
    - `fileName` string, required: Name of the file to upload (e.g. medical-sbc.pdf).
    - `mimeType` string: Optional hint; the server validates and normalizes it.

## Response `201`

Default Response

- PresignResponse
  - `files` PresignedFile[], required: One presigned upload per requested file, in request order.
    - `fileName` string, required: The server-sanitized file name actually used in the S3 key — may differ from the name you requested (e.g. spaces or parentheses stripped). This is the only place you learn the sanitized name.
    - `uploadUrl` string, required: Presigned S3 PUT URL. Upload the file bytes here, then pass this uploadUrl back to the endpoint that consumes it — POST /v1/clients/{clientId}/benefit-configurations or POST /v1/clients/{clientId}/benefit-elections (the ?X-Amz-… query string may be included or stripped).

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response
- `429`: Default Response

---

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