---
title: "POST /files"
method: POST
path: "/files"
tags: ["Files"]
---

# POST /files

`POST /files`

## Request

- Base URL: `https://api.cxxx.eagleeyenetworks.com/api/v3.0`
- URL: `https://api.cxxx.eagleeyenetworks.com/api/v3.0/files`
- Auth: HTTP bearer

Add a new file to the archive. If the directory specified does not exist, it will automatically be created. To create a new empty directory, specify the desired name, parent directory and a mimeType of `application/directory`.

## Query parameters

- `name` string: Name of the item.
- `directory` string: Name of the parent directory.
- `mimeType` 'video/mp4' | 'application/directory': The media content type.

## Request body `application/octet-stream`

- string, binary

## Response `201`

Created

- ApiFileGet: A file object.
  - `id` string, uuid: The ID of the item.
  - `directory` string: Name of the parent directory.
  - `mimeType` 'video/mp4' | 'application/directory': The media content type.
  - `name` string: Name of the item.

## Other responses

- `400`: The supplied object is invalid. Error detail will contain the validation error.
- `401`: You are not authenticated. Please authenticate and try again.
- `403`: You have no permission to access the specified resource.
- `404`: Referenced resource could not be found.
- `409`: There was a conflict while trying to perform your request. See error details for more information.
- `500`: Something went wrong in the server. Please try again.

---

[API](https://skmtc.dev/eagleeyenetworks/apis/media.md) - [All operations](https://skmtc.dev/eagleeyenetworks/apis/media/llms.txt) - [OpenAPI document](https://skmtc.dev/eagleeyenetworks/apis/media/revisions/99edf96b6511?raw)
