---
title: "Upload file"
method: POST
path: "/v4/folders/{folderId}/files"
tags: ["Files"]
---

# Upload file

`POST /v4/folders/{folderId}/files`

## Request

- Base URL: `https://api.inmobile.com`
- URL: `https://api.inmobile.com/v4/folders/{folderId}/files`
- Auth: one of:
  - HTTP basic
  - API key in query parameter `apikey`

A request must be less than 100mb.

## Path parameters

- `folderId` string, guid, required

## Request body

- union: Exactly one of data or url must be set.
  - object: The data in base64 encoding.
    - `fileName` string, required: The file name of the uploaded file.
    - `mimeType` string, required: The mime type of the file. The mime type must match the extension of the file. E.g a .png file must have mime type image/png.
    - `data` string, required: The data in base64 encoding.
  - object: The url to get the file from.
    - `fileName` string, required: The file name of the uploaded file.
    - `mimeType` string, required: The mime type of the file. The mime type must match the extension of the file. E.g a .png file must have mime type image/png.
    - `url` string, required: The url to get the file from.

## Response `200`

An object that contains the ID and URL of the uploaded resource.

- UploadApiFileResponseModel
  - `id` string, guid: The id of the uploaded resource.
  - `url` string: A url to the uploaded resource.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found
- `500`: Internal server error
- `507`: Insufficient storage

---

[API](https://skmtc.dev/inmobile/apis/inmobile-rest-api.md) · [All operations](https://skmtc.dev/inmobile/apis/inmobile-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inmobile/apis/inmobile-rest-api/revisions/197a90ad5f8f?raw)
