curl --request PATCH \
--url https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"body_text": "<string>",
"subject": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/"
payload = {
"body_text": "<string>",
"subject": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({body_text: '<string>', subject: '<string>'})
};
fetch('https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/', 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-ai/drafts/{draft_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body_text' => '<string>',
'subject' => '<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-ai/drafts/{draft_id}/"
payload := strings.NewReader("{\n \"body_text\": \"<string>\",\n \"subject\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body_text\": \"<string>\",\n \"subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body_text\": \"<string>\",\n \"subject\": \"<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",
"confidence_score": 123,
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"send_after": "2023-11-07T05:31:56Z",
"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>"
}Edit a draft before approving it
Change the words that will be sent. What the agent wrote is kept for comparison, and an edit to the agent’s reply teaches the agent. Editing a reply the agent has scheduled takes it off the schedule: it waits for a person to approve it instead. Refused once the reply is sending or settled.
curl --request PATCH \
--url https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"body_text": "<string>",
"subject": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/"
payload = {
"body_text": "<string>",
"subject": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({body_text: '<string>', subject: '<string>'})
};
fetch('https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/', 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-ai/drafts/{draft_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body_text' => '<string>',
'subject' => '<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-ai/drafts/{draft_id}/"
payload := strings.NewReader("{\n \"body_text\": \"<string>\",\n \"subject\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body_text\": \"<string>\",\n \"subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox-ai/drafts/{draft_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body_text\": \"<string>\",\n \"subject\": \"<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",
"confidence_score": 123,
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"send_after": "2023-11-07T05:31:56Z",
"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>"
}Authorizations
Path Parameters
Body
1 - 20000500Response
Successful Response
How sure the model is. Shown on the card; no band sends without a person.
high, medium, low auto_drafted, on_demand Where this reply stands. pending_approval: waiting for a person to approve, edit or discard it. scheduled: the agent will send it on its own at send_after unless a person discards or edits it first. 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 this reply is waiting for a person instead of going out on its own, for example low_confidence, always_ask, unverified_sender, different_sender or daily_cap. Null when nothing held it back, 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 model's 0-100 calibration, clamped into the categorical band. Null for drafts that predate the field. Presentation only: every decision reads the categorical confidence.
The agent's message this reply came from, when a sequence's agent wrote it. Edits, ratings and the send are recorded against that message too, which is how the agent learns from them. Null on a reply written in the default voice for a conversation outside any sequence.
The human verdict on this draft, when one was given.
good, bad When a scheduled reply goes out on its own, unless a person discards or edits it first. Kept once the reply is sending or sent. Null on a reply that was never scheduled, and on one taken off the schedule, by a person editing it or by a check that held it back for a person (see ask_reason).
Who sent the reply: person when someone approved it, system when the agent sent it on its own. Null until it is sent.
person, system Was this page helpful?