Record a judgment call
curl --request POST \
--url https://app.pepline.ai/api/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>",
"answer": "<string>",
"options": [
"<string>"
],
"reason": "<string>"
}
'import requests
url = "https://app.pepline.ai/api/v1/decisions"
payload = {
"question": "<string>",
"answer": "<string>",
"options": ["<string>"],
"reason": "<string>"
}
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({
question: '<string>',
answer: '<string>',
options: ['<string>'],
reason: '<string>'
})
};
fetch('https://app.pepline.ai/api/v1/decisions', 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://app.pepline.ai/api/v1/decisions",
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([
'question' => '<string>',
'answer' => '<string>',
'options' => [
'<string>'
],
'reason' => '<string>'
]),
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://app.pepline.ai/api/v1/decisions"
payload := strings.NewReader("{\n \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\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://app.pepline.ai/api/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/decisions")
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 \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "curation_receipt",
"id": 123,
"kind": "<string>",
"actor": "operator",
"created_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"subject": {
"type": "<string>",
"id": 123
},
"assistant_thread_id": 123,
"before": {},
"after": {}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Onboarding
Record a judgment call
The question, the options weighed, the answer taken and why — a curation receipt of kind decision, the record the business owner reads on the handoff page. Actor from the credential (or agent inside an assistant turn).
POST
/
decisions
Record a judgment call
curl --request POST \
--url https://app.pepline.ai/api/v1/decisions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>",
"answer": "<string>",
"options": [
"<string>"
],
"reason": "<string>"
}
'import requests
url = "https://app.pepline.ai/api/v1/decisions"
payload = {
"question": "<string>",
"answer": "<string>",
"options": ["<string>"],
"reason": "<string>"
}
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({
question: '<string>',
answer: '<string>',
options: ['<string>'],
reason: '<string>'
})
};
fetch('https://app.pepline.ai/api/v1/decisions', 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://app.pepline.ai/api/v1/decisions",
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([
'question' => '<string>',
'answer' => '<string>',
'options' => [
'<string>'
],
'reason' => '<string>'
]),
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://app.pepline.ai/api/v1/decisions"
payload := strings.NewReader("{\n \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\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://app.pepline.ai/api/v1/decisions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.pepline.ai/api/v1/decisions")
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 \"question\": \"<string>\",\n \"answer\": \"<string>\",\n \"options\": [\n \"<string>\"\n ],\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"object": "curation_receipt",
"id": 123,
"kind": "<string>",
"actor": "operator",
"created_at": "2023-11-07T05:31:56Z",
"reason": "<string>",
"subject": {
"type": "<string>",
"id": 123
},
"assistant_thread_id": 123,
"before": {},
"after": {}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "missing_api_key",
"message": "<string>",
"param": "<string>"
}
}Authorizations
Your secret key (pep_sk_…) from Settings → API. Keys are org-scoped; treat them like passwords.
Response
The receipt.
Allowed value:
"curation_receipt"Available options:
operator, agent, owner Show child attributes
Show child attributes
Set when pepline's assistant wrote it (actor agent).

