Skip to main content
POST
/
v1
/
update-simulation-result
Update Simulation Result
curl --request POST \
  --url https://api.getbluejay.ai/v1/update-simulation-result \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "simulation_result_id": "<string>",
  "events": [
    {
      "title": "<string>",
      "start_offset_ms": 123,
      "description": "<string>",
      "end_offset_ms": 123,
      "tags": [
        "<string>"
      ],
      "metadata": {}
    }
  ],
  "tool_calls": [
    {
      "name": "<string>",
      "start_offset_ms": 1,
      "description": "<string>",
      "parameters": {},
      "output": "<unknown>"
    }
  ],
  "recorded_transcript": [
    {
      "start_offset_ms": 123,
      "end_offset_ms": 123,
      "speaker": "AGENT",
      "utterance": "<string>",
      "filler_utterance": true
    }
  ],
  "tags": [
    "<string>"
  ],
  "metadata": {}
}
'
{
  "status": "success",
  "message": "<string>"
}
Integration Prompt for AI Agents
# Bluejay — Testing & Monitoring Platform for Conversational AI Agents

You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.

## Update Simulation Result — POST /v1/update-simulation-result

**Endpoint:** POST `https://api.getbluejay.ai/v1/update-simulation-result`
**Auth:** `X-API-Key` header
**Content-Type:** application/json

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| X-API-Key | string | API key required to authenticate requests. |
| simulation_result_id | string | Simulation result ID provided via SIP for the specific call |

Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/update-simulation-result and include any optional parameters (e.g., `events`, `tool_calls`, `recorded_transcript`, `tags`, `metadata`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.

### Request Body (required fields)
```json
{
  "simulation_result_id": "string"
}
```

Refer to the full schema at https://docs.getbluejay.ai/api-reference/endpoint/update-simulation-result. Include optional fields that serve the goal of setting up for testing and monitoring on Bluejay.

### Example
**POST with body:**
```python
import requests

def update_simulation_result(payload: dict, api_key: str) -> dict:
    url = "https://api.getbluejay.ai/v1/update-simulation-result"
    headers = {"X-API-Key": api_key}
    response = requests.post(url, headers=headers, json=payload)
    response.raise_for_status()
    return response.json()
```

### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.

### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?

Then implement the integration, export it, and confirm it compiles/passes lint.
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.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Body

application/json
simulation_result_id
string
required

Simulation result ID provided via SIP for the specific call

events
Event · object[] | null

List of events that occurred during the call

tool_calls
ToolCall · object[] | null

List of tool calls made during the call

recorded_transcript
TranscriptEntryRequest · object[] | null

Recorded transcript of the call (utilized to analyze STT accuracy)

tags
string[] | null

List of tags associated with the call

metadata
Metadata · object

Additional metadata associated with the call

Response

Successful Response

status
string
default:success

Status of the response

message
string | null

Optional message providing additional information about the response