curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"intent": "",
"why_now": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/"
payload = {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"intent": "",
"why_now": "<string>"
}
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({
angle: '<string>',
audience: '<string>',
campaign_key: '<string>',
intent: '',
why_now: '<string>'
})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/', 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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/",
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([
'angle' => '<string>',
'audience' => '<string>',
'campaign_key' => '<string>',
'intent' => '',
'why_now' => '<string>'
]),
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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/"
payload := strings.NewReader("{\n \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/")
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 \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"campaign": {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"campaign_name": "<string>",
"chosen_by_person": true,
"intent": "<string>",
"step_notes": {},
"table_name": "<string>",
"tailoring_off": true,
"why_now": "<string>"
},
"in_flight": true,
"job": {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"campaign_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"status": "<string>",
"trigger": "<string>",
"why_now": "<string>",
"step_notes": [
"<string>"
],
"step_titles": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Tailor the sequence to its audience
Choose the library campaign that fits the sequence’s audience best and write its brief and step notes, in the background (about a minute). Pass the person’s own words about what the campaign is for as intent, a campaign_key to run a particular campaign, or brief lines to keep word for word. A draft nobody has edited takes the result straight away, its steps switching to the chosen campaign’s; an edited draft or a launched sequence gets it as a review to accept. Free, up to a daily number per workspace. Returns where tailoring stands; poll the tailoring read until it settles.
curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"intent": "",
"why_now": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/"
payload = {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"intent": "",
"why_now": "<string>"
}
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({
angle: '<string>',
audience: '<string>',
campaign_key: '<string>',
intent: '',
why_now: '<string>'
})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/', 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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/",
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([
'angle' => '<string>',
'audience' => '<string>',
'campaign_key' => '<string>',
'intent' => '',
'why_now' => '<string>'
]),
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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/"
payload := strings.NewReader("{\n \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\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.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/agent/tailor/")
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 \"angle\": \"<string>\",\n \"audience\": \"<string>\",\n \"campaign_key\": \"<string>\",\n \"intent\": \"\",\n \"why_now\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"campaign": {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"campaign_name": "<string>",
"chosen_by_person": true,
"intent": "<string>",
"step_notes": {},
"table_name": "<string>",
"tailoring_off": true,
"why_now": "<string>"
},
"in_flight": true,
"job": {
"angle": "<string>",
"audience": "<string>",
"campaign_key": "<string>",
"campaign_name": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "<string>",
"status": "<string>",
"trigger": "<string>",
"why_now": "<string>",
"step_notes": [
"<string>"
],
"step_titles": [
"<string>"
]
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
What a person asks of a tailoring: their own words, a campaign, and brief lines to keep.
The idea the campaign is built around, as the person wants it kept.
1 - 300Who the campaign writes to, as the person wants it kept.
1 - 300A campaign from the library to run, by key (see the outbound presets' campaigns). Omitted, tailoring chooses the one that fits the audience best.
64What the campaign is for, in the person's own words: an event, a launch, an offer, who to reach. The one part of a campaign an email may state as fact.
500Why this audience needs it now, as the person wants it kept.
1 - 300Response
Successful Response
Where a sequence's tailoring stands: the campaign it runs, and its newest job.
The campaign a sequence runs and the brief tailoring wrote for its audience.
Show child attributes
Show child attributes
A job is still working; launch waits for it.
One tailoring job: how far it got and what it chose.
Show child attributes
Show child attributes
Was this page helpful?