---
title: "File: Create"
method: POST
path: "/merchants/{merchant_id}/files"
tags: ["Platform Model"]
---

# File: Create

`POST /merchants/{merchant_id}/files`

## Request

- Base URL: `https://komoju.com/api/v1`
- URL: `https://komoju.com/api/v1/merchants/{merchant_id}/files`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/komoju/apis/komoju-api/docs/merchants/:merchant_id/files/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new file for the current merchant.

## Path parameters

- `merchant_id` string, required: A unique 25-character alphanumeric resource identifier.

## Request body

- object
  - `paper` string, required: Must be only one file.

## Response `200`

Creates a new file for its submerchant

- MerchantFile
  - `id` string, required: Unique identifier for this file.
  - `resource` string, required: Resource type name, always "file".
  - `filename` string, required: Original filename of the uploaded file.
  - `size` integer, required: File size in bytes.
  - `mime_type` string, required: MIME type of the uploaded file (e.g. "application/pdf").
  - `created_at` string, date-time, required: Timestamp when the file was uploaded.
  - `updated_at` string, date-time, required: Timestamp when the file record was last updated.

---

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