Skip to main content
PATCH
/
projects
/
{project_id}
/
branches
/
{name}
/
sync
cURL
curl "https://api.phrase.com/v2/projects/:project_id/branches/:name/sync" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X PATCH \
  -d '{"strategy":"use_main"}' \
  -H 'Content-Type: application/json'
{
  "message": "Validation Failed",
  "errors": [
    {
      "resource": "Resource",
      "field": "name",
      "message": "can't be blank"
    }
  ]
}

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

project_id
string
required

Project ID

name
string
required

name

Body

application/json
strategy
enum<string>

Conflict resolution strategy applied when the branch and its base have diverged. use_main keeps the values from the base branch; use_branch keeps the values from this branch.

Available options:
use_main,
use_branch
Example:

"use_main"

Response

OK. The sync has been scheduled. The response body is empty; observe progress by polling the branch resource.