curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"changes": {
"expected_updated_at": "2023-11-07T05:31:56Z",
"agent": {
"expected_version": 2,
"config": {
"campaign": {
"campaign_key": "<string>",
"angle": "",
"audience": "",
"chosen_by_person": false,
"goal": "",
"intent": "",
"minted": [
"<string>"
],
"reason": "",
"step_notes": {},
"table_name": "",
"tailoring_off": false,
"why_now": "<string>"
},
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "English",
"message_prompts": {},
"person_research": false,
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false,
"write_from_excluded_column_ids": [
"<string>"
]
},
"model_key": "<string>",
"research": true
},
"audience": {
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"existing_contacts": "keep",
"expected_updated_at": "2023-11-07T05:31:56Z",
"pause_if_running": false,
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"copy_from_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_agent_version": 123,
"graph": {
"edges": [
{
"branch": "default",
"from_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expected_updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_prompt_key": "<string>",
"agent_subject": false,
"authoring": "written",
"body_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"required": true,
"text": ""
}
],
"condition_window_days": 45,
"position": 0,
"prompt": "",
"reply_to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requires_approval": false,
"subject_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"required": true,
"text": ""
}
],
"title": "<string>",
"wait_amount": 0,
"wait_unit": "days"
}
]
},
"mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"prompt_proposal": {
"base_version": 2,
"items": {},
"feedback_cutoff": "2023-11-07T05:31:56Z",
"feedback_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"restore_version": 2,
"review_token": "<string>",
"sender_profile_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"settings": {
"bcc_addresses": [
"<string>"
],
"cc_addresses": [
"<string>"
],
"continuous_enrolment": true,
"email_approval_mode": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z",
"linkedin_approval_mode": "<string>",
"linkedin_check_max_seconds": 123,
"linkedin_check_min_seconds": 123,
"multithreading": {},
"name": "<string>",
"opportunity_values": {},
"opt_out_footer_text": "<string>",
"plain_text_only": true,
"sending_priority": "<string>",
"sending_window": {
"days": {
"fri": {
"end": "<string>",
"start": "<string>"
},
"mon": {
"end": "<string>",
"start": "<string>"
},
"sat": {
"end": "<string>",
"start": "<string>"
},
"sun": {
"end": "<string>",
"start": "<string>"
},
"thu": {
"end": "<string>",
"start": "<string>"
},
"tue": {
"end": "<string>",
"start": "<string>"
},
"wed": {
"end": "<string>",
"start": "<string>"
}
},
"min_interval_minutes": 120,
"sender_timezone": true,
"timezone": "<string>"
},
"spending_limit_tenths": 500000000
},
"training_revision": 123,
"training_rewrite": false,
"training_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"training_slot_keys": [
"<string>"
]
},
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"candidate_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"write": true
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/"
payload = {
"changes": {
"expected_updated_at": "2023-11-07T05:31:56Z",
"agent": {
"expected_version": 2,
"config": {
"campaign": {
"campaign_key": "<string>",
"angle": "",
"audience": "",
"chosen_by_person": False,
"goal": "",
"intent": "",
"minted": ["<string>"],
"reason": "",
"step_notes": {},
"table_name": "",
"tailoring_off": False,
"why_now": "<string>"
},
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "English",
"message_prompts": {},
"person_research": False,
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": True,
"reply_prompt": "",
"translate": False,
"write_from_excluded_column_ids": ["<string>"]
},
"model_key": "<string>",
"research": True
},
"audience": {
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"existing_contacts": "keep",
"expected_updated_at": "2023-11-07T05:31:56Z",
"pause_if_running": False,
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"copy_from_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_agent_version": 123,
"graph": {
"edges": [
{
"branch": "default",
"from_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expected_updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_prompt_key": "<string>",
"agent_subject": False,
"authoring": "written",
"body_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"required": True,
"text": ""
}
],
"condition_window_days": 45,
"position": 0,
"prompt": "",
"reply_to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requires_approval": False,
"subject_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"required": True,
"text": ""
}
],
"title": "<string>",
"wait_amount": 0,
"wait_unit": "days"
}
]
},
"mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"prompt_proposal": {
"base_version": 2,
"items": {},
"feedback_cutoff": "2023-11-07T05:31:56Z",
"feedback_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"restore_version": 2,
"review_token": "<string>",
"sender_profile_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"settings": {
"bcc_addresses": ["<string>"],
"cc_addresses": ["<string>"],
"continuous_enrolment": True,
"email_approval_mode": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z",
"linkedin_approval_mode": "<string>",
"linkedin_check_max_seconds": 123,
"linkedin_check_min_seconds": 123,
"multithreading": {},
"name": "<string>",
"opportunity_values": {},
"opt_out_footer_text": "<string>",
"plain_text_only": True,
"sending_priority": "<string>",
"sending_window": {
"days": {
"fri": {
"end": "<string>",
"start": "<string>"
},
"mon": {
"end": "<string>",
"start": "<string>"
},
"sat": {
"end": "<string>",
"start": "<string>"
},
"sun": {
"end": "<string>",
"start": "<string>"
},
"thu": {
"end": "<string>",
"start": "<string>"
},
"tue": {
"end": "<string>",
"start": "<string>"
},
"wed": {
"end": "<string>",
"start": "<string>"
}
},
"min_interval_minutes": 120,
"sender_timezone": True,
"timezone": "<string>"
},
"spending_limit_tenths": 500000000
},
"training_revision": 123,
"training_rewrite": False,
"training_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"training_slot_keys": ["<string>"]
},
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"candidate_record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"write": True
}
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({
changes: {
expected_updated_at: '2023-11-07T05:31:56Z',
agent: {
expected_version: 2,
config: {
campaign: {
campaign_key: '<string>',
angle: '',
audience: '',
chosen_by_person: false,
goal: '',
intent: '',
minted: ['<string>'],
reason: '',
step_notes: {},
table_name: '',
tailoring_off: false,
why_now: '<string>'
},
cta_label: '<string>',
cta_url: '<string>',
goal: '',
language: 'English',
message_prompts: {},
person_research: false,
personality_preset: 'direct',
personality_prompt: '',
reply_drafting: true,
reply_prompt: '',
translate: false,
write_from_excluded_column_ids: ['<string>']
},
model_key: '<string>',
research: true
},
audience: {
table_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
column_mapping: {
company_domain_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_results: [],
linkedin_url_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
existing_contacts: 'keep',
expected_updated_at: '2023-11-07T05:31:56Z',
pause_if_running: false,
view_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
copy_from_sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_agent_version: 123,
graph: {
edges: [
{
branch: 'default',
from_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
expected_updated_at: '2023-11-07T05:31:56Z',
steps: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_prompt_key: '<string>',
agent_subject: false,
authoring: 'written',
body_segments: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
required: true,
text: ''
}
],
condition_window_days: 45,
position: 0,
prompt: '',
reply_to_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
requires_approval: false,
subject_segments: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
required: true,
text: ''
}
],
title: '<string>',
wait_amount: 0,
wait_unit: 'days'
}
]
},
mapping: {
company_domain_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_results: [],
linkedin_url_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
prompt_proposal: {
base_version: 2,
items: {},
feedback_cutoff: '2023-11-07T05:31:56Z',
feedback_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
restore_version: 2,
review_token: '<string>',
sender_profile_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
settings: {
bcc_addresses: ['<string>'],
cc_addresses: ['<string>'],
continuous_enrolment: true,
email_approval_mode: '<string>',
expected_updated_at: '2023-11-07T05:31:56Z',
linkedin_approval_mode: '<string>',
linkedin_check_max_seconds: 123,
linkedin_check_min_seconds: 123,
multithreading: {},
name: '<string>',
opportunity_values: {},
opt_out_footer_text: '<string>',
plain_text_only: true,
sending_priority: '<string>',
sending_window: {
days: {
fri: {end: '<string>', start: '<string>'},
mon: {end: '<string>', start: '<string>'},
sat: {end: '<string>', start: '<string>'},
sun: {end: '<string>', start: '<string>'},
thu: {end: '<string>', start: '<string>'},
tue: {end: '<string>', start: '<string>'},
wed: {end: '<string>', start: '<string>'}
},
min_interval_minutes: 120,
sender_timezone: true,
timezone: '<string>'
},
spending_limit_tenths: 500000000
},
training_revision: 123,
training_rewrite: false,
training_session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
training_slot_keys: ['<string>']
},
record_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
candidate_record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
write: true
})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/', 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}/changes/step-preview/",
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([
'changes' => [
'expected_updated_at' => '2023-11-07T05:31:56Z',
'agent' => [
'expected_version' => 2,
'config' => [
'campaign' => [
'campaign_key' => '<string>',
'angle' => '',
'audience' => '',
'chosen_by_person' => false,
'goal' => '',
'intent' => '',
'minted' => [
'<string>'
],
'reason' => '',
'step_notes' => [
],
'table_name' => '',
'tailoring_off' => false,
'why_now' => '<string>'
],
'cta_label' => '<string>',
'cta_url' => '<string>',
'goal' => '',
'language' => 'English',
'message_prompts' => [
],
'person_research' => false,
'personality_preset' => 'direct',
'personality_prompt' => '',
'reply_drafting' => true,
'reply_prompt' => '',
'translate' => false,
'write_from_excluded_column_ids' => [
'<string>'
]
],
'model_key' => '<string>',
'research' => true
],
'audience' => [
'table_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'column_mapping' => [
'company_domain_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_results' => [
],
'linkedin_url_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'existing_contacts' => 'keep',
'expected_updated_at' => '2023-11-07T05:31:56Z',
'pause_if_running' => false,
'view_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'copy_from_sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expected_agent_version' => 123,
'graph' => [
'edges' => [
[
'branch' => 'default',
'from_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'expected_updated_at' => '2023-11-07T05:31:56Z',
'steps' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_prompt_key' => '<string>',
'agent_subject' => false,
'authoring' => 'written',
'body_segments' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'required' => true,
'text' => ''
]
],
'condition_window_days' => 45,
'position' => 0,
'prompt' => '',
'reply_to_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'requires_approval' => false,
'subject_segments' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'required' => true,
'text' => ''
]
],
'title' => '<string>',
'wait_amount' => 0,
'wait_unit' => 'days'
]
]
],
'mapping' => [
'company_domain_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_results' => [
],
'linkedin_url_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'prompt_proposal' => [
'base_version' => 2,
'items' => [
],
'feedback_cutoff' => '2023-11-07T05:31:56Z',
'feedback_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'restore_version' => 2,
'review_token' => '<string>',
'sender_profile_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'settings' => [
'bcc_addresses' => [
'<string>'
],
'cc_addresses' => [
'<string>'
],
'continuous_enrolment' => true,
'email_approval_mode' => '<string>',
'expected_updated_at' => '2023-11-07T05:31:56Z',
'linkedin_approval_mode' => '<string>',
'linkedin_check_max_seconds' => 123,
'linkedin_check_min_seconds' => 123,
'multithreading' => [
],
'name' => '<string>',
'opportunity_values' => [
],
'opt_out_footer_text' => '<string>',
'plain_text_only' => true,
'sending_priority' => '<string>',
'sending_window' => [
'days' => [
'fri' => [
'end' => '<string>',
'start' => '<string>'
],
'mon' => [
'end' => '<string>',
'start' => '<string>'
],
'sat' => [
'end' => '<string>',
'start' => '<string>'
],
'sun' => [
'end' => '<string>',
'start' => '<string>'
],
'thu' => [
'end' => '<string>',
'start' => '<string>'
],
'tue' => [
'end' => '<string>',
'start' => '<string>'
],
'wed' => [
'end' => '<string>',
'start' => '<string>'
]
],
'min_interval_minutes' => 120,
'sender_timezone' => true,
'timezone' => '<string>'
],
'spending_limit_tenths' => 500000000
],
'training_revision' => 123,
'training_rewrite' => false,
'training_session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'training_slot_keys' => [
'<string>'
]
],
'record_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'candidate_record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'write' => true
]),
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}/changes/step-preview/"
payload := strings.NewReader("{\n \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\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}/changes/step-preview/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/")
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 \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\n}"
response = http.request(request)
puts response.read_body{
"changed": true,
"message": {
"body": "<string>",
"in_thread": true,
"missing_columns": [
"<string>"
],
"subject": "<string>",
"agent_written": false,
"approved": false,
"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>"
},
"spam_findings": [
{
"code": "<string>",
"detail": "<string>",
"message": "<string>",
"severity": "<string>",
"title": "<string>",
"excerpt": "<string>",
"excerpts": [
"<string>"
]
}
],
"waiting_for_approval": false,
"written": true
},
"reaches": true,
"sent_at": "2023-11-07T05:31:56Z",
"suggested_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Preview one step for one contact with the waiting changes
The step as the contact would get it once the change set is applied, applying nothing and saving nothing. Nothing is written while the changes leave the step’s words as they are or the contact keeps the words they have (changed false), or when another contact of candidate_record_ids is offered in place of one the changes do not reach. A step the agent writes is written again from the changes, spending one of the day’s free previews per step written; the words are kept for 30 minutes for this contact and these changes, so another step’s Preview and a test send read them and spend nothing.
curl --request POST \
--url https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"changes": {
"expected_updated_at": "2023-11-07T05:31:56Z",
"agent": {
"expected_version": 2,
"config": {
"campaign": {
"campaign_key": "<string>",
"angle": "",
"audience": "",
"chosen_by_person": false,
"goal": "",
"intent": "",
"minted": [
"<string>"
],
"reason": "",
"step_notes": {},
"table_name": "",
"tailoring_off": false,
"why_now": "<string>"
},
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "English",
"message_prompts": {},
"person_research": false,
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": true,
"reply_prompt": "",
"translate": false,
"write_from_excluded_column_ids": [
"<string>"
]
},
"model_key": "<string>",
"research": true
},
"audience": {
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"existing_contacts": "keep",
"expected_updated_at": "2023-11-07T05:31:56Z",
"pause_if_running": false,
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"copy_from_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_agent_version": 123,
"graph": {
"edges": [
{
"branch": "default",
"from_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expected_updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_prompt_key": "<string>",
"agent_subject": false,
"authoring": "written",
"body_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"required": true,
"text": ""
}
],
"condition_window_days": 45,
"position": 0,
"prompt": "",
"reply_to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requires_approval": false,
"subject_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"required": true,
"text": ""
}
],
"title": "<string>",
"wait_amount": 0,
"wait_unit": "days"
}
]
},
"mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"prompt_proposal": {
"base_version": 2,
"items": {},
"feedback_cutoff": "2023-11-07T05:31:56Z",
"feedback_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"restore_version": 2,
"review_token": "<string>",
"sender_profile_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"settings": {
"bcc_addresses": [
"<string>"
],
"cc_addresses": [
"<string>"
],
"continuous_enrolment": true,
"email_approval_mode": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z",
"linkedin_approval_mode": "<string>",
"linkedin_check_max_seconds": 123,
"linkedin_check_min_seconds": 123,
"multithreading": {},
"name": "<string>",
"opportunity_values": {},
"opt_out_footer_text": "<string>",
"plain_text_only": true,
"sending_priority": "<string>",
"sending_window": {
"days": {
"fri": {
"end": "<string>",
"start": "<string>"
},
"mon": {
"end": "<string>",
"start": "<string>"
},
"sat": {
"end": "<string>",
"start": "<string>"
},
"sun": {
"end": "<string>",
"start": "<string>"
},
"thu": {
"end": "<string>",
"start": "<string>"
},
"tue": {
"end": "<string>",
"start": "<string>"
},
"wed": {
"end": "<string>",
"start": "<string>"
}
},
"min_interval_minutes": 120,
"sender_timezone": true,
"timezone": "<string>"
},
"spending_limit_tenths": 500000000
},
"training_revision": 123,
"training_rewrite": false,
"training_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"training_slot_keys": [
"<string>"
]
},
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"candidate_record_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"write": true
}
'import requests
url = "https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/"
payload = {
"changes": {
"expected_updated_at": "2023-11-07T05:31:56Z",
"agent": {
"expected_version": 2,
"config": {
"campaign": {
"campaign_key": "<string>",
"angle": "",
"audience": "",
"chosen_by_person": False,
"goal": "",
"intent": "",
"minted": ["<string>"],
"reason": "",
"step_notes": {},
"table_name": "",
"tailoring_off": False,
"why_now": "<string>"
},
"cta_label": "<string>",
"cta_url": "<string>",
"goal": "",
"language": "English",
"message_prompts": {},
"person_research": False,
"personality_preset": "direct",
"personality_prompt": "",
"reply_drafting": True,
"reply_prompt": "",
"translate": False,
"write_from_excluded_column_ids": ["<string>"]
},
"model_key": "<string>",
"research": True
},
"audience": {
"table_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"column_mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"existing_contacts": "keep",
"expected_updated_at": "2023-11-07T05:31:56Z",
"pause_if_running": False,
"view_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"copy_from_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"expected_agent_version": 123,
"graph": {
"edges": [
{
"branch": "default",
"from_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"expected_updated_at": "2023-11-07T05:31:56Z",
"steps": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_prompt_key": "<string>",
"agent_subject": False,
"authoring": "written",
"body_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"required": True,
"text": ""
}
],
"condition_window_days": 45,
"position": 0,
"prompt": "",
"reply_to_step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"requires_approval": False,
"subject_segments": [
{
"column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"required": True,
"text": ""
}
],
"title": "<string>",
"wait_amount": 0,
"wait_unit": "days"
}
]
},
"mapping": {
"company_domain_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email_deliverability_results": [],
"linkedin_url_column_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"prompt_proposal": {
"base_version": 2,
"items": {},
"feedback_cutoff": "2023-11-07T05:31:56Z",
"feedback_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
},
"restore_version": 2,
"review_token": "<string>",
"sender_profile_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"settings": {
"bcc_addresses": ["<string>"],
"cc_addresses": ["<string>"],
"continuous_enrolment": True,
"email_approval_mode": "<string>",
"expected_updated_at": "2023-11-07T05:31:56Z",
"linkedin_approval_mode": "<string>",
"linkedin_check_max_seconds": 123,
"linkedin_check_min_seconds": 123,
"multithreading": {},
"name": "<string>",
"opportunity_values": {},
"opt_out_footer_text": "<string>",
"plain_text_only": True,
"sending_priority": "<string>",
"sending_window": {
"days": {
"fri": {
"end": "<string>",
"start": "<string>"
},
"mon": {
"end": "<string>",
"start": "<string>"
},
"sat": {
"end": "<string>",
"start": "<string>"
},
"sun": {
"end": "<string>",
"start": "<string>"
},
"thu": {
"end": "<string>",
"start": "<string>"
},
"tue": {
"end": "<string>",
"start": "<string>"
},
"wed": {
"end": "<string>",
"start": "<string>"
}
},
"min_interval_minutes": 120,
"sender_timezone": True,
"timezone": "<string>"
},
"spending_limit_tenths": 500000000
},
"training_revision": 123,
"training_rewrite": False,
"training_session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"training_slot_keys": ["<string>"]
},
"record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"candidate_record_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"write": True
}
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({
changes: {
expected_updated_at: '2023-11-07T05:31:56Z',
agent: {
expected_version: 2,
config: {
campaign: {
campaign_key: '<string>',
angle: '',
audience: '',
chosen_by_person: false,
goal: '',
intent: '',
minted: ['<string>'],
reason: '',
step_notes: {},
table_name: '',
tailoring_off: false,
why_now: '<string>'
},
cta_label: '<string>',
cta_url: '<string>',
goal: '',
language: 'English',
message_prompts: {},
person_research: false,
personality_preset: 'direct',
personality_prompt: '',
reply_drafting: true,
reply_prompt: '',
translate: false,
write_from_excluded_column_ids: ['<string>']
},
model_key: '<string>',
research: true
},
audience: {
table_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
column_mapping: {
company_domain_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_results: [],
linkedin_url_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
existing_contacts: 'keep',
expected_updated_at: '2023-11-07T05:31:56Z',
pause_if_running: false,
view_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
copy_from_sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
expected_agent_version: 123,
graph: {
edges: [
{
branch: 'default',
from_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
expected_updated_at: '2023-11-07T05:31:56Z',
steps: [
{
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_prompt_key: '<string>',
agent_subject: false,
authoring: 'written',
body_segments: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
required: true,
text: ''
}
],
condition_window_days: 45,
position: 0,
prompt: '',
reply_to_step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
requires_approval: false,
subject_segments: [
{
column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
required: true,
text: ''
}
],
title: '<string>',
wait_amount: 0,
wait_unit: 'days'
}
]
},
mapping: {
company_domain_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
email_deliverability_results: [],
linkedin_url_column_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
},
prompt_proposal: {
base_version: 2,
items: {},
feedback_cutoff: '2023-11-07T05:31:56Z',
feedback_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
},
restore_version: 2,
review_token: '<string>',
sender_profile_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
settings: {
bcc_addresses: ['<string>'],
cc_addresses: ['<string>'],
continuous_enrolment: true,
email_approval_mode: '<string>',
expected_updated_at: '2023-11-07T05:31:56Z',
linkedin_approval_mode: '<string>',
linkedin_check_max_seconds: 123,
linkedin_check_min_seconds: 123,
multithreading: {},
name: '<string>',
opportunity_values: {},
opt_out_footer_text: '<string>',
plain_text_only: true,
sending_priority: '<string>',
sending_window: {
days: {
fri: {end: '<string>', start: '<string>'},
mon: {end: '<string>', start: '<string>'},
sat: {end: '<string>', start: '<string>'},
sun: {end: '<string>', start: '<string>'},
thu: {end: '<string>', start: '<string>'},
tue: {end: '<string>', start: '<string>'},
wed: {end: '<string>', start: '<string>'}
},
min_interval_minutes: 120,
sender_timezone: true,
timezone: '<string>'
},
spending_limit_tenths: 500000000
},
training_revision: 123,
training_rewrite: false,
training_session_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
training_slot_keys: ['<string>']
},
record_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
step_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
candidate_record_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
write: true
})
};
fetch('https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/', 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}/changes/step-preview/",
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([
'changes' => [
'expected_updated_at' => '2023-11-07T05:31:56Z',
'agent' => [
'expected_version' => 2,
'config' => [
'campaign' => [
'campaign_key' => '<string>',
'angle' => '',
'audience' => '',
'chosen_by_person' => false,
'goal' => '',
'intent' => '',
'minted' => [
'<string>'
],
'reason' => '',
'step_notes' => [
],
'table_name' => '',
'tailoring_off' => false,
'why_now' => '<string>'
],
'cta_label' => '<string>',
'cta_url' => '<string>',
'goal' => '',
'language' => 'English',
'message_prompts' => [
],
'person_research' => false,
'personality_preset' => 'direct',
'personality_prompt' => '',
'reply_drafting' => true,
'reply_prompt' => '',
'translate' => false,
'write_from_excluded_column_ids' => [
'<string>'
]
],
'model_key' => '<string>',
'research' => true
],
'audience' => [
'table_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'column_mapping' => [
'company_domain_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_results' => [
],
'linkedin_url_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'existing_contacts' => 'keep',
'expected_updated_at' => '2023-11-07T05:31:56Z',
'pause_if_running' => false,
'view_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'copy_from_sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'expected_agent_version' => 123,
'graph' => [
'edges' => [
[
'branch' => 'default',
'from_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'expected_updated_at' => '2023-11-07T05:31:56Z',
'steps' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_prompt_key' => '<string>',
'agent_subject' => false,
'authoring' => 'written',
'body_segments' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'required' => true,
'text' => ''
]
],
'condition_window_days' => 45,
'position' => 0,
'prompt' => '',
'reply_to_step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'requires_approval' => false,
'subject_segments' => [
[
'column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'required' => true,
'text' => ''
]
],
'title' => '<string>',
'wait_amount' => 0,
'wait_unit' => 'days'
]
]
],
'mapping' => [
'company_domain_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'email_deliverability_results' => [
],
'linkedin_url_column_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'prompt_proposal' => [
'base_version' => 2,
'items' => [
],
'feedback_cutoff' => '2023-11-07T05:31:56Z',
'feedback_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'restore_version' => 2,
'review_token' => '<string>',
'sender_profile_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'settings' => [
'bcc_addresses' => [
'<string>'
],
'cc_addresses' => [
'<string>'
],
'continuous_enrolment' => true,
'email_approval_mode' => '<string>',
'expected_updated_at' => '2023-11-07T05:31:56Z',
'linkedin_approval_mode' => '<string>',
'linkedin_check_max_seconds' => 123,
'linkedin_check_min_seconds' => 123,
'multithreading' => [
],
'name' => '<string>',
'opportunity_values' => [
],
'opt_out_footer_text' => '<string>',
'plain_text_only' => true,
'sending_priority' => '<string>',
'sending_window' => [
'days' => [
'fri' => [
'end' => '<string>',
'start' => '<string>'
],
'mon' => [
'end' => '<string>',
'start' => '<string>'
],
'sat' => [
'end' => '<string>',
'start' => '<string>'
],
'sun' => [
'end' => '<string>',
'start' => '<string>'
],
'thu' => [
'end' => '<string>',
'start' => '<string>'
],
'tue' => [
'end' => '<string>',
'start' => '<string>'
],
'wed' => [
'end' => '<string>',
'start' => '<string>'
]
],
'min_interval_minutes' => 120,
'sender_timezone' => true,
'timezone' => '<string>'
],
'spending_limit_tenths' => 500000000
],
'training_revision' => 123,
'training_rewrite' => false,
'training_session_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'training_slot_keys' => [
'<string>'
]
],
'record_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'step_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'candidate_record_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'write' => true
]),
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}/changes/step-preview/"
payload := strings.NewReader("{\n \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\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}/changes/step-preview/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/sequences/{sequence_id}/changes/step-preview/")
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 \"changes\": {\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"agent\": {\n \"expected_version\": 2,\n \"config\": {\n \"campaign\": {\n \"campaign_key\": \"<string>\",\n \"angle\": \"\",\n \"audience\": \"\",\n \"chosen_by_person\": false,\n \"goal\": \"\",\n \"intent\": \"\",\n \"minted\": [\n \"<string>\"\n ],\n \"reason\": \"\",\n \"step_notes\": {},\n \"table_name\": \"\",\n \"tailoring_off\": false,\n \"why_now\": \"<string>\"\n },\n \"cta_label\": \"<string>\",\n \"cta_url\": \"<string>\",\n \"goal\": \"\",\n \"language\": \"English\",\n \"message_prompts\": {},\n \"person_research\": false,\n \"personality_preset\": \"direct\",\n \"personality_prompt\": \"\",\n \"reply_drafting\": true,\n \"reply_prompt\": \"\",\n \"translate\": false,\n \"write_from_excluded_column_ids\": [\n \"<string>\"\n ]\n },\n \"model_key\": \"<string>\",\n \"research\": true\n },\n \"audience\": {\n \"table_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"column_mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"existing_contacts\": \"keep\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"pause_if_running\": false,\n \"view_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"copy_from_sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"expected_agent_version\": 123,\n \"graph\": {\n \"edges\": [\n {\n \"branch\": \"default\",\n \"from_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"steps\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_prompt_key\": \"<string>\",\n \"agent_subject\": false,\n \"authoring\": \"written\",\n \"body_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"condition_window_days\": 45,\n \"position\": 0,\n \"prompt\": \"\",\n \"reply_to_step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"requires_approval\": false,\n \"subject_segments\": [\n {\n \"column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"required\": true,\n \"text\": \"\"\n }\n ],\n \"title\": \"<string>\",\n \"wait_amount\": 0,\n \"wait_unit\": \"days\"\n }\n ]\n },\n \"mapping\": {\n \"company_domain_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"email_deliverability_results\": [],\n \"linkedin_url_column_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n },\n \"prompt_proposal\": {\n \"base_version\": 2,\n \"items\": {},\n \"feedback_cutoff\": \"2023-11-07T05:31:56Z\",\n \"feedback_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n },\n \"restore_version\": 2,\n \"review_token\": \"<string>\",\n \"sender_profile_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"settings\": {\n \"bcc_addresses\": [\n \"<string>\"\n ],\n \"cc_addresses\": [\n \"<string>\"\n ],\n \"continuous_enrolment\": true,\n \"email_approval_mode\": \"<string>\",\n \"expected_updated_at\": \"2023-11-07T05:31:56Z\",\n \"linkedin_approval_mode\": \"<string>\",\n \"linkedin_check_max_seconds\": 123,\n \"linkedin_check_min_seconds\": 123,\n \"multithreading\": {},\n \"name\": \"<string>\",\n \"opportunity_values\": {},\n \"opt_out_footer_text\": \"<string>\",\n \"plain_text_only\": true,\n \"sending_priority\": \"<string>\",\n \"sending_window\": {\n \"days\": {\n \"fri\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"mon\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sat\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"sun\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"thu\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"tue\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n },\n \"wed\": {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n },\n \"min_interval_minutes\": 120,\n \"sender_timezone\": true,\n \"timezone\": \"<string>\"\n },\n \"spending_limit_tenths\": 500000000\n },\n \"training_revision\": 123,\n \"training_rewrite\": false,\n \"training_session_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"training_slot_keys\": [\n \"<string>\"\n ]\n },\n \"record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"step_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"candidate_record_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"write\": true\n}"
response = http.request(request)
puts response.read_body{
"changed": true,
"message": {
"body": "<string>",
"in_thread": true,
"missing_columns": [
"<string>"
],
"subject": "<string>",
"agent_written": false,
"approved": false,
"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>"
},
"spam_findings": [
{
"code": "<string>",
"detail": "<string>",
"message": "<string>",
"severity": "<string>",
"title": "<string>",
"excerpt": "<string>",
"excerpts": [
"<string>"
]
}
],
"waiting_for_approval": false,
"written": true
},
"reaches": true,
"sent_at": "2023-11-07T05:31:56Z",
"suggested_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
One step for one contact, as a person's waiting changes would have it.
A person's waiting changes to a live sequence, as Review changes holds them.
Show child attributes
Show child attributes
The contact the step is shown for.
Contacts the Preview may show instead, in the order it lists them. When the changes do not reach record_id and one of these they do reach, that one is offered as suggested_record_id and nothing is written.
50False answers whether the changes change this step and reach the contact, and writes nothing for a step the agent writes: no preview is spent. A typed step is filled in either way, which costs nothing.
Response
Successful Response
What a step's Preview shows of the waiting changes for one contact.
Whether the waiting changes change this step's words for this contact. False: the step reads as it does live (the changes touch something else, or the contact keeps the words they have: a person's own, words a person approved or a send holds, or, for a lesson, words already written for them or a thread marked Looks good), and nothing was written.
The step as the contact would get it once the changes are live. A step the agent writes is written again from the changes, spending one of the day's free previews per step written, and is saved nowhere: it names no message_id. The words written are kept for 30 minutes for this contact and these changes, so another step's Preview and a test send read them and spend nothing.
Show child attributes
Show child attributes
Whether the changes reach this contact: false once this step has gone to them, when they are past it or down another branch, when they are done with the sequence and the changes do not carry them on, or when they are not in it.
When this step went to the contact, when it has.
A contact of candidate_record_ids the changes do reach, offered in place of record_id, which they do not; message is then empty.
Was this page helpful?