---
title: "Upgrade a legacy Automation to Automation v2"
method: POST
path: "/automations/{id}/upgrade"
tags: ["automations", "Automations"]
---

# Upgrade a legacy Automation to Automation v2

`POST /automations/{id}/upgrade`

Upgrade a legacy Automation to Automation v2

## Path parameters

- `id` integer, required

## Response `200`

The Automations object.

- AutomationEntity — AutomationEntity model
  - `id` integer — Automation ID
  - `workspace_id` integer — Workspace ID
  - `always_serialize_jobs` boolean — Ordinarily, we will allow automation runs to run in parallel for non-scheduled automations. If this flag is `true` we will force automation runs to be serialized (run one at a time, one after another). This can resolve some issues with race conditions on remote systems at the cost of some performance.
  - `always_overwrite_size_matching_files` boolean — Ordinarily, files with identical size in the source and destination will be skipped from copy operations to prevent wasted transfer. If this flag is `true` we will overwrite the destination file always. Note that this may cause large amounts of wasted transfer usage. This setting has no effect unless `overwrite_files` is also set to `true`.
  - `automation` 'create_folder' | 'delete_file' | 'copy_file' | 'move_file' | 'as2_send' | 'run_sync' | 'import_file' | 'v2' — Automation type
  - `deleted` boolean — Indicates if the automation has been deleted.
  - `description` string — Description for the this Automation.
  - `definition` object — Automation v2 graph definition.
  - `destination_replace_from` string — If set, this string in the destination path will be replaced with the value in `destination_replace_to`.
  - `destination_replace_to` string — If set, this string will replace the value `destination_replace_from` in the destination filename. You can use special patterns here.
  - `destinations` string[] — Destination Paths
  - `disabled` boolean — If true, this automation will not run.
  - `exclude_pattern` string — If set, this glob pattern will exclude files from the automation. Supports globs, except on remote mounts.
  - `import_urls` object[] — List of URLs to be imported and names to be used.
  - `inbound_email_address` string — If trigger is `email`, this is the address that triggers the Automation.
  - `flatten_destination_structure` boolean — Normally copy and move automations that use globs will implicitly preserve the source folder structure in the destination. If this flag is `true`, the source folder structure will be flattened in the destination. This is useful for copying or moving files from multiple folders into a single destination folder.
  - `group_ids` integer[] — IDs of Groups for the Automation (i.e. who to Request File from)
  - `ignore_locked_folders` boolean — If true, the Lock Folders behavior will be disregarded for automated actions.
  - `interval` string — If trigger is `daily`, this specifies how often to run this automation. One of: `day`, `week`, `week_end`, `month`, `month_end`, `quarter`, `quarter_end`, `year`, `year_end`
  - `last_modified_at` string, date-time — Time when automation was last modified. Does not change for name or description updates.
  - `legacy_folder_matching` boolean — If `true`, use the legacy behavior for this automation, where it can operate on folders in addition to just files. This behavior no longer works and should not be used.
  - `name` string — Name for this automation.
  - `overwrite_files` boolean — If true, existing files will be overwritten with new files on Move/Copy automations. Note: by default files will not be overwritten on Copy automations if they appear to be the same file size as the newly incoming file. Use the `always_overwrite_size_matching_files` option in conjunction with `overwrite_files` to override this behavior and overwrite files no matter what.
  - `path` string — Path on which this Automation runs. Supports globs, except on remote mounts.
  - `path_time_zone` string — Timezone to use when rendering timestamps in paths.
  - `version` integer — Current Automation v2 definition version.
  - `recurring_day` integer — If trigger type is `daily`, this specifies a day number to run in one of the supported intervals: `week`, `month`, `quarter`, `year`.
  - `schedule_id` integer — If trigger is `custom_schedule`, the reusable Schedule used instead of the automation's schedule fields.
  - `retry_on_failure_interval_in_minutes` integer — If the Automation fails, retry at this interval (in minutes). Acceptable values are 5 through 1440 (one day). Set to null to disable.
  - `retry_on_failure_number_of_attempts` integer — If the Automation fails, retry at most this many times. Maximum allowed value: 10. Set to null to disable.
  - `schedule` object — If trigger is `custom_schedule`, Custom schedule description for when the automation should be run in json format.
  - `human_readable_schedule` string — If trigger is `custom_schedule` or `daily` with times, Human readable schedule description for when the automation should be run.
  - `schedule_days_of_week` integer[] — If trigger is `custom_schedule`, Custom schedule description for when the automation should be run. 0 is Sunday, 1 is Monday, etc.
  - `schedule_times_of_day` string[] — Times of day to run in HH:MM format (24-hour). For `custom_schedule`, run at these times on specified days of week. For `daily`, run at these times on the scheduled interval date.
  - `schedule_time_zone` string — Time zone for the schedule. If not set, times are interpreted as UTC.
  - `source` string — Source path/glob. See Automation docs for exact description, but this is used to filter for files in the `path` to find files to operate on. Supports globs, except on remote mounts.
  - `legacy_sync_ids` integer[] — IDs of remote sync folder behaviors to run by this Automation
  - `sync_ids` integer[] — IDs of syncs to run by this Automation. This is the new way to specify syncs, and it is recommended to use this instead of `legacy_sync_ids`.
  - `trigger_actions` string[] — If trigger is `action`, this is the list of action types on which to trigger the automation. Valid actions are create, copy, move, archived_delete, update, read, destroy
  - `trigger` 'manual' | 'daily' | 'custom_schedule' | 'webhook' | 'email' | 'action' — How this automation is triggered to run.
  - `user_id` integer — User ID of the Automation's creator.
  - `user_ids` integer[] — IDs of Users for the Automation (i.e. who to Request File from)
  - `value` object — A Hash of attributes specific to the automation type.
  - `webhook_url` string — If trigger is `webhook`, this is the URL of the webhook to trigger the Automation.
  - `holiday_region` string — Skip the automation if there is a formal, observed holiday for this region.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `405` — Method Not Allowed
- `409` — Conflict
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `423` — Locked
- `429` — Too Many Requests

---

[API](https://skmtc.net/files/apis/files-com-api.md) · [All operations](https://skmtc.net/files/apis/files-com-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/files/files-com-api/versions/c80c746637fd/schema)
