---
title: "POST /files"
method: POST
path: "/files"
---

# POST /files

`POST /files`

Upload a file to a session. This is only supported for code-interpreter session pools.

## Query parameters

- `api-version` string, required
- `identifier` string, required
- `path` string

## Response `200`

The request has succeeded.

- SessionResourceFile — Code execution file resource.
  - `name` string, required — The name of the file.
  - `type` string, required — The type of the session resource file.
  - `contentType` string — The type of the content of this file.
  - `sizeInBytes` integer — The size of the file.
  - `lastModifiedAt` string, date-time, required — The date time in RFC3339 format when the file was last modified.
  - `directory` string — The directory path of the session resource file.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.dev/azure/apis/app-dynamicsessions.md) · [All operations](https://skmtc.dev/azure/apis/app-dynamicsessions/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/app-dynamicsessions/revisions/acc255eeaad5/schema)
