---
title: "Upload Custom File"
method: POST
path: "/file-uploads/"
tags: ["Forecasts"]
---

# Upload Custom File

`POST /file-uploads/`

Upload a custom CSV file to use in a forecast run, such as a battery degradation curve, a solar or wind generation profile, or grid charges/curtailment limits.

The file is validated on upload (CSV only, max 20 MB, and the column structure must match the selected `file_type`); invalid files are rejected with a 400 describing the problem.

**How to use the result:** take the `filename` from the response and reference it in your `simulation_config` when calling `POST /runs/`. For example, a `degradation_curve` upload goes in `simulation_config.assets.battery.degradation.profile_filename`.

Send the request as `multipart/form-data`.

## Response `201`

File uploaded and validated.

- CustomFile
  - `file` string, uri — Short-lived presigned URL to download the file.
  - `file_type` 'degradation_curve' | 'grid_charges' | 'grid_curtailment' | 'solar_profile' | 'wind_profile' — The file type.
  - `filename` string — The value to reference from your `simulation_config` when creating a run (e.g. `assets.battery.degradation.profile_filename`).
  - `id` string, uuid — Unique ID of the uploaded file.
  - `uploaded_by` string, email — Email of the user who uploaded the file.

## Other responses

- `400` — Invalid file — wrong extension, too large, unknown file_type, or failed CSV validation.
- `401` — Missing or invalid X-token.

---

[API](https://skmtc.net/modoenergy/apis/modo-energy-api.md) · [All operations](https://skmtc.net/modoenergy/apis/modo-energy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/modoenergy/modo-energy-api/revisions/6c4b83d3fc12/schema)
