Sessions
Send sessions
Send your agent’s conversations to Ollive to be checked.
How it works
Use this for agents that don’t run on a connected platform. Send 1 to 10 conversations per request, each up to 500 turns. Ollive accepts them with a 202 and checks them in the background. When checking is done, read the results with List verdicts and the other monitoring endpoints.
Give each conversation a session_ref: your own ID for it. You can send each session_ref only once, and a conversation can’t be changed after it is sent.
If anything in the request is invalid, none of it is accepted, and the error’s param points to the field to fix. Times can’t be in the future, and an end time can’t come before its start time.
Request body
application/json
- deployment_idstringrequired
The deployment these conversations belong to, from List deployments.
- sessionsobject[]required1 to 10
The conversations to send.
- session_refstringrequiredup to 128 characters
Your ID for this conversation. Letters, numbers, and
._:-. It must not have been sent before. - channelstring
Whether it was a
chator avoiceconversation.chatvoice - started_atstring (date-time)
When the conversation started. Defaults to the start of the first turn.
- ended_atstring (date-time)
When it ended. Defaults to the end of the last turn.
- turnsobject[]required1 to 500
The conversation, turn by turn.
- messagesobject[]required
What was said in this turn. At least one message.
- rolestringrequired
Who said it.
userassistantsystemtool - contentstringrequired
What they said.
- tool_callsobject[]
The tools the agent used in this turn.
- namestringrequired
The tool’s name.
- inputany JSON
What the agent sent to the tool.
- outputany JSON
What the tool returned.
- started_atstring (date-time)
When the call started.
- ended_atstring (date-time)
When it finished.
- started_atstring (date-time)
When the turn started.
- ended_atstring (date-time)
When it ended.
Response
Accepted. The conversations are listed in the order you sent them.
- dataobject[]required
One entry per conversation.
- session_refstringrequired
Your ID for the conversation.
- versionintegerrequired
Always
1.
Something in the request is wrong. code and param tell you what.
Returns an error, for example with the code invalid_session.
The API key is missing, wrong, revoked or expired.
Returns an error, for example with the code authentication_failed.
We couldn’t find that item in your account.
Returns an error, for example with the code not_found.
We couldn’t accept the conversations. The message says which ones to send again.
Returns an error, for example with the code queue_unavailable.