Skip to main content
PATCH
/
accounts
/
{account_id}
/
automations
/
{automation_id}
cURL
curl "https://api.phrase.com/v2/accounts/:account_id/automations/:id" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"name":"Schedule Automation - Weekly","tag_ids":["5","6"],time_zone:"UTC"}' \
  -H 'Content-Type: application/json'
{
  "id": "abcd1234cdef1234abcd1234cdef1234",
  "name": "My First Automation",
  "status": "active",
  "trigger": "schedule",
  "status_filters": [
    "unverified",
    "untranslated",
    "ready_for_review"
  ],
  "project_id": "abcd1234cdef1234abcd1234cdef1234",
  "job_template_id": "abcd1234cdef1234abcd1234cdef1234",
  "tags": [
    "tag-1",
    "tag-2"
  ],
  "cron_schedule": "00 13 * * 1,2",
  "time_zone": "GMT",
  "account": "account",
  "created_at": "2021-06-28T09:52:53Z",
  "updated_at": "2021-06-28T09:52:53Z"
}

Authorizations

Authorization
string
header
required

Enter your token in the format token TOKEN

Headers

X-PhraseApp-OTP
string

Two-Factor-Authentication token (optional)

Path Parameters

account_id
string
required

Account ID

id
string
required

ID

Body

application/json
name
string
required

name of the automation

Example:

"Scheduled Job Automation - Hourly"

trigger
enum<string>
required
Available options:
schedule,
upload
project_ids
string[]
required

List of project IDs to associate with the automation. Currently, only the first ID in the array is used. The array format leaves room for future support of multiple projects.

Example:
["abcd1234cdef1234abcd1234cdef1234"]
status_filters
enum<string>[]
required

translation key statuses used to filter keys that are added to jobs

Available options:
unverified,
untranslated,
ready_for_review
job_template_id
string

id of job template that the automation uses to create jobs from

Example:

"abcd1234cdef1234abcd1234cdef1234"

tags
string[]

used to filter which keys are added to jobs

Example:
["myTag"]
cron_schedule
string

along with time_zone, specifies when the scheduled automation is supposed to run

Example:

"00 13 * * 1,2"

time_zone
string

along with cron_schedule, specifies when the scheduled automation is supposed to run

Example:

"GMT"

Response

OK

id
string
name
string
status
enum<string>
Available options:
inactive,
active,
error
trigger
enum<string>
Available options:
schedule,
upload
status_filters
enum<string>[]

translation key statuses used to filter keys that are added to jobs

Available options:
unverified,
untranslated,
ready_for_review
project_id
string
job_template_id
string
tags
string[]
cron_schedule
string
time_zone
string
account
account · object
Example:
{
"id": "abcd1234",
"name": "Company Account",
"slug": "company_account",
"company": "My Awesome Company",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z",
"company_logo_url": "http://assets.example.com/company_logo.png"
}
created_at
string<date-time>
updated_at
string<date-time>