---
title: "Generate Test Scenarios"
method: POST
path: "/v1/generate-test-scenarios"
---

# Generate Test Scenarios

`POST /v1/generate-test-scenarios`

Generates test scenarios for a given simulation.

Accepts a SimulationRequest with the following structure:
{
    name: string;
    agent: Agent;
    promptId?: string;
    knowledgeBaseId?: string;
    scenarios: TestScenarioRequest[];
    callAllocation: {
        goalAdherence: { [key: string]: number };
        systemIntegrity: { [key: string]: number };
        customerPersonas: { [key: string]: number };
        workflowAdherence: { [key: string]: number };
        workflowAdherenceV2: { [key: string]: number };
        expectedToolCalls: [{name: string, output: string}, {name: string, output: string}, ...];
        customPrompt: {prompt: string, count: number};
        transcriptGeneration: [{transcript: string, success_criteria?: string, use_specific_utterances?: boolean}, ...];
            // For transcriptGeneration:
            // - transcript: Required. The transcript text to analyze
            // - success_criteria: Optional. If not provided, will be auto-generated from transcript
            // - If use_specific_utterances is true (default): customer utterances extracted and stored as JSON string in scenario description
            // - If use_specific_utterances is false: persona intent description generated in natural language
        csvCallAllocation: [{intent: string, success_criteria: string, count: number}, ...];
            // For csvCallAllocation:
            // - intent: Required. The customer intent/description for the scenario
            // - success_criteria: Required. The success criteria for the scenario
            // - count: Required. Number of scenarios to generate with this intent and success criteria
    };
    selectedProperties: {
        [category: string]: string[];
    };
    customerTraits?: [
        {name: string, data_type: "boolean" | "string" | "date" | "number"}
    ];
}

## Headers

- `X-API-Key` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/revisions/4ef94eeb836d/schema)
