Record AI-draft outcome (retraining-loop telemetry)
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft_text": "<string>",
"confidence": 0.5,
"sent_body": "<string>",
"sent_message_id": "<string>"
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome"
payload = {
"draft_text": "<string>",
"confidence": 0.5,
"sent_body": "<string>",
"sent_message_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft_text: '<string>',
confidence: 0.5,
sent_body: '<string>',
sent_message_id: '<string>'
})
};
fetch('https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome', 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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome",
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([
'draft_text' => '<string>',
'confidence' => 0.5,
'sent_body' => '<string>',
'sent_message_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome"
payload := strings.NewReader("{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyInbox
Record AI-draft outcome (retraining-loop telemetry)
Persists one row in tenant ai_draft_outcomes for the inbox AI-draft retraining loop. Captures the draft snapshot, the operator’s outcome action (accepted / edited / rejected / discarded / regenerated), the sent body when known, and a character-level edit distance. Append-only — re-actioning produces a new row.
POST
/
api
/
v1
/
inbox
/
conversations
/
{conversationId}
/
ai-draft
/
outcome
Record AI-draft outcome (retraining-loop telemetry)
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"draft_text": "<string>",
"confidence": 0.5,
"sent_body": "<string>",
"sent_message_id": "<string>"
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome"
payload = {
"draft_text": "<string>",
"confidence": 0.5,
"sent_body": "<string>",
"sent_message_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
draft_text: '<string>',
confidence: 0.5,
sent_body: '<string>',
sent_message_id: '<string>'
})
};
fetch('https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome', 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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome",
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([
'draft_text' => '<string>',
'confidence' => 0.5,
'sent_body' => '<string>',
'sent_message_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome"
payload := strings.NewReader("{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/inbox/conversations/{conversationId}/ai-draft/outcome")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"draft_text\": \"<string>\",\n \"confidence\": 0.5,\n \"sent_body\": \"<string>\",\n \"sent_message_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
BearerApiKey
Dashboard JWT token from Clerk
Path Parameters
Body
application/json
Required string length:
1 - 8000Available options:
accepted, edited, rejected, discarded, regenerated Available options:
send, escalate, end Required range:
0 <= x <= 1Maximum string length:
8000Required string length:
1 - 200Response
200
Default Response
⌘I