curl --request POST \
--url https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from_task": false,
"steer_text": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/"
payload = {
"from_task": False,
"steer_text": "<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({from_task: false, steer_text: '<string>'})
};
fetch('https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/', 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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/",
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([
'from_task' => false,
'steer_text' => '<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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/"
payload := strings.NewReader("{\n \"from_task\": false,\n \"steer_text\": \"<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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from_task\": false,\n \"steer_text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/")
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 \"from_task\": false,\n \"steer_text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "email",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Have the agent write one message again
Throw away the agent’s words for one message and have it write them again, optionally with a note on what to change (‘shorter’, ‘mention their new office’). A message in the sequence’s cadence is rewritten in the background, at the message’s usual price, and appears on the contact’s conversation once written. A reply is rewritten straight away as a new draft that waits for approval in the inbox. Refused for a message that has already been sent, one the agent is writing right now, one waiting on a person in the approval queue unless from_task says the ask comes from that task (which is then cancelled), and a preview.
curl --request POST \
--url https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from_task": false,
"steer_text": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/"
payload = {
"from_task": False,
"steer_text": "<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({from_task: false, steer_text: '<string>'})
};
fetch('https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/', 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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/",
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([
'from_task' => false,
'steer_text' => '<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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/"
payload := strings.NewReader("{\n \"from_task\": false,\n \"steer_text\": \"<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/outbound-agents/{agent_id}/messages/{message_id}/regenerate/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from_task\": false,\n \"steer_text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outbound-agents/{agent_id}/messages/{message_id}/regenerate/")
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 \"from_task\": false,\n \"steer_text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kind": "email",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Body
What to change when the agent writes a message again.
True when the ask comes from the message's own task in the approval queue. That task reads Writing while the agent writes the message again, then comes back waiting for a person; without it, a message waiting for approval is refused.
A note on what to do differently, such as 'shorter' or 'open on their new funding round'. Leave it out to have the agent simply try again; a reply keeps the note its last draft was written with.
1 - 2000Response
Successful Response
What asking the agent to write a message again set in motion.
For a reply, the new draft now waiting for approval in the inbox. Null for a cadence message, and null for a reply when the agent found nothing it could usefully say.
What the message is. A message in the sequence's cadence is rewritten in the background and appears on the contact's conversation once written; a reply is rewritten straight away as a new draft in the inbox.
email, linkedin_connection_note, linkedin_message, linkedin_inmail, reply_email, reply_linkedin The message the agent was asked to write again.
Was this page helpful?