POST /ingest/batch
curl --request POST \
--url https://api.example.com/ingest/batch \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"texts": [
{}
],
"messages": [
{}
],
"batch_id": "<string>",
"uid": "<string>",
"text": "<string>",
"ts": "<string>"
}
'import requests
url = "https://api.example.com/ingest/batch"
payload = {
"source": "<string>",
"texts": [{}],
"messages": [{}],
"batch_id": "<string>",
"uid": "<string>",
"text": "<string>",
"ts": "<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({
source: '<string>',
texts: [{}],
messages: [{}],
batch_id: '<string>',
uid: '<string>',
text: '<string>',
ts: '<string>'
})
};
fetch('https://api.example.com/ingest/batch', 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/batch",
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([
'source' => '<string>',
'texts' => [
[
]
],
'messages' => [
[
]
],
'batch_id' => '<string>',
'uid' => '<string>',
'text' => '<string>',
'ts' => '<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/batch"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<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/batch")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ingest/batch")
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 \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "<string>",
"status": "<string>",
"items_analysed": 123,
"items_scrubbed": 123,
"processed_at": "<string>"
}Ingestion
POST /ingest/batch
Send a batch of content for analysis
POST
/
ingest
/
batch
POST /ingest/batch
curl --request POST \
--url https://api.example.com/ingest/batch \
--header 'Content-Type: application/json' \
--data '
{
"source": "<string>",
"texts": [
{}
],
"messages": [
{}
],
"batch_id": "<string>",
"uid": "<string>",
"text": "<string>",
"ts": "<string>"
}
'import requests
url = "https://api.example.com/ingest/batch"
payload = {
"source": "<string>",
"texts": [{}],
"messages": [{}],
"batch_id": "<string>",
"uid": "<string>",
"text": "<string>",
"ts": "<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({
source: '<string>',
texts: [{}],
messages: [{}],
batch_id: '<string>',
uid: '<string>',
text: '<string>',
ts: '<string>'
})
};
fetch('https://api.example.com/ingest/batch', 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/batch",
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([
'source' => '<string>',
'texts' => [
[
]
],
'messages' => [
[
]
],
'batch_id' => '<string>',
'uid' => '<string>',
'text' => '<string>',
'ts' => '<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/batch"
payload := strings.NewReader("{\n \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<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/batch")
.header("Content-Type", "application/json")
.body("{\n \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ingest/batch")
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 \"source\": \"<string>\",\n \"texts\": [\n {}\n ],\n \"messages\": [\n {}\n ],\n \"batch_id\": \"<string>\",\n \"uid\": \"<string>\",\n \"text\": \"<string>\",\n \"ts\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"batch_id": "<string>",
"status": "<string>",
"items_analysed": 123,
"items_scrubbed": 123,
"processed_at": "<string>"
}Send a batch of content (up to 1,000 items) for analysis. Accepts plain text (Model A, Pulse tier) or pseudonymous uid+text pairs (Model B, Signal/Brain tiers). Raw text is never stored — only extracted signals.
Request body
string
required
Label for this content source, e.g.
slack_engineering.array
Array of plain text strings. Used with Model A (Pulse tier).
array
Array of
{uid, text, ts} objects. Used with Model B (Signal/Brain tiers).string
Customer-generated UUID for status tracking.
Message object (Model B)
string
required
Pseudonymous user identifier — customer holds the mapping.
string
required
Message or comment text.
string
ISO 8601 timestamp of the original message.
Response
string
Echo of submitted
batch_id.string
processed or queued.integer
Number of items successfully processed.
integer
Items where PII was detected and stripped.
string
ISO 8601 timestamp.
Example
curl -X POST "https://api.togetherwithkai.com/v1/affective/ingest/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "slack_engineering",
"batch_id": "550e8400-e29b-41d4-a716-446655440000",
"texts": [
"Feeling overwhelmed with the sprint deadline",
"Really grateful for the team support today"
]
}'
curl -X POST "https://api.togetherwithkai.com/v1/affective/ingest/batch" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "slack_engineering",
"batch_id": "550e8400-e29b-41d4-a716-446655440000",
"messages": [
{
"uid": "usr_a1b2c3",
"text": "Feeling overwhelmed with the sprint deadline",
"ts": "2026-06-15T09:30:00Z"
}
]
}'
⌘I