---
title: "Update an automation"
method: PATCH
path: "/accounts/{account_id}/automations/{automation_id}"
tags: ["Automations"]
---

# Update an automation

`PATCH /accounts/{account_id}/automations/{automation_id}`

Update an existing automation.

For feature availability, see [Jobs (Strings)](https://support.phrase.com/hc/en-us/articles/5784100517788-Jobs-Strings).

## Path parameters

- `account_id` string, required
- `id` string, required

## Headers

- `X-PhraseApp-OTP` string

## Request body

- object
  - `name` string, required — name of the automation
  - `trigger` 'schedule' | 'upload', required
  - `project_ids` string[], required — List of project IDs to associate with the automation. Providing more than one project ID requires the `advanced_job_automation` plan feature; accounts without this feature receive a 422 response with error field `project_ids`.
  - `job_template_id` string — id of job template that the automation uses to create jobs from
  - `status_filters` string[], required — translation key statuses used to filter keys that are added to jobs
  - `tags` string[] — used to filter which keys are added to jobs
  - `cron_schedule` string — along with time_zone, specifies when the scheduled automation is supposed to run
  - `time_zone` string — along with cron_schedule, specifies when the scheduled automation is supposed to run
  - `job_owner_id` string — User ID of the job owner that newly created jobs are assigned to.
  - `include_only_updated_locales` boolean — When `true`, the automation only acts on locales that changed since its last run.

## Response `200`

OK

- Automation
  - `id` string
  - `name` string
  - `status` 'inactive' | 'active' | 'error'
  - `trigger` 'schedule' | 'upload'
  - `status_filters` string[] — translation key statuses used to filter keys that are added to jobs
  - `project_id` string
  - `project_ids` string[] — All project IDs the automation applies to. Returned alongside the singular `project_id` for backwards compatibility.
  - `job_template_id` string
  - `job_owner_id` string, nullable — User ID of the job owner that newly created jobs are assigned to.
  - `include_only_updated_locales` boolean — When `true`, the automation only acts on locales that changed since its last run.
  - `tags` string[]
  - `cron_schedule` string
  - `time_zone` string
  - `account` Account
    - `id` string
    - `name` string
    - `slug` string
    - `company` string
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `company_logo_url` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad request. The request could not be parsed or a parameter failed validation. Verify the request body, the content type, and the parameter types, then retry.
- `401` — Unauthorized. Authentication failed because the access token is missing, expired, or invalid. Supply a valid access token and retry.
- `403` — Forbidden. The credentials are valid but not permitted for this request: the access token may lack the required scope, the user may lack permission on the resource, or the account plan may not include the feature. Use a token with the required scope on an account and user that hold the necessary permissions.
- `404` — Not found. The requested resource does not exist or is not visible to the authenticated user. Verify the identifiers in the request path and that the token has access to them, then retry.
- `422` — Unprocessable entity. The request was well-formed but failed validation. The response body lists each offending field in the `errors` array, with its resource, field, and a human-readable message. Correct the listed fields and retry.
- `429` — Too many requests. The rate limit has been exceeded. Wait until the time indicated by the `X-Rate-Limit-Reset` response header before retrying.

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/versions/98ecac7ba2bf/schema)
