apiHosted AI, explicit consent
Analyze sentiment
POST /api/inbox/analyze-sentiment
Run the SentimentAgent on a conversation: classifies the prospect across the canonical 7 stages (initial, interested, neutral, objection, meeting_ready, closed_lost, closed_won) and updates the conversation_contexts row. Pass the full conversation object plus its messages - the agent uses the message thread, not the chat_id alone.
Parameters
workspaceId
string
Optional workspace ID or slug. Required when this credential can access multiple workspaces and no workspace was configured on the client.
decisionOverride
object
No description.
workspaceSlug
string
Required for Clerk auth. Ignored when using API key (workspace inferred from key).
conversationrequired
object
Required. The conversation object (must include chat_id).
messages
object[]
Message thread to analyze.
currentTags
string[]
Existing conversation tags so the agent can update incrementally.
allowHostedAi
boolean
Must be true when this operation uses Pipeline hosted inference.
Example
REST requestbash
curl -X POST "https://app.pipeline.help/api/inbox/analyze-sentiment" \-H "Authorization: Bearer $PIPELINE_API_KEY" \-H "X-Pipeline-Execution-Policy: hosted-enabled" \-H "Content-Type: application/json" \-d '{"conversation":{},"allowHostedAi":true}'
Response
The operation is available, but its typed response schema has not been published yet.
HTTP errors
- 401
- Missing or invalid API key.
- 403
- Authenticated but not permitted for the workspace or resource.
- 404
- The requested resource was not found.