curl --request POST \
--url https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"as_written_only": false,
"rev": 1,
"signature_block": "<string>",
"without_file": false
}
'import requests
url = "https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/"
payload = {
"as_written_only": False,
"rev": 1,
"signature_block": "<string>",
"without_file": False
}
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({
as_written_only: false,
rev: 1,
signature_block: '<string>',
without_file: false
})
};
fetch('https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/', 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}/approve/",
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([
'as_written_only' => false,
'rev' => 1,
'signature_block' => '<string>',
'without_file' => false
]),
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}/approve/"
payload := strings.NewReader("{\n \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\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}/approve/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/")
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 \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\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",
"saved_learnings": 123,
"saved_learnings_for_all_sequences": 123,
"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,
"in_reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newer_reply_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"rewriting": false,
"rewritten_for_learning": "<string>",
"rewritten_for_learning_removed": false,
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person",
"set_aside_because": "newer_reply"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Approve and send a draft
Send a reply because a person approved it. It goes out the way the message it answers came in: by email from the mailbox that email reached, or on LinkedIn from the conversation’s account (see the draft’s channel and mailbox_id); a reply written before that was recorded leaves the way the conversation does. It is recorded as sent by that person. The answer comes once the reply is on its way: an email reply answers sending, with sent_message_id empty until a worker has sent it, seconds later, and a send that fails after the answer leaves it send_failed, which reads Did not send; a LinkedIn reply is queued and answers sent. Words changed from the AI’s read edited in send_outcome until their comparison, made after the send, says whether they replaced the draft. Only a reply waiting for approval can be approved. Two people approving it at once send it once: the first approval sends it, and the second is refused with 409, saying it is already being sent or was sent. A reply that answers an older message while the contact’s newer one waits (being read, or read as their own words) is refused with 409 and stays waiting; an away notice or an auto-reply after it does not hold it. A reply whose message was answered already, from the mailbox, LinkedIn or here, is refused with 409 and no longer waits. A reply to a contact on the do-not-contact list is refused with 409 and stays waiting. Sent with as_written_only, as Approve and send over many conversations does, a reply whose words or subject were changed is refused with 409 and stays waiting. A reply edited while its approval ran its checks is refused with 409 and stays waiting, in its newer words. A reply an older release scheduled is approved as one waiting. Approving it saves the learning its Needs work proposed, unless its list is full: saved_learnings says whether it did. With rev, it saves the reply’s feedback session only as the page showed it. With dry_run it makes every check the send makes and answers the draft as it would stand once sent, sending nothing. Words holding a placeholder nobody filled in are refused with 422 reply_placeholder, and words saying something is attached when no file goes with 422 reply_says_attached unless without_file; the reply stays waiting either way. Files waiting for this answer go with it; more than an email carries (10 files, 25 MB in all) is refused with 422 reply_files_too_large.
curl --request POST \
--url https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"as_written_only": false,
"rev": 1,
"signature_block": "<string>",
"without_file": false
}
'import requests
url = "https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/"
payload = {
"as_written_only": False,
"rev": 1,
"signature_block": "<string>",
"without_file": False
}
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({
as_written_only: false,
rev: 1,
signature_block: '<string>',
without_file: false
})
};
fetch('https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/', 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}/approve/",
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([
'as_written_only' => false,
'rev' => 1,
'signature_block' => '<string>',
'without_file' => false
]),
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}/approve/"
payload := strings.NewReader("{\n \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\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}/approve/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/drafts/{draft_id}/approve/")
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 \"as_written_only\": false,\n \"rev\": 1,\n \"signature_block\": \"<string>\",\n \"without_file\": false\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",
"saved_learnings": 123,
"saved_learnings_for_all_sequences": 123,
"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,
"in_reply_to_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"newer_reply_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"rewriting": false,
"rewritten_for_learning": "<string>",
"rewritten_for_learning_removed": false,
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person",
"set_aside_because": "newer_reply"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Query Parameters
Body
What the person's composer shows under the draft's words, and how they approve it.
The divider and signature exactly as the composer shows them under the draft's words, empty when the person removed them. Sent under the words in place of the mailbox's own signature, so the email is what they saw. Null signs as the mailbox does.
4000Response
Successful Response
The reply Approve and send sent, and whether its Needs work's learning was saved.
How many learnings the reply's Needs work proposed this approval saved: 1 or 0. A proposed learning whose list is full is left unsaved while the reply is sent all the same, so a reply that proposed one and answers 0 saved nothing. On a dry run, how many sending it would save.
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, never_say 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 contact's message that came after the one this reply answers, which puts it out of date: approving it is refused, and a rewrite answers that message. Read on a waiting reply, and on a stale one set aside for it (newer_reply) while no reply of ours went after it. Only when the read names one conversation's drafts; null otherwise, and while the reply answers the newest.
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 Why a stale reply was set aside. newer_reply: the contact wrote again after the message it answers; its conversation shows it out of date until a person rewrites it (regenerate, which answers the newest message), writes their own reply, or rejects it, which dismisses it as newer_reply_dismissed. answered: a reply of ours went. label: a person's label says the agent does not answer. do_not_contact, stop_request, superseded (another draft took its place). Null on every other reply, and on one set aside before 2026-11-22.
newer_reply, newer_reply_dismissed, answered, label, do_not_contact, stop_request, superseded Was this page helpful?