/v1/analyze
Analyze one text message and return behavioral signals plus response guidance. Add a conversation identifier to compare a turn with earlier turns in the same conversation.
Request body
message(string, required): text to analyze. Nyeti analyzes at most 32,000 characters.conversation_id(string, optional): your printable, non-space reference, up to 200 characters.speaker(string, optional):customeroragent. It defaults tocustomer.
{
"message": "I need this fixed today. Your bot is useless and I want to cancel.",
"conversation_id": "ticket_123",
"speaker": "customer"
}Response
This response excerpt shows the supported fields your integration can use.
{
"status": "ok",
"annotation": {
"emotional_valence": "negative",
"cognitive_load": "neutral",
"urgency_level": "high",
"engagement_state": "disengaged",
"social_register": "neutral",
"cultural_context": ["global"]
},
"signal_confidence": 0.61,
"signals_fired": 3,
"routing": {
"response_posture": "EMPATHIC_SOLVE",
"recommended_tone": "warm_direct",
"suggested_action": "acknowledge_then_fix"
}
}Nyeti may add fields to responses. Integrations should ignore fields they do not use.
Conversation context
If conversation analysis is available for your workspace, send each turn separately with the same conversation_id. Mark agent replies with "speaker": "agent". False-resolution detection needs both the agent's claim and the customer's reaction.
{
"conversation_id": "ticket_123",
"speaker": "agent",
"message": "Your order is on its way, so this is resolved."
}{
"conversation_id": "ticket_123",
"speaker": "customer",
"message": "You said that last time and nobody has helped me."
}When prior turns exist, the response adds a conversation block containing prior-turn counts, false-resolution and repetition findings, sentiment trajectory, a recommended next action, and review_status. The standard annotation and routing fields remain.
On the first correlated request, prior_turns is 0. Cross-turn flags appear only after enough earlier turns have been recorded.
false_resolution: an agent presented the issue as settled and a later customer turn still signals that it is unresolved.repetition: a customer had to repeat the same need.escalating: the interaction is deteriorating across turns.action:clarify,simplify,resolve,route, orhandoff.
Nyeti stores the same text it analyzes to build conversation history. Redaction is enabled by default, so email addresses, phone numbers, and card-number patterns are masked first and storage_mode is redacted. Workspaces configured for full-text handling receive full. If context processing fails, the conversation block reports degraded and recommends handoff rather than implying resolution.
cURL
curl -X POST https://api.bactlabs.africa/v1/analyze \
-H "Authorization: Bearer $NYETI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"I need this fixed today.","conversation_id":"ticket_123","speaker":"customer"}'Try it
Try it with your key
Paste an sk_bact_ key and send a message to see a live behavioral annotation.