curl --request POST \
--url https://api.getoneprofile.ai/inbox/drafts/{draft_id}/regenerate/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"steer_text": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/inbox/drafts/{draft_id}/regenerate/"
payload = { "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({steer_text: '<string>'})
};
fetch('https://api.getoneprofile.ai/inbox/drafts/{draft_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/inbox/drafts/{draft_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([
'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/inbox/drafts/{draft_id}/regenerate/"
payload := strings.NewReader("{\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/inbox/drafts/{draft_id}/regenerate/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"steer_text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/drafts/{draft_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 \"steer_text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body_text": "<string>",
"confidence": "high",
"confidence_reason": "<string>",
"generated_body_text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "auto_drafted",
"status": "pending_approval",
"steer_text": "<string>",
"subject": "<string>",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ask_reason": "low_confidence",
"channel": "email",
"confidence_score": 123,
"hand_edited": false,
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"rewriting": false,
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Try again
Write a fresh reply in place of this one, which is kept so what was written before stays comparable. Works on a reply waiting for approval and on one an older release scheduled; the new reply always waits for a person. Refused once the reply is sending or settled, including a send that failed: write a fresh reply then. Like Draft with AI, a conversation no longer in a sequence is refused, and so is a reply the agent may not write now, at once, the detail saying why. A refusal leaves this reply as it was, except when nothing usable was written: that is refused too, and this reply is retired all the same, leaving the conversation with no draft.
curl --request POST \
--url https://api.getoneprofile.ai/inbox/drafts/{draft_id}/regenerate/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"steer_text": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/inbox/drafts/{draft_id}/regenerate/"
payload = { "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({steer_text: '<string>'})
};
fetch('https://api.getoneprofile.ai/inbox/drafts/{draft_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/inbox/drafts/{draft_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([
'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/inbox/drafts/{draft_id}/regenerate/"
payload := strings.NewReader("{\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/inbox/drafts/{draft_id}/regenerate/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"steer_text\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/drafts/{draft_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 \"steer_text\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body_text": "<string>",
"confidence": "high",
"confidence_reason": "<string>",
"generated_body_text": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"source": "auto_drafted",
"status": "pending_approval",
"steer_text": "<string>",
"subject": "<string>",
"thread_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"ask_reason": "low_confidence",
"channel": "email",
"confidence_score": 123,
"hand_edited": false,
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"rewriting": false,
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Response
Successful Response
Where this reply stands. pending_approval: waiting for a person to approve, edit or discard it. scheduled: a reply an older release scheduled, which nothing sends now; it waits for a person exactly as pending_approval does, and is approved, edited or discarded the same way. sending: it is leaving now and can no longer be changed. send_unknown: it was sent, but the mailbox has not confirmed it yet; it settles on its own as sent or send_failed. send_failed: it did not go; write a fresh reply. sent: it went out. discarded: a person rejected it or asked for a new version. stale: the contact wrote again before anyone answered it.
pending_approval, sent, discarded, stale, scheduled, sending, send_unknown, send_failed Why an older release held this reply for a person when it would otherwise have sent it, for example low_confidence, always_ask, unverified_sender, different_sender or daily_cap. Every reply waits for a person now, so it is null on every reply written since, and on a reply a person asked for.
low_confidence, findings, insufficient_data, policy, always_ask, sequence_manual, step_requires_approval, daily_cap, unverified_sender, suppressed, different_sender, label, question, consecutive_cap, thread_cap, hourly_cap, org_daily_cap, stale_inbound, sequence_gone, bot_question, automated_counterparty, kill_switch, authentication, language, linkedin_only, send_interrupted, sender_switched_to_manual The channel the reply goes out on: the one the message it answers came in on, so a contact who answered a LinkedIn conversation by email is answered by email. Null on a reply written before this was recorded, which goes out on the conversation's own channel.
email, linkedin What a Needs work on this reply is filed under: list its events with GET /agent-learnings/thumbs-downs/?subject_key=. One key for every version of the reply (a Rewrite with no note, a Needs work's rewrite, its Undo), so the note a Needs work left on one version is found on the next. Null on a reply no sequence's agent wrote, which has no agent to save a learning for.
The agent's message this reply came from, when a sequence's agent wrote it. Ratings and the send are recorded against that message too. A rating saves no learning; a person's edit of the draft proposes one, which sending saves, and Needs work on the draft teaches too. Null only on a reply an older release wrote for a conversation outside any sequence.
True while a changed learning has the agent write this waiting reply again. Its words stay as they are, and can still be approved, edited or rejected, until the new words replace them; a reply a person approved, edited or sent meanwhile keeps the person's version. False on every other reply.
How the words a person sent stand to what the AI wrote, decided as they sent it. as_written: the AI's words, unchanged. edited: the person changed them and kept what they say. replaced: the person sent a reply of their own in its place. Null until a person sends it, on a reply an older release sent without one, and on one sent before this was recorded.
as_written, edited, replaced Was this page helpful?