curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fresh": false,
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/"
payload = {
"fresh": False,
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({fresh: false, mailbox_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/', 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}/steps/{step_id}/rows/{record_id}/samples/",
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([
'fresh' => false,
'mailbox_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/steps/{step_id}/rows/{record_id}/samples/"
payload := strings.NewReader("{\n \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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}/steps/{step_id}/rows/{record_id}/samples/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/")
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 \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"in_thread": true,
"missing_columns": [
"<string>"
],
"subject": "<string>",
"agent_written": false,
"approved": false,
"closing": {
"opt_out_footer": "<string>",
"signature": "<string>"
},
"is_sample": false,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned": false,
"sample_created_at": "2023-11-07T05:31:56Z",
"sample_version": 123,
"sent": {
"body": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"subject": "<string>",
"email_html": "<string>"
},
"spam_findings": [
{
"code": "<string>",
"detail": "<string>",
"message": "<string>",
"severity": "<string>",
"title": "<string>",
"excerpt": "<string>",
"excerpts": [
"<string>"
]
}
],
"waiting_for_approval": false,
"written": true
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Write one contact's samples
Have the agent write this contact’s emails as samples, the way the real first send writes them, and answer this step as they would receive it. For a contact not written to yet the agent writes their whole sequence in one call and saves each step’s words as a sample, kept on the sequence’s AI writing tab; nobody receives a sample, and the real send is written fresh unless the thread is marked Looks good. A sample already saved for this step is answered as it is, unless fresh asks for the contact’s emails to be written again; words marked Looks good, or a person’s own words for the contact, stand and are answered as they are. Each step written counts against the workspace’s daily preview allowance; it costs no credits. GET /sequences/{sequence_id}/steps/{step_id}/preview/ shows what is saved without writing.
curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"fresh": false,
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/"
payload = {
"fresh": False,
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({fresh: false, mailbox_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/', 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}/steps/{step_id}/rows/{record_id}/samples/",
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([
'fresh' => false,
'mailbox_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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}/steps/{step_id}/rows/{record_id}/samples/"
payload := strings.NewReader("{\n \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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}/steps/{step_id}/rows/{record_id}/samples/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/")
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 \"fresh\": false,\n \"mailbox_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"in_thread": true,
"missing_columns": [
"<string>"
],
"subject": "<string>",
"agent_written": false,
"approved": false,
"closing": {
"opt_out_footer": "<string>",
"signature": "<string>"
},
"is_sample": false,
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pinned": false,
"sample_created_at": "2023-11-07T05:31:56Z",
"sample_version": 123,
"sent": {
"body": "<string>",
"sent_at": "2023-11-07T05:31:56Z",
"subject": "<string>",
"email_html": "<string>"
},
"spam_findings": [
{
"code": "<string>",
"detail": "<string>",
"message": "<string>",
"severity": "<string>",
"title": "<string>",
"excerpt": "<string>",
"excerpts": [
"<string>"
]
}
],
"waiting_for_approval": false,
"written": true
}{
"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 writing one contact's samples takes: whether to write them again, and as whom.
Write this contact's emails again rather than answer the sample already saved, as when someone asks for them to be written again. Words marked Looks good, and a person's own words, still stand.
The mailbox whose sender's name, title and booking link fill the sender variables; left out, the sequence's first sender's, the sender a sample is written as.
Response
Successful Response
The agent wrote this for the contact. A preview is one draft; the real send is written fresh, unless approved.
The words were marked Looks good, with the contact's thread on the AI writing tab or as this one email from the Builder, and still stand, so they are what sends. They stop standing, and the agent writes the step fresh, once the agent's writing or the contact's row changes.
What the send adds below these words, the sender's signature and then the opt-out footer, one blank line apart, so the email can be shown whole as the contact will get it. Set by the preview routes on an email step.
Show child attributes
Show child attributes
The agent's message these words are, on an agent-written step: the sample on screen, or the one marked Looks good. Marking it Looks good (PUT /sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/feedback/) takes it back as message_id, so a mark lands only on the words that were read.
The words are pinned for this contact by a person (their own edit) or by the approval queue, and send exactly as they are. A thread marked Looks good is approved instead.
The email this step already got out to this contact, as it went, when one did: what they received, whoever wrote it, rather than the words above. Set by the preview and samples routes; null when the step has not reached them.
Show child attributes
Show child attributes
The spam check and the placeholder scan, run on the agent's words for this contact. Always empty for a written step, whose text the composer's own check covers. Advice, never a refusal.
Show child attributes
Show child attributes
This contact's message at this step waits for a person's approval on its Tasks card, where its words are changed, approved or rejected. Set by the preview and samples routes; false once the card is decided, or when the step never asked.
False only when nothing is written for this contact at this step yet, which the step's preview shows rather than writes: subject and body are empty. POST /sequences/{sequence_id}/steps/{step_id}/rows/{record_id}/samples/ has the agent write it.
Was this page helpful?