---
title: "Create a new file"
method: POST
path: "/dam/folders/{folder_id}/files"
tags: ["DAM: Folders: Files"]
---

# Create a new file

`POST /dam/folders/{folder_id}/files`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/folders/{folder_id}/files`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/folders/:folder_id/files/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `folder_id` string, required

## Request body `multipart/form-data`

- object
  - `data[type]` string: Resource Type
  - `data[attributes][file_content]` string, binary: The actual file to be uploaded
  - `data[attributes][name]` string: The name of the file
  - `data[attributes][file_date]` string, date: The date of the file
  - `data[attributes][replace]` boolean: Replace existing file with same name

## Response `201`

created

## Other responses

- `401`: Unauthorized

---

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