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

# POST /files

`POST /files`

ファイルをアップロードします

## Response `201`

正常にファイルがアップロードされました。

- FileInfo
  - `fileId` string, uuid — ファイルUUID
  - `name` string — ファイル名
  - `mime` string — MIMEタイプ
  - `size` integer — ファイルサイズ
  - `md5` string — MD5ハッシュ
  - `hasThumb` boolean — サムネイルがあるかどうか
  - `thumbWidth` integer — サムネイル幅
  - `thumbHeight` integer — サムネイル高さ
  - `datetime` string, date-time — アップロード日時

## Other responses

- `403` — ファイルがアップロード出来ませんでした。リクエスト内容が不正です。
- `411` — ファイルがアップロード出来ませんでした。Content-Lengthヘッダーを送信してください。
- `413` — ファイルがアップロード出来ませんでした。ファイルサイズが大きすぎます。

## Changes

- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `uploadFile` was added
- **2019-07-05** `6956f2622a20` — 9 info
  - api operation id `uploadFile` removed and replaced with ``
  - the endpoint scheme security `traqOAuth2` was added to the API
  - endpoint reactivated
  - added optional request body
  - …5 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/files/post.md)

---

[API](https://skmtc.dev/traptitech/apis/traq-api.md) · [All operations](https://skmtc.dev/traptitech/apis/traq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/traptitech/traq-api/revisions/84d2b25db3ba/schema)
