---
title: "Save file or package repository item."
method: POST
path: "/rest/manager/files/savefiledata"
tags: ["Files APIs"]
---

# Save file or package repository item.

`POST /rest/manager/files/savefiledata`

## Request

- Base URL: `https://masonconsole.com`
- URL: `https://masonconsole.com/rest/manager/files/savefiledata`
- Auth: HTTP bearer

This API endpoint handles the saving of file data, including associated metadata. It requires an HTTP POST request with a `RepositoryFileMetaData` object provided in the request body. The API verifies the logged user's permissions, processes the file data, and then saves it. Once the file or package has been successfully stored, it can be sent to the device(s).

## Request body

- RepositoryFileMetaData
  - `repositoryFileMetaDataID` string
  - `fileID` string
  - `fileName` string
  - `fileLocation` string
  - `ownerUser` string
  - `ownerDomain` string
  - `lastEditorUser` string
  - `privateFile` boolean
  - `fileDesc` string
  - `fileAction` string
  - `arguments` string
  - `properties` object
  - `color` string
  - `fontIcon` string
  - `creationDate` string, date-time
  - `lastUpdate` string, date-time

## Response `200`

Successful response

- ResponseMetaData
  - `data` object
  - `result` string
  - `message` string
  - `@class` string, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too Many Requests
- `500`: Internal server error
- `503`: Service Unavailable

---

[API](https://skmtc.dev/bymason/apis/mason-device-console-api-docs.md) - [All operations](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/llms.txt) - [OpenAPI document](https://skmtc.dev/bymason/apis/mason-device-console-api-docs/revisions/d9cdcc14b7d1?raw)
