Sessions
Send Session Events
Append one user or tool-result event to a session
POST
Send one event to a session. UseDocumentation Index
Fetch the complete documentation index at: https://docs.dari.dev/llms.txt
Use this file to discover all available pages before exploring further.
user.message to start or enqueue a user turn. Use tool.result_submitted to answer an external tool request that Dari previously sent as tool.call_requested; see Webhooks for the pushed delivery flow.
This endpoint writes to the canonical event ledger. If you need a display-ready conversation view, call Get Session Transcript.
For safe retries of user messages, pass an Idempotency-Key header. Reusing the same key for the same session returns the original event instead of creating another message.
Path Parameters
Session ID.
Headers
Bearer token using your Dari API key.
Must be
application/json.Optional key for safely retrying
user.message requests.Request Body
user.message or tool.result_submitted.Required for
user.message. Ordered list of content blocks. Blocks support text, file, and image.Optional metadata attached to the derived message for
user.message.Required for
tool.result_submitted. The message ID from the matching tool.call_requested event.Required for
tool.result_submitted. The tool call ID from the matching tool.call_requested event.Required for successful
tool.result_submitted events. Raw JSON result returned by your infrastructure. If the external tool defines an output_schema, Dari validates this object before resuming the agent.Optional for
tool.result_submitted. Set to true to return an error result to the model.Response Fields
The canonical ledger event that was recorded.
The derived message summary when the event is associated with a message.
The current session summary after the event was recorded.