Skip to main content
POST
Update Simulation Result
Integration Prompt for AI Agents
The simulation result ID can be found as a header of the websocket connect message. The header will look like this: X-Simulation-Result-Id: <simulation_result_id> This ID associates your tool calls, events, tags, and metadata with the specific simulation result. Given this ID, this endpoint updates your simulation result to enrich the simulation with the tool calls, events, tags, and metadata you provide. If you do not have the ID, send start_time, end_time, and duration (seconds) instead. Bluejay looks in the workspaces your key can see for a connected simulation. Calls without a stored duration are always treated as candidates. When duration is stored, the stored start is compared to start_time and the end (stored start plus stored duration) is compared to end_time; both must fall within 90 seconds, and the stored duration must be within the larger of 5 seconds and 10% of duration. When you omit recorded_transcript, or send one with no readable words, exactly one call must match the window; that call is updated. When you include a transcript, every call in the window is scored: one call is kept only when the transcript shares at least 80% of its normalized words, and several calls are separated only when the closest transcript leads the next one by at least 0.08 on that same score. If more than one call is in the window and the transcript does not separate them, the response is 409 and nothing is written. 404 means nothing in your organization matched the window. 409 means the transcript was missing, not stored yet, too close to separate the calls, or not close enough to the only call in the window. Send simulation_result_id in that case.

Headers

X-Organization-Id
string
X-API-Key
string
required

API key required to authenticate requests.

Body

application/json
simulation_result_id
string | null

Simulation result ID provided via SIP for the specific call. Omit to match on start_time, end_time, and duration.

start_time
string<date-time> | null

Call start (timezone-aware). With end_time and duration, identifies the result when simulation_result_id is omitted.

end_time
string<date-time> | null

Call end (timezone-aware). With start_time and duration, identifies the result when simulation_result_id is omitted.

duration
integer | null

Call duration in seconds. With start_time and end_time, identifies the result when simulation_result_id is omitted.

Required range: x >= 0
events
Event · object[] | null

List of events that occurred during the call

tool_calls
ToolCallData · object[] | null

List of tool calls made during the call

recorded_transcript
TranscriptEntryRequest · object[] | null

Recorded transcript of the call. Stored for STT accuracy, and used to pick the call when several match the time window.

tags
string[] | null

List of tags associated with the call

metadata
Metadata · object | null

Additional metadata associated with the call

trace_ids
string[] | null

Trace IDs to associate with this simulation result

Response

Successful Response

status
string
default:success

Status of the response

message
string | null

Optional message providing additional information about the response