---
title: "Upload a file"
method: POST
path: "/v1/sessions/{sessionId}/files"
tags: ["Files"]
---

# Upload a file

`POST /v1/sessions/{sessionId}/files`

Uploads a file to a session via `multipart/form-data` with a `file` field that accepts either binary data or a URL string to download from, and an optional `path` field for the file storage path.

## Path parameters

- `sessionId` string, required

## Response `201`

Default Response

- FileDetails
  - `lastModified` string, date-time, required — Timestamp when the file was created
  - `path` string, required — Path to the file in the storage system
  - `size` number, required — Size of the file in bytes

## Other responses

- `400` — An error response from the API
- `401` — An error response from the API
- `404` — An error response from the API
- `409` — An error response from the API
- `415` — An error response from the API
- `500` — An error response from the API

---

[API](https://skmtc.net/steel-dev/apis/steel-api.md) · [All operations](https://skmtc.net/steel-dev/apis/steel-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/steel-dev/steel-api/revisions/2248d956188a/schema)
