curl --request POST \
--url https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"acknowledgeHighStakes": true,
"publishedUrl": "<string>",
"liveOn": "2023-12-25"
}
'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status"
payload = {
"acknowledgeHighStakes": True,
"publishedUrl": "<string>",
"liveOn": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({acknowledgeHighStakes: true, publishedUrl: '<string>', liveOn: '2023-12-25'})
};
fetch('https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status', 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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status",
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([
'acknowledgeHighStakes' => true,
'publishedUrl' => '<string>',
'liveOn' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status"
payload := strings.NewReader("{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"blocked": true,
"changed": true,
"fromStatus": "suggested",
"toStatus": "suggested",
"transition": "accept",
"transitionedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}Change an action status
Moves an action through its lifecycle, as the member who created the API key; they must be a project member with project management permission (403 otherwise, including for a key with no creator). Transitions come in pairs. accept moves a suggestion to accepted and unaccept returns it to the suggestions; unaccept is refused with not_reversible once the action has an owner, is in progress or blocked, has ever gone live or has a measurement, or has a brief, draft, edit, Library item, retest, prompt request added from another prompt, or dismissal note attached, and for some older accepted actions; an action someone created, such as a prompt action, is refused with invalid_transition; and a suggestion accepted as already covered by an existing page is not undone. archive takes a suggestion or accepted or live work off the queue; restore returns an archived suggestion to the suggestions, or archived work to the status it had, live work keeping its go-live date. Work archived while blocked returns to blocked, except some older work, which returns to the status it had before it was blocked. block and unblock apply to accepted work; unblock returns it to the status it had before. mark_live moves accepted work to live and opens its before/after measurement in Results from now, or from liveOn, the UTC day the fix went live (today or up to 14 days back); publishedUrl, when given, is added to the pages the action already carries, which all stay. mark_live with liveOn on live work moves its go-live date and rebuilds its measurement from that day; a measurement that has closed or is dated by a recorded page change keeps its date, refused with invalid_transition, and a page another action claimed from a detected change within 14 days of the date is refused with conflict. A liveOn outside the range is a 400. reopen moves live work back to accepted: its measurement, go-live date and published pages stay, and marking it live again continues the same measurement, except a lookalike action, whose measurement restarts from the new go-live time. accept, archive of a suggestion, restore of an archived suggestion and unaccept act on every suggestion merged into the named one. A high-stakes target page refuses accept with acknowledgment_required until acknowledgeHighStakes is true, which needs a human’s confirmation; a locked page refuses it with page_locked. Repeating accept, unaccept, archive, block, unblock, reopen, or mark_live without a new page or go-live date returns changed false and writes nothing; restore of an action that is not archived is refused with invalid_transition, because the status it would return to is not known. Any other refusal is a 409 whose reason is invalid_transition, superseded (a newer action for the same Agent Picks loss is open) or conflict (the action, its merged suggestions or its target page’s protection changed during the request, or the merged suggestions cannot all move in one change; read the action and retry); nothing is written. Some older archived suggestions can’t be restored and are always refused with conflict; they stay archived. The key, its creator’s membership and their permission are checked again where the change is written, so access revoked mid-request is refused with 403. A change queues action.updated webhooks naming the API as the actor. Nothing is published to the customer’s site. Requires the actions.write scope.
curl --request POST \
--url https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"acknowledgeHighStakes": true,
"publishedUrl": "<string>",
"liveOn": "2023-12-25"
}
'import requests
url = "https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status"
payload = {
"acknowledgeHighStakes": True,
"publishedUrl": "<string>",
"liveOn": "2023-12-25"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({acknowledgeHighStakes: true, publishedUrl: '<string>', liveOn: '2023-12-25'})
};
fetch('https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status', 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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status",
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([
'acknowledgeHighStakes' => true,
'publishedUrl' => '<string>',
'liveOn' => '2023-12-25'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status"
payload := strings.NewReader("{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://devtune.ai/api/v2/projects/{projectId}/actions/{actionId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"acknowledgeHighStakes\": true,\n \"publishedUrl\": \"<string>\",\n \"liveOn\": \"2023-12-25\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"actionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actionIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"blocked": true,
"changed": true,
"fromStatus": "suggested",
"toStatus": "suggested",
"transition": "accept",
"transitionedAt": "2023-11-07T05:31:56Z"
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}{
"error": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"details": {}
}Authorizations
API key with dtk_live_ prefix. Obtain it from API Keys in the account sidebar. New keys start with all supported scopes selected for the chosen project, and you can narrow them to specific read/write scopes as needed.
Path Parameters
The project the credential is bound to. Read it from GET /connection.
The action
Body
accept, unaccept, archive, restore, block, unblock, mark_live, reopen Only with accept. Confirms a human approved changing a high-stakes page.
Only with mark_live. The http(s) page where the fix shipped.
2048Only with mark_live. The UTC day the fix went live, today or up to 14 days back; defaults to today. On a live action it moves the go-live date.
Response
The transition receipt