---
title: "Create Scenario"
method: POST
path: "/scenarios/{project_id}"
tags: ["Scenarios"]
---

# Create Scenario

`POST /scenarios/{project_id}`

## Request

- Base URL: `https://api.puppeteerai.com`
- URL: `https://api.puppeteerai.com/scenarios/{project_id}`
- Auth: none declared. Required headers: `Authorization`

Create a new test scenario for a project.

## Path parameters

- `project_id` string, required

## Headers

- `Authorization` string, required

## Request body

- ScenarioInput: Full scenario payload. Every field except ``env_secrets`` is stored verbatim.
  - `name` string, required: Human-readable label for the scenario
  - `description` string, nullable: What this scenario is meant to test
  - `json_data` object, nullable: Initial mocked data that seeds the conversation
  - `mock_responses` object, nullable: Predefined HTTP-service responses keyed by service name
  - `trigger_data` object, nullable: Maps a trigger class name to the payload delivered to its check() when the scenario is applied, e.g. {'ReceivedHealthieWebhookTrigger': {...}}.
  - `env_variables` object, nullable: Environment variable overrides for this scenario
  - `env_secrets` object, nullable: Environment secret overrides, merged per key: the '****' mask keeps the stored value, any other value replaces it, and an omitted key is removed.
  - `retell_account_id` string, nullable: Voice integration used when the scenario is run in voice mode

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api.md) - [All operations](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/revisions/94b4e928b42f?raw)
