---
title: "Csv To Epw"
method: POST
path: "/api/tools/csv-to-epw"
tags: ["Tools (analyse and convert EPW files)"]
---

# Csv To Epw

`POST /api/tools/csv-to-epw`

## Request

- Base URL: `https://epw.tools`
- URL: `https://epw.tools/api/tools/csv-to-epw`
- Auth: none declared

## Request body `multipart/form-data`

- BodyCsvToEpwApiToolsCsvToEpwPost
  - `file` string, binary, required
  - `mapping` string, required: JSON: {"timestamp": col, "utc": false, "fields": {field: {"column": col, "unit": unit}}}
  - `lat` number, required
  - `lon` number, required
  - `year` integer, required
  - `location_name` string
  - `sun_fix` string: corrections of the finished file's sun, comma-separated: none (default; the sun check is reported either way) or any of shift, night, bound, resplit
  - `sun_model` string: decomposition model of sun_fix=resplit

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-23** `a9d82bafd6f7`: 2 info
  - added the new optional request property `sun_fix`
  - added the new optional request property `sun_model`
- **2026-11-04** `11692a67963f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/epw/apis/epw-tools-api/changes/api/tools/csv-to-epw/post.md)

---

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