---
title: "Create a New FIle"
method: POST
path: "/api/assets/createNewFile"
tags: ["Assets"]
---

# Create a New FIle

`POST /api/assets/createNewFile`

## Request body

- CreateNewFileDto
  - `source` string, required — The source path where the directory will be created
  - `name` string, required — Name for the new file

## Response `200`

Successfully created the File.

## Other responses

- `400` — Failed to create the File or file already exists.

---

[API](https://skmtc.net/openwebgal/apis/webgal-terre-api.md) · [All operations](https://skmtc.net/openwebgal/apis/webgal-terre-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openwebgal/webgal-terre-api/versions/ebcacb42f932/schema)
