POST /ingest/stream
curl --request POST \
--url https://api.example.com/ingest/stream \
--header 'Content-Type: application/json' \
--data '
{
"uid": "<string>",
"text": "<string>",
"ts": "<string>",
"source": "<string>"
}
'import requests
url = "https://api.example.com/ingest/stream"
payload = {
"uid": "<string>",
"text": "<string>",
"ts": "<string>",
"source": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({uid: '<string>', text: '<string>', ts: '<string>', source: '<string>'})
};
fetch('https://api.example.com/ingest/stream', 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.example.com/ingest/stream",
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([
'uid' => '<string>',
'text' => '<string>',
'ts' => '<string>',
'source' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/ingest/stream"
payload := strings.NewReader("{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/ingest/stream")
.header("Content-Type", "application/json")
.body("{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ingest/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "recorded",
"distress_score": 6.8,
"alert_fired": false
}
Ingestion
POST /ingest/stream
Single-item real-time ingestion for Signal and Brain tiers
POST
/
ingest
/
stream
POST /ingest/stream
curl --request POST \
--url https://api.example.com/ingest/stream \
--header 'Content-Type: application/json' \
--data '
{
"uid": "<string>",
"text": "<string>",
"ts": "<string>",
"source": "<string>"
}
'import requests
url = "https://api.example.com/ingest/stream"
payload = {
"uid": "<string>",
"text": "<string>",
"ts": "<string>",
"source": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({uid: '<string>', text: '<string>', ts: '<string>', source: '<string>'})
};
fetch('https://api.example.com/ingest/stream', 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.example.com/ingest/stream",
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([
'uid' => '<string>',
'text' => '<string>',
'ts' => '<string>',
'source' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.example.com/ingest/stream"
payload := strings.NewReader("{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/ingest/stream")
.header("Content-Type", "application/json")
.body("{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ingest/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\",\n \"source\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "recorded",
"distress_score": 6.8,
"alert_fired": false
}
Single-item real-time ingestion for Model B (Signal/Brain tiers). Designed for Slack webhooks where messages arrive individually. Returns a distress score so the connector can act locally if needed.
Request body
string
required
Pseudonymous user identifier — customer holds the mapping.
string
required
Message or comment text.
string
ISO 8601 timestamp of the original message.
string
Content source label.
Response
string
recorded.float
Score from 0.0–10.0 for this message.
boolean
true if uid crossed alert threshold.Example
curl -X POST "https://api.togetherwithkai.com/v1/affective/ingest/stream" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uid": "usr_a1b2c3",
"text": "I dont know if anyone would notice if I wasnt here",
"ts": "2026-06-15T14:22:00Z",
"source": "slack_engineering"
}'
{
"status": "recorded",
"distress_score": 6.8,
"alert_fired": false
}
⌘I