Runs

Submit a turn to an API-chat run

Changed on

Submit your agent-under-test's latest message on a customer-driven (API chat) run. The simulated user's reply is generated in the background — the response returns a turn_id immediately; poll GET /runs/{run_id}/chat/{turn_id}/ until its status is ready to read the reply, then submit the next turn. Submitting a new turn while one is still generating interrupts it: the older turn is marked dropped but its message is kept, and the newest turn's reply answers all messages received since the last reply. Repeat until ended is true (or call end-chat).

post/test_framework/v1/runs/{id}/chat/

Request

  • Base URL
    https://api.cekura.ai
  • URL
    https://api.cekura.ai/test_framework/v1/runs/{id}/chat/
  • Auth
    • API key in header X-CEKURA-API-KEY
    • or HTTP bearer
    • or HTTP bearer
    • or API key in header X-VOCERA-SHAREABLE-LINK-TOKEN
    • or HTTP bearer

Path parameters

idinteger required

A unique integer value identifying this run.

Request body

contentstring

Your agent-under-test's latest message. Submitting it returns a turn_id; poll GET /runs/{run_id}/chat/{turn_id}/ for the simulated user's reply.

metadataobject

Optional metadata merged into the run (last-write-wins). Can be sent alone.

role'Function Call' | 'Function Call Result'

Set to record a tool call instead of a message (no reply is generated).

  • Function Call - Function Call
  • Function Call Result - Function Call Result
dataobject

Function-call payload: {id, name, arguments} for a call, {id, result} for a result.

Response

run_idinteger required
result_idinteger required
turn_idinteger required

Poll this turn for the simulated user's reply.

statusstring required

Turn status; poll for the reply if 'generating'.

Changes