curl --request POST \
--url https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"answers": [
{
"answer": "<string>",
"question_id": "<string>",
"question": "<string>",
"scope": "this_reply"
}
],
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"also_answer_waiting": false
}
'import requests
url = "https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/"
payload = {
"answers": [
{
"answer": "<string>",
"question_id": "<string>",
"question": "<string>",
"scope": "this_reply"
}
],
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"also_answer_waiting": 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({
answers: [
{
answer: '<string>',
question_id: '<string>',
question: '<string>',
scope: 'this_reply'
}
],
message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
also_answer_waiting: false
})
};
fetch('https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/', 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/threads/{thread_id}/answers/",
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([
'answers' => [
[
'answer' => '<string>',
'question_id' => '<string>',
'question' => '<string>',
'scope' => 'this_reply'
]
],
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'also_answer_waiting' => 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/threads/{thread_id}/answers/"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": 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/threads/{thread_id}/answers/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/")
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 \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": 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",
"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,
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Answer the agent's questions on a reply
The Submit on a conversation’s “Before I answer, I need to know” card (question_card). Give an answer to every question the card asks, each by its id; the sequence’s agent then writes the reply with those answers in front of it, charged as any reply it writes, and the reply waits for a person in Needs approval. The card closes once the reply is written. When nothing usable was written it answers 409 saying so, and the card stays open.
Each answer may reword its question (question) and says where it is kept (scope): this_reply, the default, for this reply alone, so a later Write again has it too; saved in the workspace’s Q&A as well, which every later reply reads, so a saved question or answer naming the contact by email address or full name is refused before anything is written. A saved answer goes into the Q&A once the reply is written, signed by the person, under its question as worded: a question the Q&A has already takes the new answer, and the card’s saved_answers offers it next time the question is asked.
With also_answer_waiting, the agent also answers the other conversations of the sequence waiting on the same questions that the saved answers and the Q&A answer between them (the card’s others_waiting): each is written in the background as a reply of its own, charged as any reply the agent writes, and waits for approval.
One person’s answers write the reply: answers sent while another person’s are being written wait for them, then write nothing, and the 409 names who answered.
Saving a different answer to a question the Q&A already answers changes that answer, which only a workspace admin can do; the same answer again changes nothing. A new question needs room in the Q&A. Both are checked before anything is written.
curl --request POST \
--url https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"answers": [
{
"answer": "<string>",
"question_id": "<string>",
"question": "<string>",
"scope": "this_reply"
}
],
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"also_answer_waiting": false
}
'import requests
url = "https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/"
payload = {
"answers": [
{
"answer": "<string>",
"question_id": "<string>",
"question": "<string>",
"scope": "this_reply"
}
],
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"also_answer_waiting": 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({
answers: [
{
answer: '<string>',
question_id: '<string>',
question: '<string>',
scope: 'this_reply'
}
],
message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
also_answer_waiting: false
})
};
fetch('https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/', 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/threads/{thread_id}/answers/",
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([
'answers' => [
[
'answer' => '<string>',
'question_id' => '<string>',
'question' => '<string>',
'scope' => 'this_reply'
]
],
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'also_answer_waiting' => 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/threads/{thread_id}/answers/"
payload := strings.NewReader("{\n \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": 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/threads/{thread_id}/answers/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/inbox/threads/{thread_id}/answers/")
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 \"answers\": [\n {\n \"answer\": \"<string>\",\n \"question_id\": \"<string>\",\n \"question\": \"<string>\",\n \"scope\": \"this_reply\"\n }\n ],\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"also_answer_waiting\": 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",
"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,
"learning_subject_key": "<string>",
"mailbox_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"outbound_message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rating": "good",
"send_after": "2023-11-07T05:31:56Z",
"send_outcome": "as_written",
"sent_by_kind": "person"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Path Parameters
Body
The answers to every question on a reply's card.
One answer per question the card asks, each naming its question.
1 - 3 elementsShow child attributes
Show child attributes
The reply the card is on, its question_card.message_id.
Also have the agent answer the other conversations of the sequence waiting on the same questions (the card's others_waiting), from the answers saved to the Q&A here and the Q&A's own. Each is a reply of its own, charged as any the agent writes and left for approval, written in the background.
Response
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: 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 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.
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 (Write again, 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 mailbox an email reply is sent from: the one the email it answers came in to. Null on a LinkedIn reply, on one written before this was recorded, and once that mailbox is removed; each goes out from the conversation's own mailbox.
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, as a record that saves no learning: only Needs work on the draft does. 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 an older release would have sent a scheduled reply; nothing sends it now. Kept on a reply that release sent. Null on a reply that was never scheduled, and on one handed back to a person, edited or approved.
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 Who sent the reply: person when someone approved it, system on a reply an older release sent without one. Null until it is sent.
person, system Was this page helpful?