Update Actions
curl --request POST \
--url https://api.peec.ai/customer/v1/actions/update \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"actions": [
{
"action_id": "01a0422f-e0c4-7820-85a1-31515a321f15",
"notes": {
"text": "<string>",
"html": "<string>"
},
"topic_id": "to_a1b2c3",
"prompt_ids": [
"pr_a1b2c3"
],
"steps": [
{
"title": "Add a pricing comparison table",
"description": "<string>",
"completed": true,
"section": "Before publishing"
}
],
"country_codes": [
"<string>"
],
"language_codes": [
"<string>"
],
"tag_ids": [
"<string>"
],
"category": "<string>",
"assignee_user_id": "<string>",
"due_on": "2026-10-31",
"repeat": {
"every": 6
},
"title": "<string>",
"page_url": "<string>"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
'import requests
url = "https://api.peec.ai/customer/v1/actions/update"
payload = {
"actions": [
{
"action_id": "01a0422f-e0c4-7820-85a1-31515a321f15",
"notes": {
"text": "<string>",
"html": "<string>"
},
"topic_id": "to_a1b2c3",
"prompt_ids": ["pr_a1b2c3"],
"steps": [
{
"title": "Add a pricing comparison table",
"description": "<string>",
"completed": True,
"section": "Before publishing"
}
],
"country_codes": ["<string>"],
"language_codes": ["<string>"],
"tag_ids": ["<string>"],
"category": "<string>",
"assignee_user_id": "<string>",
"due_on": "2026-10-31",
"repeat": { "every": 6 },
"title": "<string>",
"page_url": "<string>"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [
{
action_id: '01a0422f-e0c4-7820-85a1-31515a321f15',
notes: {text: '<string>', html: '<string>'},
topic_id: 'to_a1b2c3',
prompt_ids: ['pr_a1b2c3'],
steps: [
{
title: 'Add a pricing comparison table',
description: '<string>',
completed: true,
section: 'Before publishing'
}
],
country_codes: ['<string>'],
language_codes: ['<string>'],
tag_ids: ['<string>'],
category: '<string>',
assignee_user_id: '<string>',
due_on: '2026-10-31',
repeat: {every: 6},
title: '<string>',
page_url: '<string>'
}
],
project_id: 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
})
};
fetch('https://api.peec.ai/customer/v1/actions/update', 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.peec.ai/customer/v1/actions/update",
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([
'actions' => [
[
'action_id' => '01a0422f-e0c4-7820-85a1-31515a321f15',
'notes' => [
'text' => '<string>',
'html' => '<string>'
],
'topic_id' => 'to_a1b2c3',
'prompt_ids' => [
'pr_a1b2c3'
],
'steps' => [
[
'title' => 'Add a pricing comparison table',
'description' => '<string>',
'completed' => true,
'section' => 'Before publishing'
]
],
'country_codes' => [
'<string>'
],
'language_codes' => [
'<string>'
],
'tag_ids' => [
'<string>'
],
'category' => '<string>',
'assignee_user_id' => '<string>',
'due_on' => '2026-10-31',
'repeat' => [
'every' => 6
],
'title' => '<string>',
'page_url' => '<string>'
]
],
'project_id' => 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.peec.ai/customer/v1/actions/update"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.peec.ai/customer/v1/actions/update")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peec.ai/customer/v1/actions/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}"
response = http.request(request)
puts response.read_body{
"updated": [
{
"action_id": "<string>"
}
],
"skipped": [
{
"action_id": "<string>",
"reason": "not_found"
}
],
"rejected": [
{
"action_id": "<string>",
"reason": "duplicate_id",
"message": "<string>"
}
]
}Actions
Update Actions
Rewrite the fields a customer owns, on actions they wrote or ones Peec generated. An edit is stored beside the generated wording rather than in it, so a regeneration cannot discard it. Only a customer’s own action can change shape: the type and group of a generated one say what Peec found, and an item trying to move them lands in rejected. A field the item leaves out keeps what it held; null clears the ones that can be cleared, and an item naming no field at all is rejected rather than recorded as an edit. Ids the project publishes no action under are returned in skipped — the batch never fails as a whole. A content optimisation is reachable only on a project with content optimisation enabled; elsewhere its id is returned in skipped.
POST
/
actions
/
update
Update Actions
curl --request POST \
--url https://api.peec.ai/customer/v1/actions/update \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"actions": [
{
"action_id": "01a0422f-e0c4-7820-85a1-31515a321f15",
"notes": {
"text": "<string>",
"html": "<string>"
},
"topic_id": "to_a1b2c3",
"prompt_ids": [
"pr_a1b2c3"
],
"steps": [
{
"title": "Add a pricing comparison table",
"description": "<string>",
"completed": true,
"section": "Before publishing"
}
],
"country_codes": [
"<string>"
],
"language_codes": [
"<string>"
],
"tag_ids": [
"<string>"
],
"category": "<string>",
"assignee_user_id": "<string>",
"due_on": "2026-10-31",
"repeat": {
"every": 6
},
"title": "<string>",
"page_url": "<string>"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
'import requests
url = "https://api.peec.ai/customer/v1/actions/update"
payload = {
"actions": [
{
"action_id": "01a0422f-e0c4-7820-85a1-31515a321f15",
"notes": {
"text": "<string>",
"html": "<string>"
},
"topic_id": "to_a1b2c3",
"prompt_ids": ["pr_a1b2c3"],
"steps": [
{
"title": "Add a pricing comparison table",
"description": "<string>",
"completed": True,
"section": "Before publishing"
}
],
"country_codes": ["<string>"],
"language_codes": ["<string>"],
"tag_ids": ["<string>"],
"category": "<string>",
"assignee_user_id": "<string>",
"due_on": "2026-10-31",
"repeat": { "every": 6 },
"title": "<string>",
"page_url": "<string>"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [
{
action_id: '01a0422f-e0c4-7820-85a1-31515a321f15',
notes: {text: '<string>', html: '<string>'},
topic_id: 'to_a1b2c3',
prompt_ids: ['pr_a1b2c3'],
steps: [
{
title: 'Add a pricing comparison table',
description: '<string>',
completed: true,
section: 'Before publishing'
}
],
country_codes: ['<string>'],
language_codes: ['<string>'],
tag_ids: ['<string>'],
category: '<string>',
assignee_user_id: '<string>',
due_on: '2026-10-31',
repeat: {every: 6},
title: '<string>',
page_url: '<string>'
}
],
project_id: 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
})
};
fetch('https://api.peec.ai/customer/v1/actions/update', 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.peec.ai/customer/v1/actions/update",
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([
'actions' => [
[
'action_id' => '01a0422f-e0c4-7820-85a1-31515a321f15',
'notes' => [
'text' => '<string>',
'html' => '<string>'
],
'topic_id' => 'to_a1b2c3',
'prompt_ids' => [
'pr_a1b2c3'
],
'steps' => [
[
'title' => 'Add a pricing comparison table',
'description' => '<string>',
'completed' => true,
'section' => 'Before publishing'
]
],
'country_codes' => [
'<string>'
],
'language_codes' => [
'<string>'
],
'tag_ids' => [
'<string>'
],
'category' => '<string>',
'assignee_user_id' => '<string>',
'due_on' => '2026-10-31',
'repeat' => [
'every' => 6
],
'title' => '<string>',
'page_url' => '<string>'
]
],
'project_id' => 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.peec.ai/customer/v1/actions/update"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<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.peec.ai/customer/v1/actions/update")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peec.ai/customer/v1/actions/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"action_id\": \"01a0422f-e0c4-7820-85a1-31515a321f15\",\n \"notes\": {\n \"text\": \"<string>\",\n \"html\": \"<string>\"\n },\n \"topic_id\": \"to_a1b2c3\",\n \"prompt_ids\": [\n \"pr_a1b2c3\"\n ],\n \"steps\": [\n {\n \"title\": \"Add a pricing comparison table\",\n \"description\": \"<string>\",\n \"completed\": true,\n \"section\": \"Before publishing\"\n }\n ],\n \"country_codes\": [\n \"<string>\"\n ],\n \"language_codes\": [\n \"<string>\"\n ],\n \"tag_ids\": [\n \"<string>\"\n ],\n \"category\": \"<string>\",\n \"assignee_user_id\": \"<string>\",\n \"due_on\": \"2026-10-31\",\n \"repeat\": {\n \"every\": 6\n },\n \"title\": \"<string>\",\n \"page_url\": \"<string>\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}"
response = http.request(request)
puts response.read_body{
"updated": [
{
"action_id": "<string>"
}
],
"skipped": [
{
"action_id": "<string>",
"reason": "not_found"
}
],
"rejected": [
{
"action_id": "<string>",
"reason": "duplicate_id",
"message": "<string>"
}
]
}Authorizations
APIKeyHeaderAPIKeyQueryBearerAuth
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
