> For the complete documentation index, see [llms.txt](https://docs.eseye.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eseye.com/api-reference/bulk-operations-api/files/create-file.md).

# Create File

Create a new file record with the details you specify. The response contains the status of the file upload request and the `fileId`.

Give the file a unique title, name, and path. Generate a timestamp and reuse it across all three so that each run is unique.

```json
{"openapi":"3.1.0","info":{"title":"Bulk Operations API","version":"2.0.0"},"tags":[{"name":"Files"}],"servers":[{"url":"https://{fileUrl}","variables":{"fileUrl":{"default":"files.api.example.com","description":"Base URL of the File service (provided by Eseye)."}}}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Send `Bearer {token}`, where `{token}` is the `access_token` returned by Request a token."}}},"paths":{"/api/v2/file":{"post":{"summary":"Create File","operationId":"create-file","tags":["Files"],"description":"Create a new file record with the details you specify. The response contains the status of the file\nupload request and the `fileId`.\n\nGive the file a unique title, name, and path. Generate a timestamp and reuse it across all three so\nthat each run is unique.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["title","name","fileConfigurationData","fileTypeId","fileDate","portfolioId","permissionId"],"properties":{"title":{"type":"string","minLength":1,"maxLength":32,"description":"A unique title for the file. Enter 1 to 32 characters with no blank spaces."},"name":{"type":"string","minLength":1,"maxLength":128,"description":"A single-line filename of 1 to 128 characters. Newline characters are not permitted. The name can include a shortened version of the title."},"fileConfigurationData":{"type":"object","description":"Configuration data for the file, including the file store and the file path.","required":["fileStore","filePath"],"properties":{"fileStore":{"type":"string","description":"The S3 bucket location the file uploads to. This varies between environments. Enter `anynetiot-sftp-service-storage-prod` for production and `anynetiot-sftp-service-storage-stage` for stage."},"filePath":{"type":"string","description":"The folder path in S3 the file uploads to. Replace `{portfolioId}` with your own portfolio ID."}}},"fileTypeId":{"type":"string","description":"The ID of the file type. Set this to `1` for CSV files."},"fileDate":{"type":"string","description":"The date and time you created the file."},"portfolioId":{"type":"string","description":"The ID of the portfolio the file is created in."},"permissionId":{"type":"number","description":"An extra layer of protection for the file. A user needs this permission to access the file. Set this to either `4345` or `4596`.","enum":[4345,4596]}}}}}},"responses":{"200":{"description":"Returns the status of the file upload request and the `fileId`."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eseye.com/api-reference/bulk-operations-api/files/create-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
