Create Actions
curl --request POST \
--url https://api.peec.ai/customer/v1/actions/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"actions": [
{
"title": "Add a pricing comparison table",
"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
},
"status": "PENDING",
"page_url": "https://example.com/pricing"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
'import requests
url = "https://api.peec.ai/customer/v1/actions/create"
payload = {
"actions": [
{
"title": "Add a pricing comparison table",
"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 },
"status": "PENDING",
"page_url": "https://example.com/pricing"
}
],
"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: [
{
title: 'Add a pricing comparison table',
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},
status: 'PENDING',
page_url: 'https://example.com/pricing'
}
],
project_id: 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
})
};
fetch('https://api.peec.ai/customer/v1/actions/create', 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/create",
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' => [
[
'title' => 'Add a pricing comparison table',
'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
],
'status' => 'PENDING',
'page_url' => 'https://example.com/pricing'
]
],
'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/create"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\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/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\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/create")
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 \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}"
response = http.request(request)
puts response.read_body{
"created": [
{
"index": 123,
"action_id": "<string>",
"title": "<string>"
}
],
"rejected": [
{
"index": 123,
"reason": "invalid",
"message": "<string>"
}
]
}Actions
Create Actions
Record work the customer decided to do themselves as actions, in the same shape as the ones Peec generates, so they sort, filter and move through the same statuses. The kind picked decides an action’s type and group. The linked topic and prompts are resolved against the project, and an item naming one it does not hold lands in rejected on its own — the batch never fails as a whole.
POST
/
actions
/
create
Create Actions
curl --request POST \
--url https://api.peec.ai/customer/v1/actions/create \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"actions": [
{
"title": "Add a pricing comparison table",
"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
},
"status": "PENDING",
"page_url": "https://example.com/pricing"
}
],
"project_id": "or_f45b94ba-5e35-4982-93ed-285e72ee14eb"
}
'import requests
url = "https://api.peec.ai/customer/v1/actions/create"
payload = {
"actions": [
{
"title": "Add a pricing comparison table",
"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 },
"status": "PENDING",
"page_url": "https://example.com/pricing"
}
],
"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: [
{
title: 'Add a pricing comparison table',
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},
status: 'PENDING',
page_url: 'https://example.com/pricing'
}
],
project_id: 'or_f45b94ba-5e35-4982-93ed-285e72ee14eb'
})
};
fetch('https://api.peec.ai/customer/v1/actions/create', 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/create",
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' => [
[
'title' => 'Add a pricing comparison table',
'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
],
'status' => 'PENDING',
'page_url' => 'https://example.com/pricing'
]
],
'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/create"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\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/create")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\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/create")
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 \"title\": \"Add a pricing comparison table\",\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 \"status\": \"PENDING\",\n \"page_url\": \"https://example.com/pricing\"\n }\n ],\n \"project_id\": \"or_f45b94ba-5e35-4982-93ed-285e72ee14eb\"\n}"
response = http.request(request)
puts response.read_body{
"created": [
{
"index": 123,
"action_id": "<string>",
"title": "<string>"
}
],
"rejected": [
{
"index": 123,
"reason": "invalid",
"message": "<string>"
}
]
}Authorizations
APIKeyHeaderAPIKeyQueryBearerAuth
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
