---
title: "Upload a file"
method: POST
path: "/accounts/{user_id}/files"
tags: ["Files"]
---

# Upload a file

`POST /accounts/{user_id}/files`

Before sending a fax you need to upload your files using this API. In order to upload your fax file, you have to send a `multipart/form-data` request with your file. Set the `name` to `fax_file`, `filename` to your file's name with extension, and the Content-Type to the file's MIME type. In most cases, the `filename` directive will be automatically added by your library of choice. If the upload was successful you would receive a `file_path` which you can use to send your fax. (Permitted scopes: **fax:all:edit**, **fax:file:edit**)

## Path parameters

- `user_id` string, required

## Query parameters

- `format` 'tiff' | 'pdf' — File type

## Response `201`

Simple object containing path of created file

- FilePath — File path object
  - `path` string, required — Path of newly uploaded file

## Other responses

- `400` — Error object in case there's a problem with given data
- `500` — Error object in case there's a server error

---

[API](https://skmtc.net/fax/apis/fax-plus-rest-api.md) · [All operations](https://skmtc.net/fax/apis/fax-plus-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/fax/fax-plus-rest-api/revisions/c1afc85d2c15/schema)
