Skip to main content
POST
/
v1
/
queue-sms-simulation-run
Queue Sms Simulation Run
curl --request POST \
  --url https://api.getbluejay.ai/v1/queue-sms-simulation-run \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "simulation_id": "<string>",
  "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "digital_human_ids": [
    "<string>"
  ],
  "terminate_overlapping_simulations": false
}
'
{
  "simulation_run_id": "<string>",
  "simulation_result_ids": [
    "<string>"
  ],
  "agent_id": "<string>",
  "status": "success",
  "terminated_conversations": [
    {}
  ]
}
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.

## Queue SMS Simulation Run — POST /v1/queue-sms-simulation-run

**Endpoint:** POST `https://api.getbluejay.ai/v1/queue-sms-simulation-run`
**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_id | string | ID of the simulation to be run |

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

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

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

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

def queue_sms_simulation_run(payload: dict, api_key: str) -> dict:
    url = "https://api.getbluejay.ai/v1/queue-sms-simulation-run"
    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.

Headers

X-API-Key
string
required

API key required to authenticate requests.

Body

application/json

Pydantic model for simulation run request

simulation_id
string
required

ID of the simulation to be run

prompt_id
string<uuid> | null

Prompt UUID associated with this run

knowledge_base_id
string<uuid> | null

Knowledge base UUID associated with this run

digital_human_ids
string[] | null

Digital human IDs to be used in the simulation

terminate_overlapping_simulations
boolean | null
default:false

If true, all overlapping conversations with same pair of phone numbers will be ended

Response

Successful Response

simulation_run_id
string
required

ID of the created simulation run

simulation_result_ids
string[]
required

IDs of the created simulation results (test results)

agent_id
string
required

ID of the agent associated with the simulation run

status
string
default:success

Status of the response

terminated_conversations
Terminated Conversations · object[] | null

List of conversations that were terminated due to overlapping phone numbers