Skip to main content
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>"
}
'
{
  "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

source
string
required
Label for this content source, e.g. slack_engineering.
texts
array
Array of plain text strings. Used with Model A (Pulse tier).
messages
array
Array of {uid, text, ts} objects. Used with Model B (Signal/Brain tiers).
batch_id
string
Customer-generated UUID for status tracking.

Message object (Model B)

uid
string
required
Pseudonymous user identifier — customer holds the mapping.
text
string
required
Message or comment text.
ts
string
ISO 8601 timestamp of the original message.

Response

batch_id
string
Echo of submitted batch_id.
status
string
processed or queued.
items_analysed
integer
Number of items successfully processed.
items_scrubbed
integer
Items where PII was detected and stripped.
processed_at
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"
    ]
  }'