> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbluejay.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v2/queue-simulation-run

> Run a simulation.

Queues a run of a simulation and returns the run ID. The calls run after the response. Poll [Retrieve Simulation Results](https://docs.getbluejay.ai/api-reference/endpoint/retrieve-simulation-results-v2.md) for results.- Send `simulation_id`, or the `bluejay_as_code_id` of the simulation.
- If you omit `digital_human_ids`, all Digital Humans in the simulation run.
- `runs_per_digital_human` overrides the simulation setting for this run. The default is 1.
- `phone_number`, `sip_uri`, and the provider agent IDs override the agent values for this run only.
- `prompt_id` is deprecated. Use `agent_version_id`. If you send both and they differ, the response is 400.
- `ci` tags the run with the pipeline that queued it. See [CI/CD](https://docs.getbluejay.ai/api-reference/ci-cd.md).## SMS agentsAn SMS agent runs through this endpoint too: Bluejay texts it instead of calling it.- Your organization needs SMS testing enabled. Otherwise the response is 403 `sms_testing_not_enabled`.
- Every Digital Human in the run needs a phone number. Otherwise the response is 400.
- If `terminate_overlapping_simulations` is `true`, Bluejay ends running conversations that use the same pair of phone numbers.
- `phone_number`, `sip_uri`, and the provider agent IDs do not apply.## Headers

\<table><thead><tr><th>Name</th>
            \<th>Type</th>
            \<th>Required</th>
            \<th>Description</th></tr></thead>
        \<tbody /></table>

## Request body

\<table><thead><tr><th>Name</th>
            \<th>Type</th>
            \<th>Required</th>
            \<th>Description</th></tr></thead>
        \<tbody /></table>

## Response

\<table><thead><tr><th>Name</th>
            \<th>Type</th>
            \<th>Required</th>
            \<th>Description</th></tr></thead>
        \<tbody /></table>

## Status codes| Status | Meaning |
| - | - |
| `200` | Successful Response |
| `422` | Validation Error |## Example request```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
curl --request POST \
  --url https://api.getbluejay.ai/v2/queue-simulation-run \
  --header 'X-API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "digital_human_ids": [
      "<string>"
    ],
    "phone_number": "<string>",
    "sip_uri": "<string>",
    "livekit_agent_name": "<string>",
    "livekit_metadata": {},
    "pipecat_agent_name": "<string>",
    "pipecat_agent_configuration": {},
    "pipecat_room_properties": {},
    "eleven_labs_agent_id": "<string>",
    "retell_agent_id": "<string>",
    "vapi_assistant_id": "<string>",
    "runs_per_digital_human": 123,
    "ci": {
      "provider": "<string>",
      "repository": "<string>",
      "commit_sha": "<string>",
      "branch": "<string>",
      "pull_request": "<string>",
      "pipeline_run_url": "https://example.com"
    },
    "terminate_overlapping_simulations": false
  }'
```## Example response```json 200 theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "simulation_run_id": "<string>",
  "simulation_result_ids": [
    "<string>"
  ],
  "agent_id": "<string>",
  "status": "success",
  "run_url": "<string>",
  "terminated_conversations": [
    {}
  ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.