curl --request POST \
--url https://api.example.com/api/v1/content/person-voice/auto-derive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/content/person-voice/auto-derive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/content/person-voice/auto-derive', 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.example.com/api/v1/content/person-voice/auto-derive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/content/person-voice/auto-derive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/v1/content/person-voice/auto-derive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/content/person-voice/auto-derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"voice": {
"tone": "",
"style": "",
"topics": [
"<string>"
],
"do_guidelines": [
"<string>"
],
"dont_guidelines": [
"<string>"
],
"sample_snippets": [
"<string>"
],
"linkedin_arm_status": "<string>",
"linkedin_arm_detail": "<string>",
"x_arm_status": "<string>",
"x_arm_detail": "<string>",
"derived_at": "2023-11-07T05:31:56Z",
"manually_edited_at": "2023-11-07T05:31:56Z",
"derivation_version": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"linkedin_arm_status": "<string>",
"x_arm_status": "<string>",
"skipped_user_edited": false,
"linkedin_arm_detail": "",
"x_arm_detail": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Auto Derive And Save Person Voice
Auto-build (or re-derive) AND PERSIST the authenticated user’s person voice.
The time-to-value auto-build the FE Voice page calls when no voice exists. Flow:
- NO-CLOBBER pre-check: if a row already exists with
manually_edited_atset (the user edited it), a NORMAL call returns the EXISTING row untouched withskipped_user_edited=true.?force=trueoverrides and re-derives. - Derive the draft via
ContentVoiceAutoDeriveService(V2.1a, READ-ONLY + fail-soft: never raises; each arm carries its own rich status). - MAP the rich arm statuses to the migration-249 CHECK vocabulary before persisting:
LinkedIn is already ok/absent/error (pass-through); X collapses derived->ok,
->absent, needs_reauth->error. The
ORIGINAL rich reason is preserved in
*_arm_detailso the FE keeps the nuance. - Upsert the voice fields + MAPPED arm statuses +
derived_at=now()+ a bumpedderivation_version.manually_edited_atis NOT set (a derive is not a user edit). FAIL-SOFT: the derive never raises; an upsert failure surfaces a clear 502 (from the service) rather than a cryptic 500.
The response body echoes the RICH X status (the FE keeps the nuance) while the column
stores the mapped CHECK value; voice carries the persisted (mapped) row.
user_id is the authenticated actor (org_context.user_id), never a client
param — a caller can only ever derive/persist their OWN voice.
curl --request POST \
--url https://api.example.com/api/v1/content/person-voice/auto-derive \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/content/person-voice/auto-derive"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/content/person-voice/auto-derive', 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.example.com/api/v1/content/person-voice/auto-derive",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/content/person-voice/auto-derive"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.example.com/api/v1/content/person-voice/auto-derive")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/content/person-voice/auto-derive")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"voice": {
"tone": "",
"style": "",
"topics": [
"<string>"
],
"do_guidelines": [
"<string>"
],
"dont_guidelines": [
"<string>"
],
"sample_snippets": [
"<string>"
],
"linkedin_arm_status": "<string>",
"linkedin_arm_detail": "<string>",
"x_arm_status": "<string>",
"x_arm_detail": "<string>",
"derived_at": "2023-11-07T05:31:56Z",
"manually_edited_at": "2023-11-07T05:31:56Z",
"derivation_version": 123,
"updated_at": "2023-11-07T05:31:56Z"
},
"linkedin_arm_status": "<string>",
"x_arm_status": "<string>",
"skipped_user_edited": false,
"linkedin_arm_detail": "",
"x_arm_detail": ""
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Re-derive and overwrite even a manually-edited voice. Default false no-clobbers a user-edited voice (returns it untouched).
Response
Successful Response
Result of the auto-derive-and-save (POST). voice is the persisted row (or, on
a no-clobber skip, the EXISTING user-edited row). skipped_user_edited is true when
a normal call left a manually-edited voice untouched. The per-arm status echoes the
RICH X status (derived / no_connection / needs_reauth / empty_timeline / unavailable)
- the collapsed LinkedIn status (ok / absent / error) so the FE keeps the nuance even though the persisted column stores the mapped CHECK value.
The persisted PERSON voice (+ per-arm status + provenance). updated_at null
means no row yet -- the FE auto-derive-and-saves on first load. The arm-status
columns are the migration-249 CHECK vocabulary ('ok'/'absent'/'error') and may be
null until a derive has run; the *_arm_detail carry the original rich reason.
Show child attributes
Show child attributes