Skip to main content

Upload files and manage file categories through the API

Upload and replace file content, read file metadata, and create, rename or remove File Categories through the Public API.

Written by Logan Bowlby

Overview

Use the Public API to upload files and associate them with File Categories and subscribers. File content is sent as multipart form data. Category creation and updates use JSON.

A file upload stores a file and returns its ID. It does not by itself create a Library manual or attach the file to an Assignment or Result; those workflows need their own supported relation or setup.

At a glance

Who can do this

An integration with an API key. Uploads and changes require a key that is not Read-only.

Where

/api/customers/files and /filecategories

Works on

Public API

Availability

Public API access is enabled per organization by Mobaro — ask your CSM.


Before you start

Use HTTPS with the base URL https://app.mobaro.com/api/customers. The examples below use paths under that base URL. Send x-api-key: YOUR_API_KEY on every request. Replace all fictional IDs, dates and key placeholders before use.

GET requests can use a Read-only key. Uploads, updates and category removal require write access. Create and manage API keys explains setup. An API key acts with Super User access to its organization; it does not inherit its creator’s Role or Location access. Keep it in a secure server-side store. Mobaro API access and limits explains access and limits.

For the complete request and response schemas, open Mobaro API documentation. The images in this article are source-derived examples, not successful live API responses.


Prepare categories and upload a file

1. Find or create the File Category

Use GET /api/customers/filecategories to read the category array. It is not a paged list envelope. Use existing category IDs where possible. To create a category, send POST /api/customers/filecategories with JSON containing name and a valid hexadecimal color, such as #074f57. description is optional. The handler requires Color even though the request schema does not mark it required.

POST /api/customers/filecategories
x-api-key: YOUR_WRITE_API_KEY
Content-Type: application/json

{"name":"Inspection evidence","description":"Supporting inspection files","color":"#074f57"}

A successful create returns 200 with an id. Store the full category ID for the file relation. Use GET /filecategories/{id} for one category, with its ID suffix in the path.

2. Upload binary content as multipart data

Send POST /api/customers/files/create. Build a multipart/form-data body in your HTTP client. Use the File field for the binary file, including its filename. Do not send a local path or a Base64 string in a JSON body. Let the client generate the multipart boundary.

Form field

Content

File

Binary file content and filename.

Categories

Optional full File Category IDs, such as filecategories/606-A.

Subscribers

Optional full User or User Group IDs for subscribers. These are not email addresses.

For multiple Categories or Subscribers, use repeated form fields with the same name. Use real IDs from your organization; relation validation can remove invalid or unavailable references. The example image shows fictional text content only.

A successful upload returns 200 with an id. Preserve that full ID. This response does not contain a download URL or the uploaded binary content.


Inspect and update files

3. Read metadata or replace file content

Use GET /api/customers/files/{id} to inspect id, contentType, size, categories, subscribers and comments. Use the File ID suffix in the path. This GET returns metadata, not the file’s bytes.

To update, send PUT /api/customers/files/{id} with multipart form data and the File content again. Optional Categories and Subscribers replace their respective lists when supplied. Omit a list to keep its current value. The update returns 200 without an updated object; read the metadata back to verify it.

⚠️ Heads-up: Known issue: the current file update implementation opens the File part even when you only want to change Categories or Subscribers. Include the file content in every PUT request. Do not send a metadata-only update or assume the request schema’s optional File field means that flow works.


Maintain File Categories

4. Update or remove a category

Send PUT /api/customers/filecategories/{id} with the JSON fields you want to change: name, description or color. Omitted fields keep their values. Use DELETE /api/customers/filecategories/{id} to remove a category, using its ID suffix.

PUT /api/customers/filecategories/606-A
x-api-key: YOUR_WRITE_API_KEY
Content-Type: application/json

{"name":"Reviewed inspection evidence"}

🛑 Critical: Removing a File Category changes the organization’s category setup. Check which workflows use it before deletion. Category deletion is not a file deletion request, and the public file controller in this guide does not expose a file DELETE route.

Category updates and removal return 200 without an updated object. List the categories again to verify the result. Use the current API documentation for supported upload formats and hosting limits; this guide does not assume a universal file-size limit.


Best practices

  • Keep the uploaded File ID and Category IDs in your integration’s records.

  • Read metadata after upload or replacement and confirm Categories and Subscribers survived validation.

  • Use a test file first. Stay below 10 requests per second per key, and back off on 429.


Frequently asked questions

Why does my JSON file upload fail?

The upload endpoint expects multipart form data, with binary content in File. It does not accept a JSON body containing a local path or a Base64 file. Let your client generate the multipart boundary.

Why does changing only Categories fail?

The current PUT implementation also requires the File part. Include the file content again, together with the desired Categories. Do not rely on a metadata-only update.

Why did a Category or Subscriber disappear after upload?

The server sanitizes file relations. Check that every ID exists and is valid for the organization, and use full relation IDs. Read metadata back to confirm the saved lists.

Does GET files download the file?

No. This route returns metadata, Categories, Subscribers and comment text. It does not return binary file content or a download URL.

Does deleting a File Category delete the files?

It removes the category from the organization’s category setup. It is not a file deletion request. This public file controller does not provide a file DELETE route.

Did this answer your question?