Skip to main content
PUT
/
v1
/
simulation
/
{simulation_id}
Update Simulation
curl --request PUT \
  --url https://api.getbluejay.ai/v1/simulation/{simulation_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "max_concurrent": 250,
  "hangup_on_transfer": true,
  "max_call_duration": 123,
  "max_call_duration_units": "minutes",
  "max_turns": 123,
  "ringing_timeout": 123,
  "digital_humans_settings": {},
  "selected_custom_metrics": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "custom_metrics_failing_threshold": 50,
  "custom_metrics_passing_threshold": 50,
  "tags": [
    "<string>"
  ],
  "pinned": true
}
'
{
  "agent_id": 123,
  "name": "<string>",
  "type": "sequential",
  "id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "settings": {},
  "max_concurrent": 123,
  "max_turns": 123,
  "ringing_timeout": 123,
  "tags": [
    "<string>"
  ],
  "description": "<string>",
  "pinned": true,
  "always_on": true
}
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 — PUT /v1/simulation/{simulation_id}

> **What this endpoint does:** update a specific simulation by id. only fields provided in the request body will be updated.

**Endpoint:** PUT `https://api.getbluejay.ai/v1/simulation/{simulation_id}`
**Auth:** `X-API-Key` header
**Content-Type:** application/json

### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| simulation_id | integer |  |
| X-API-Key | string | API key required to authenticate requests. |

Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/update-simulation and include any optional parameters (e.g., `name`, `description`, `prompt_id`, `knowledge_base_id`, `max_concurrent`, `hangup_on_transfer`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.

### Request Body
```json
{
  "name": "string",
  "description": "string",
  "prompt_id": "string",
  "knowledge_base_id": "string",
  "max_concurrent": 123,
  "hangup_on_transfer": true,
  "max_call_duration": 123,
  "max_call_duration_units": "minutes",
  "max_turns": 123,
  "ringing_timeout": 123,
  "digital_humans_settings": {
    "key": "value"
  },
  "selected_custom_metrics": [
    "string"
  ],
  "custom_metrics_failing_threshold": 123,
  "custom_metrics_passing_threshold": 123,
  "tags": [
    "string"
  ],
  "pinned": true
}
```

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

def update_simulation(simulation_id: int, payload: dict, api_key: str) -> dict:
    url = f"https://api.getbluejay.ai/v1/simulation/{simulation_id}"
    headers = {"X-API-Key": api_key}
    response = requests.put(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.
Update a specific simulation by ID. Only fields provided in the request body will be updated.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

simulation_id
integer
required

Body

application/json

request body for updating a simulation.

all fields are optional; only provided fields will be updated.

name
string | null

updated simulation name

description
string | null

human‑readable description of the simulation

prompt_id
string<uuid> | null

optional default prompt UUID for this simulation

knowledge_base_id
string<uuid> | null

optional default knowledge base UUID for this simulation

max_concurrent
integer | null

maximum number of concurrent runs (max 500)

Required range: 0 < x <= 500
hangup_on_transfer
boolean | null

whether to hang up the call on transfer

max_call_duration
integer | null

maximum duration of each call. units specified by max_call_duration_units

max_call_duration_units
enum<string> | null

units for max_call_duration: 'minutes' or 'seconds'

Available options:
minutes,
seconds
max_turns
integer | null

maximum number of turns per simulation run

ringing_timeout
integer | null

ringing timeout in seconds before abandoning

digital_humans_settings
Digital Humans Settings · object

settings for digital humans in the simulation

selected_custom_metrics
string<uuid>[] | null

array of custom metric IDs to be saved in settings

custom_metrics_failing_threshold
integer | null

score threshold below which a custom metric is considered failing (0-100)

Required range: 0 <= x <= 100
custom_metrics_passing_threshold
integer | null

score threshold at or above which a custom metric is considered passing (0-100)

Required range: 0 <= x <= 100
tags
string[] | null

array of tags for the simulation

pinned
boolean | null

whether the simulation is pinned

Response

Successful Response

agent_id
integer
required
name
string
required
type
enum<string>
required
Available options:
sequential,
parallel,
max_concurrent
id
integer | null
created_at
string<date-time> | null
settings
Settings · object
max_concurrent
integer | null
max_turns
integer | null
ringing_timeout
integer | null
tags
string[] | null
description
string | null
pinned
boolean | null
always_on
boolean | null