Conversations
Send Message to AI Agent (Supports SSE Streaming & Structured Blocks)
POST
/api/conversations/{conversation_id}/sendOverview
Dispatches a user prompt to the AI Agent. Supports real-time Server-Sent Events (SSE) streaming as well as synchronous one-shot JSON responses.
Authentication & Headers
- Auth: Bearer Token
- Required Header:
API-Version: 1 - Optional Header:
X-Pinter-Response-Format:blocks: Receive structured chart, html, and followup artifact blocks via SSE or block items.blocks,openui: Same asblocks, plus the model may emit ```openui-lang UI fences inside text deltas.json: Guarantee a JSON response (application/json) without block prompt injection, acting like default mode while ensuring structured JSON output.- Without the header, the response stays plain SSE text deltas.
Parameters & Request Body Fields
conversation_id(path, string, required): The target conversation session UUID.message(string, required): The text prompt or user query.agent_id(string, optional): Specific agent UUID to route query to.stream(boolean, optional, default: false): Set totruefor SSE streaming mode (text/event-stream).attachments(array of strings, optional): List of uploaded blob attachment paths for multimodal analysis.approval_mode(string, optional, default:full-access):approvalpauses risky tools (names starting withcreate_,update_,delete_,run_, oradd_, and non-read-onlyquery_snowflakecalls) for human confirmation.full-accessruns them without asking. When the field is omitted, tools run without confirmation, so API clients that want the gate must sendapproval. The chat UI always sends its own choice.
Parameters
Path
conversation_idstringrequiredUnique UUID of the conversation session / thread.
Header
x-pinter-response-formatstringComma-separated response mode tokens. `blocks`: structured rich response blocks (charts, html, images, followup). `blocks,openui`: same as `blocks` plus openui-lang UI fences inside text deltas. `json`: collected JSON response.
Request body
application/json
messagestringrequiredagent_idstringrequiredapi_key_idstring | nullattachmentsobject[]attachments[].mime_typestringrequiredattachments[].data_base64stringrequiredattachments[].filenamestringattachments[].urlstring | nullstreambooleanapproval_modeenumapprovalfull-access{
"message": "string",
"agent_id": "string",
"api_key_id": "string",
"attachments": [],
"stream": false,
"approval_mode": "full-access"
} Responses
200 Agent response (JSON format or text/event-stream depending on stream parameter)
400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).
401 Unauthorized - Missing, invalid, or expired JWT Bearer token.
403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.
404 Not Found - The requested resource ID was not found.
422 Validation Error
detailobject[]detail[].locstring | integer[]requireddetail[].msgstringrequireddetail[].typestringrequireddetail[].inputobjectdetail[].ctxobject{
"detail": [
{
"loc": [
null
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Example
curl -X POST "$PINTER_URL/api/conversations/018f3a55-234b-76b9-b8d1-561b34e2a101/send" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":"string","agent_id":"string","api_key_id":"string","attachments":[],"stream":false,"approval_mode":"full-access"}'