Skip to main content
POST
/
projects
/
{project_id}
/
jobs
/
{id}
/
reopen
cURL
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/reopen" \
  -u USERNAME_OR_ACCESS_TOKEN \
  -X POST \
  -d '{"branch":"my-feature-branch"}' \
  -H 'Content-Type: application/json'
phrase jobs reopen \
--project_id <project_id> \
--id <id> \
--data '{"branch":"my-feature-branch"}' \
--access_token <token>
import requests

url = "https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen"

payload = { "branch": "my-feature-branch" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({branch: 'my-feature-branch'})
};

fetch('https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'branch' => 'my-feature-branch'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen"

payload := strings.NewReader("{\n \"branch\": \"my-feature-branch\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"branch\": \"my-feature-branch\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.phrase.com/v2/projects/{project_id}/jobs/{id}/reopen")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"branch\": \"my-feature-branch\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "626ea67628690c73ac86ac81eec2d185",
  "name": "Translations for new Feature",
  "briefing": "Some instructions for the translators",
  "due_date": "2017-02-28T09:52:53Z",
  "state": "completed",
  "ticket_url": "https://example.atlassian.net/browse/FOO",
  "created_at": "2017-01-28T09:52:53Z",
  "updated_at": "2017-01-28T09:52:53Z",
  "project": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "name": "My Android Project",
    "main_format": "xml",
    "created_at": "2015-01-28T09:52:53Z",
    "updated_at": "2015-01-28T09:52:53Z"
  },
  "owner": {
    "id": "abcd1234cdef1234abcd1234cdef1234",
    "username": "joe.doe",
    "name": "Joe Doe"
  },
  "job_tag_name": "Job_123",
  "source_translations_updated_at": "2020-01-01T00:00:00Z",
  "source_locale": {
    "id": "abcd1234cdef1234abcd1234cdef1235",
    "name": "de-DE",
    "code": "de-DE"
  },
  "locales": [
    {
      "id": "abcd1234cdef1234abcd1234cdef1234",
      "name": "English",
      "code": "en-GB"
    }
  ],
  "keys": [
    {
      "id": "dbcd1234cdef1234abcd1234cdef1234",
      "name": "greeting.hello"
    }
  ]
}
{
"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

id
string
required

ID

Body

application/json
branch
string

specify the branch to use

Example:

"my-feature-branch"

Response

OK

id
string
name
string
briefing
string
due_date
string<date-time> | null
state
string
ticket_url
string
project
project_short · object
Example:
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"name": "My Android Project",
"main_format": "xml",
"created_at": "2015-01-28T09:52:53Z",
"updated_at": "2015-01-28T09:52:53Z"
}
branch
branch_name · object
Example:
{ "name": "new-branch" }
created_at
string<date-time>
updated_at
string<date-time>
automation_id
string | null

The ID of the automation that created this job, or null if the job was created manually.

job_template_id
string | null

The ID of the job template this job was created from, or null if no template was used.

review_due_date
string<date-time> | null

The review due date for this job. Returns null when the project does not have review workflow enabled.

Example:

"2015-03-25T11:43:52Z"

owner
user_preview · object
Example:
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"username": "johndoe",
"name": "John Doe",
"gravatar_uid": "205e460b479e2e5b48aec07710c08d50"
}
job_tag_name
string
source_translations_updated_at
string<date-time>
source_locale
locale_preview · object
Example:
{
"id": "abcd1234cdef1234abcd1234cdef1234",
"name": "English",
"code": "en-GB"
}
locales
locale_preview · object[]
keys
key_preview · object[]
annotations
job_annotation · object[]

Returned only when include_annotations=true is supplied on the request.

locked
boolean

true if the job has been locked by the project's job-locking workflow (translations attached to the job are read-only until the job advances).