Automations
MASV Agent lets you automate file transfer tasks to save time and support robust workflows. Creating an automation returns an automation_id, which you can use to query, update, and delete the automation.
List all automations
Section titled “List all automations”masv automation lscurl -X GET http://localhost:8080/api/v1/automationsPortal download
Section titled “Portal download”A Portal download automation automatically picks up new Packages uploaded to a specified Portal and queues them as downloads. The downloads can be managed the same way as user-initiated downloads.
Create a Portal download automation
Section titled “Create a Portal download automation”masv automation add download \ --name "AUTOMATION_NAME" \ --subdomain "PORTAL_SUBDOMAIN" \ --destination "DESTINATION_FOLDER" \ --create-package-folder=true \ --effective-time "2025-01-20 00:00:00" \ --enable=true \ --priority 1| Name | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Custom automation name. |
subdomain | String | Yes | Subdomain of the Portal to monitor. The Portal must be owned by the Team of the signed-in user. |
destination | String | Yes | Destination folder where Packages will be downloaded. |
create-package-folder | Boolean | No | Place Package contents in dedicated subdirectories (default true). |
effective-time | String | No | RFC 3339 date/time after which uploaded Packages will be downloaded. Setting a past date downloads all Packages uploaded after that point. |
enable | Boolean | No | Enable the automation immediately (default true). |
priority | Integer | No | Transfer priority assigned to all created downloads. |
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/portal_download -d '{ "name": "AUTOMATION_NAME", "portal_subdomain": "PORTAL_SUBDOMAIN", "dst_folder": "DESTINATION_FOLDER", "create_package_folder": true, "effective_time": "2010-12-12T23:59:59-05:00", "enabled": true, "download_priority": 1 }'| Name | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Custom automation name. |
portal_subdomain | String | Yes | Subdomain of the Portal to monitor. The Portal must be owned by the Team of the signed-in user. |
dst_folder | String | Yes | Destination folder where Packages will be downloaded. |
create_package_folder | Boolean | No | Place Package contents in dedicated subdirectories. |
effective_time | String | No | RFC 3339 date/time after which uploaded Packages will be downloaded. |
enabled | Boolean | No | Enable the automation immediately. |
download_priority | Integer | No | Transfer priority assigned to all created downloads. |
Update a Portal download automation
Section titled “Update a Portal download automation”masv automation update download {automation_id} \ --name "NEW_AUTOMATION_NAME" --disableUpdatable fields: create-package-folder, destination, priority, effective-time, enabled, name, subdomain.
curl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/portal_download/{automation_id} -d '{ "name": "NEW_AUTOMATION_NAME", "enabled": false }'Updatable fields: create_package_folder, dst_folder, download_priority, effective_time, enabled, name, portal_subdomain.
All Portals download
Section titled “All Portals download”An all-Portals download automation polls every Portal associated with a specified Team for available Packages and queues them as downloads.
Create an all-Portals download automation
Section titled “Create an all-Portals download automation”masv automation add download \ --all \ --name "AUTOMATION_NAME" \ --team-id "TEAM_ID" \ --create-package-folder=true \ --create-portal-subfolder=true \ --destination "DESTINATION" \ --effective-time "2025-01-20 00:00:00" \ --enable=true \ --priority 8| Name | Type | Required | Description |
|---|---|---|---|
all | Flag | Yes | Indicates this is an all-Portals download automation. |
name | String | Yes | Custom automation name. |
team-id | String | Yes | Team ID to poll for Portal Packages. The signed-in user must belong to this Team. |
destination | String | Yes | Destination folder where Packages will be downloaded. |
create-package-folder | Boolean | No | Place Package contents in dedicated subdirectories (default true). |
create-portal-subfolder | Boolean | No | Place Package folders within directories named after the originating Portal. |
effective-time | String | No | RFC 3339 date/time after which uploaded Packages will be downloaded. |
enable | Boolean | No | Enable the automation immediately (default true). |
priority | Integer | No | Transfer priority assigned to all created downloads. |
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/all_portals_download -d '{ "name": "AUTOMATION_NAME", "team_id": "TEAM_ID", "dst_folder": "DESTINATION_FOLDER", "create_portal_subfolder": true, "effective_time": "2010-12-12T23:59:59-05:00", "enabled": true, "download_priority": 3 }'| Name | Type | Required | Description |
|---|---|---|---|
name | String | Yes | Custom automation name. |
team_id | String | Yes | Team ID to poll for Portal Packages. The signed-in user must belong to this Team. |
dst_folder | String | Yes | Destination folder where Packages will be downloaded. |
create_portal_subfolder | Boolean | No | Place Package folders within directories named after the originating Portal. |
effective_time | String | No | RFC 3339 date/time after which uploaded Packages will be downloaded. |
enabled | Boolean | No | Enable the automation immediately. |
download_priority | Integer | No | Transfer priority assigned to all created downloads. |
Update an all-Portals download automation
Section titled “Update an all-Portals download automation”masv automation update download {automation_id} \ --name "NEW_AUTOMATION_NAME" --disableUpdatable fields: create-portal-subfolder, destination, priority, effective-time, enabled, name, team-id.
curl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/all_portals_download/{automation_id} -d '{ "name": "NEW_AUTOMATION_NAME", "enabled": false }'Updatable fields: create_portal_subfolder, dst_folder, download_priority, effective_time, enabled, name, team_id.
Watch folder
Section titled “Watch folder”A watch folder is an upload automation that monitors a directory for subfolders. After a timeout passes without detecting file modifications, each subfolder is sent as a Package.
There are two types of watch folder automations:
- Send (Team) upload — sends subfolders to configured email recipients.
- Portal upload — sends subfolders to a configured Portal.
Send (Team) watch folder
Section titled “Send (Team) watch folder”Create
Section titled “Create”masv automation add upload email \ --name "AUTOMATION_NAME" \ --enable=true \ --path "PATH_TO_WATCH" \ --recipients 'example1@test.com,example2@test.com' \ --team-id "TEAM_ID" \ --timeout 5Required fields:
| Name | Type | Description |
|---|---|---|
name | String | Automation name for identification. |
enable | Boolean | Enabled/disabled state of the automation. |
path | String | Directory to watch. Subfolders are sent as Packages after the timeout. |
recipients | String | Comma-separated list of email recipients. |
team-id | String | Team ID from which to send the Packages. |
timeout | Integer | Filesystem inactivity timeout in minutes. |
Optional fields: blacklist, delete-after, delete-files-after-upload, download-limit, download-password, message, package-name-suffix, priority, tag-id, tag-name, unlimited-storage, upload-loose-files.
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/team_upload -d '{ "name": "send automation 1", "path": "/path/to/watch/folder", "timeout": 5, "enabled": true, "team_id": "TEAM_ID", "recipient_emails": ["recipient@email.com"] }'Required fields:
| Name | Type | Description |
|---|---|---|
name | String | Automation name for identification. |
enabled | Boolean | Enabled/disabled state of the automation. |
path | String | Directory to watch. Subfolders are sent as Packages after the timeout. |
recipient_emails | Array | Array of email recipients. |
team_id | String | Team ID from which to send the Packages. |
timeout | Integer | Filesystem inactivity timeout in minutes. |
Optional fields: blacklist, delete_after, delete_files_after_upload, download_limit, download_password, message, package_name_suffix, send_loose_files, tag, unlimited_storage, upload_priority.
Update
Section titled “Update”masv automation update upload email {automation_id} \ --name "NEW_AUTOMATION_NAME" --disablecurl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/team_upload/{automation_id} -d '{ "name": "name2" }'Portal watch folder
Section titled “Portal watch folder”Create
Section titled “Create”masv automation add upload portal \ --enable=true \ --name "AUTOMATION_NAME" \ --path "PATH_TO_WATCH" \ --subdomain "PORTAL_SUBDOMAIN" \ --sender "test@example.com" \ --timeout 5Required fields:
| Name | Type | Description |
|---|---|---|
enable | Boolean | Enabled/disabled state of the automation. |
name | String | Automation name for identification. |
path | String | Directory to watch. Subfolders are sent as Packages after the timeout. |
subdomain | String | Portal subdomain to send Packages to. |
sender | String | Sender email that the recipient will see. |
timeout | Integer | Filesystem inactivity timeout in minutes. |
Optional fields: blacklist, delete-files-after-upload, message, package-name-suffix, password, priority, upload-loose-files.
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/portal_upload -d '{ "name": "portal upload automation 1", "path": "/path/to/watch/folder", "timeout": 5, "enabled": true, "portal_subdomain": "PORTAL_SUBDOMAIN", "sender_email": "sender@email.com" }'Required fields:
| Name | Type | Description |
|---|---|---|
enabled | Boolean | Enabled/disabled state of the automation. |
name | String | Automation name for identification. |
path | String | Directory to watch. Subfolders are sent as Packages after the timeout. |
portal_subdomain | String | Portal subdomain to send Packages to. |
sender_email | String | Sender email that the recipient will see. |
timeout | Integer | Filesystem inactivity timeout in minutes. |
Optional fields: blacklist, delete_files_after_upload, message, package_name_suffix, portal_password, send_loose_files, upload_priority.
Update
Section titled “Update”masv automation update upload portal {automation_id} \ --name "NEW_AUTOMATION_NAME" --disablecurl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/portal_upload/{automation_id} -d '{ "name": "name2" }'Stream upload
Section titled “Stream upload”A stream upload automation uploads growing files to recipients. Each stream automation watches a folder for new files. After a timeout passes without detecting file size changes, the growing file upload is finalized.
There are two types of stream upload automations:
- Send (Team) stream — sends growing files to configured email recipients.
- Portal stream — sends growing files to a configured Portal.
Send (Team) stream
Section titled “Send (Team) stream”Create
Section titled “Create”masv automation add upload email \ --name "AUTOMATION_NAME" \ --enable=true \ --path "PATH_TO_WATCH" \ --recipients 'example1@test.com,example2@test.com' \ --team-id "TEAM_ID" \ --timeout 5 \ --growing-filesRequired fields:
| Name | Type | Description |
|---|---|---|
name | String | Automation name for identification. |
enable | Boolean | Enabled/disabled state of the automation. |
path | String | Directory to watch. Uploads are created when new top-level files are detected. |
recipients | String | Comma-separated list of email recipients. |
team-id | String | Team ID from which to send the Packages. |
timeout | Integer | Filesystem inactivity timeout in seconds. After this duration, any ongoing stream is finalized. |
Optional fields: whitelist, delete-after, download-limit, download-password, message, priority, tag-id, tag-name, unlimited-storage.
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/team_stream -d '{ "name": "team stream automation 1", "team_id": "TEAM_ID", "path": "/path/to/stream/folder", "timeout": 60, "recipient_emails": ["recipient@email.com"], "enabled": true }'Required fields:
| Name | Type | Description |
|---|---|---|
name | String | Automation name for identification. |
enabled | Boolean | Enabled/disabled state of the automation. |
path | String | Directory to watch. Uploads are created when new top-level files are detected. |
recipient_emails | Array | Array of email recipients. |
team_id | String | Team ID from which to send the Packages. |
timeout | Integer | Filesystem inactivity timeout in seconds. After this duration, any ongoing stream is finalized. |
Optional fields: whitelist, delete_after, download_limit, download_password, message, tag, unlimited_storage, upload_priority.
Update
Section titled “Update”masv automation update upload team {automation_id} \ --name "NEW_AUTOMATION_NAME" --disablecurl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/team_stream/{automation_id} -d '{ "name": "team stream automation 2" }'Portal stream
Section titled “Portal stream”Create
Section titled “Create”masv automation add upload portal \ --enable=true \ --name "AUTOMATION NAME" \ --path "PATH_TO_WATCH" \ --subdomain "SUBDOMAIN" \ --sender "test@example.com" \ --timeout 5 \ --growing-filesRequired fields:
| Name | Type | Description |
|---|---|---|
enable | Boolean | Enabled/disabled state of the automation. |
name | String | Automation name for identification. |
path | String | Directory to watch. Uploads are created when new top-level files are detected. |
subdomain | String | Portal subdomain to send Packages to. |
sender | String | Sender email that the recipient will see. |
timeout | Integer | Filesystem inactivity timeout in seconds. After this duration, the ongoing stream is finalized. |
Optional fields: whitelist, message, password, priority.
curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/portal_stream -d '{ "name": "portal stream automation 1", "path": "/path/to/stream/folder", "timeout": 60, "enabled": true, "portal_subdomain": "PORTAL_SUBDOMAIN", "sender_email": "sender@email.com" }'Required fields:
| Name | Type | Description |
|---|---|---|
enabled | Boolean | Enabled/disabled state of the automation. |
name | String | Automation name for identification. |
path | String | Directory to watch. Uploads are created when new top-level files are detected. |
portal_subdomain | String | Portal subdomain to send Packages to. |
sender_email | String | Sender email that the recipient will see. |
timeout | Integer | Filesystem inactivity timeout in seconds. After this duration, the ongoing stream is finalized. |
Optional fields: whitelist, message, portal_password, upload_priority.
Update
Section titled “Update”masv automation update upload portal {automation_id} \ --name "NEW_AUTOMATION_NAME" --disablecurl -H "Content-Type: application/json" -X PUT \ http://localhost:8080/api/v1/automations/portal_stream/{automation_id} -d '{ "name": "name2" }'Remove an automation
Section titled “Remove an automation”Delete any automation type:
masv automation rm {automation_id}Use the endpoint matching the automation type:
curl -X DELETE http://localhost:8080/api/v1/automations/portal_download/{automation_id}curl -X DELETE http://localhost:8080/api/v1/automations/all_portals_download/{automation_id}curl -X DELETE http://localhost:8080/api/v1/automations/team_upload/{automation_id}curl -X DELETE http://localhost:8080/api/v1/automations/portal_upload/{automation_id}curl -X DELETE http://localhost:8080/api/v1/automations/team_stream/{automation_id}curl -X DELETE http://localhost:8080/api/v1/automations/portal_stream/{automation_id}Export and import automations
Section titled “Export and import automations”Automations can be exported to a base64 string and imported by another MASV Agent or Desktop App. Use this to share or duplicate automations.
Export
Section titled “Export”masv automation export {automation_id}Use the endpoint matching the automation type:
curl http://localhost:8080/api/v1/automations/portal_download/{automation_id}/exportcurl http://localhost:8080/api/v1/automations/portal_upload/{automation_id}/exportcurl http://localhost:8080/api/v1/automations/team_upload/{automation_id}/exportcurl http://localhost:8080/api/v1/automations/team_stream/{automation_id}/exportcurl http://localhost:8080/api/v1/automations/portal_stream/{automation_id}/exportThe response contains a data field with the base64-encoded automation:
{ "data": "base64_data" }Import
Section titled “Import”masv automation import 'base64_data'curl -H "Content-Type: application/json" -X POST \ http://localhost:8080/api/v1/automations/import -d '{ "data": "base64_data" }'Next steps
Section titled “Next steps”- Uploads — Send files manually via Team email, shareable Link, or Portal.
- Downloads — Initiate, monitor, and manage file downloads.
- Storage Gateway — Connect storage devices to MASV.