---
title: "Generate scenario instructions"
method: POST
path: "/test_framework/v2/scenarios/generate-instructions/"
tags: ["test_framework"]
---

# Generate scenario instructions

`POST /test_framework/v2/scenarios/generate-instructions/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/test_framework/v2/scenarios/generate-instructions/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer

Generate scenario instructions

## Request body

- ScenarioSerializerV2
  - `id` integer
  - `name` string: Name of the scenario
  - `agent` integer: Agent ID Example: `2142`
  - `project` integer, nullable
  - `assistant_id` string: Alternative to agent ID - the assistant ID to use for this scenario Example: `"asst_1234567890"`
  - `personality` integer, required: Personality ID Example: `123`
  - `personality_name` string: Name of the personality used in this scenario Example: `"Normal Male"`
  - `agent_name` string: Name of the agent associated with this scenario Example: `"Customer Support Agent"`
  - `tags` unknown
  - `tool_ids` unknown
  - `metrics` unknown
  - `metric_names` string: List of metric names associated with this scenario Example: `["Metric 1", "Metric 2"]`
  - `phone_number` integer, nullable: Phone number ID - Used for both inbound and outbound calls Example: `123`
  - `outbound_phone_number_data` PhoneNumberInbound
    - `id` integer
    - `number` string, required
    - `phone_number_id` string, required
  - `first_message` string: First message to be sent to the Main Agent
  - `inbound_phone_number` integer, nullable: (Deprecated) Use phone_number instead. This field is maintained for backward compatibility only. When phone_number is set, this field will be automatically synced. Example: `123`
  - `inbound_phone_number_data` PhoneNumberInbound
    - `id` integer
    - `number` string, required
    - `phone_number_id` string, required
  - `instructions` string: Scenario Instructions
  - `conditional_actions` unknown
  - `condition_audio` object: Pre-recorded clips available to this scenario's conditional actions, keyed by clip id. Read-only: upload, replace and delete clips, and correct a transcript, through `condition-audio/`. Reference a clip from any number of verbatim steps by pasting its `tag`; `steps` lists where it is used (e.g. `conditions[1].then[0]`). Example: ```json { "greeting": {"tag": "<audio id=\"greeting\"/>", "filename": "greeting.wav", "status": "ready", "duration": 2.4, "transcript": "Hi, is this the clinic?", "steps": ["first_message", "conditions[1]"]} } ```
  - `simulation_description` string
  - `information_fields` unknown
  - `expected_outcome_prompt` string: Expected Outcome Prompt Example: `"The user should be able to complete the order"`
  - `scenario_language` 'af' | 'ar' | 'bn' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'et' | 'fi' | 'fr' | 'de' | 'el' | 'gu' | 'hi' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'ms' | 'ml' | 'mr' | 'multi' | 'no' | 'pl' | 'pa' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'th' | 'tr' | 'tl' | 'ta' | 'te' | 'uk' | 'uz' | 'vi': Language of the scenario * `af` - Afrikaans * `ar` - Arabic * `bn` - Bengali * `bg` - Bulgarian * `zh` - Chinese Simplified * `cs` - Czech * `da` - Danish * `nl` - Dutch * `en` - English * `et` - Estonian * `fi` - Finnish * `fr` - French * `de` - German * `el` - Greek * `gu` - Gujarati * `hi` - Hindi * `he` - Hebrew * `hu` - Hungarian * `id` - Indonesian * `it` - Italian * `ja` - Japanese * `kn` - Kannada * `kk` - Kazakh * `ko` - Korean * `ms` - Malay * `ml` - Malayalam * `mr` - Marathi * `multi` - Multilingual * `no` - Norwegian * `pl` - Polish * `pa` - Punjabi * `pt` - Portuguese * `ro` - Romanian * `ru` - Russian * `sk` - Slovak * `es` - Spanish * `sv` - Swedish * `th` - Thai * `tr` - Turkish * `tl` - Tagalog * `ta` - Tamil * `te` - Telugu * `uk` - Ukrainian * `uz` - Uzbek * `vi` - Vietnamese
  - `scenario_type` 'instruction' | 'conditional_actions': Type of scenario. Defaults to `instruction`. Must be sent as `conditional_actions` when the request includes the `conditional_actions` field. * `instruction` - Instruction * `conditional_actions` - Conditional Actions
  - `suite_type` 'undefined' | 'infrastructure': Type of predefined suite (e.g., infrastructure) * `undefined` - Undefined * `infrastructure` - Infrastructure
  - `is_predefined` boolean: Whether this is a predefined scenario (template)
  - `test_profile` integer, nullable
  - `test_profile_data` AIAgentTestProfile
    - `id` integer
    - `project` integer, nullable
    - `agent` integer, nullable
    - `agent_name` string: Name of the agent associated with this test profile Example: `"Customer Support Agent"`
    - `name` string, required
    - `information` unknown
    - `created_by` integer, nullable: ID of the user who created this test profile
    - `last_updated_by` integer, nullable: ID of the user who last updated this test profile
    - `created_at` string, date-time: Timestamp when the test profile was created
    - `updated_at` string, date-time: Timestamp when the test profile was last updated
  - `dynamic_variable_values` unknown
  - `generated_mock_tool_entries` unknown
  - `folder_path` string, nullable: Path of an existing folder to assign this evaluator to, e.g. "Sales" or "Sales.Inbound". Create it first with the create-folder endpoint.
  - `max_duration` integer, nullable: Max call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting. Valid range: 10-3600 seconds (10 seconds to 60 minutes) Example: `600` (10 minutes)

## Response `200`

- ScenarioSerializerV2
  - `id` integer
  - `name` string: Name of the scenario
  - `agent` integer: Agent ID Example: `2142`
  - `project` integer, nullable
  - `assistant_id` string: Alternative to agent ID - the assistant ID to use for this scenario Example: `"asst_1234567890"`
  - `personality` integer, required: Personality ID Example: `123`
  - `personality_name` string: Name of the personality used in this scenario Example: `"Normal Male"`
  - `agent_name` string: Name of the agent associated with this scenario Example: `"Customer Support Agent"`
  - `tags` unknown
  - `tool_ids` unknown
  - `metrics` unknown
  - `metric_names` string: List of metric names associated with this scenario Example: `["Metric 1", "Metric 2"]`
  - `phone_number` integer, nullable: Phone number ID - Used for both inbound and outbound calls Example: `123`
  - `outbound_phone_number_data` PhoneNumberInbound
    - `id` integer
    - `number` string, required
    - `phone_number_id` string, required
  - `first_message` string: First message to be sent to the Main Agent
  - `inbound_phone_number` integer, nullable: (Deprecated) Use phone_number instead. This field is maintained for backward compatibility only. When phone_number is set, this field will be automatically synced. Example: `123`
  - `inbound_phone_number_data` PhoneNumberInbound
    - `id` integer
    - `number` string, required
    - `phone_number_id` string, required
  - `instructions` string: Scenario Instructions
  - `conditional_actions` unknown
  - `condition_audio` object: Pre-recorded clips available to this scenario's conditional actions, keyed by clip id. Read-only: upload, replace and delete clips, and correct a transcript, through `condition-audio/`. Reference a clip from any number of verbatim steps by pasting its `tag`; `steps` lists where it is used (e.g. `conditions[1].then[0]`). Example: ```json { "greeting": {"tag": "<audio id=\"greeting\"/>", "filename": "greeting.wav", "status": "ready", "duration": 2.4, "transcript": "Hi, is this the clinic?", "steps": ["first_message", "conditions[1]"]} } ```
  - `simulation_description` string
  - `information_fields` unknown
  - `expected_outcome_prompt` string: Expected Outcome Prompt Example: `"The user should be able to complete the order"`
  - `scenario_language` 'af' | 'ar' | 'bn' | 'bg' | 'zh' | 'cs' | 'da' | 'nl' | 'en' | 'et' | 'fi' | 'fr' | 'de' | 'el' | 'gu' | 'hi' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'ms' | 'ml' | 'mr' | 'multi' | 'no' | 'pl' | 'pa' | 'pt' | 'ro' | 'ru' | 'sk' | 'es' | 'sv' | 'th' | 'tr' | 'tl' | 'ta' | 'te' | 'uk' | 'uz' | 'vi': Language of the scenario * `af` - Afrikaans * `ar` - Arabic * `bn` - Bengali * `bg` - Bulgarian * `zh` - Chinese Simplified * `cs` - Czech * `da` - Danish * `nl` - Dutch * `en` - English * `et` - Estonian * `fi` - Finnish * `fr` - French * `de` - German * `el` - Greek * `gu` - Gujarati * `hi` - Hindi * `he` - Hebrew * `hu` - Hungarian * `id` - Indonesian * `it` - Italian * `ja` - Japanese * `kn` - Kannada * `kk` - Kazakh * `ko` - Korean * `ms` - Malay * `ml` - Malayalam * `mr` - Marathi * `multi` - Multilingual * `no` - Norwegian * `pl` - Polish * `pa` - Punjabi * `pt` - Portuguese * `ro` - Romanian * `ru` - Russian * `sk` - Slovak * `es` - Spanish * `sv` - Swedish * `th` - Thai * `tr` - Turkish * `tl` - Tagalog * `ta` - Tamil * `te` - Telugu * `uk` - Ukrainian * `uz` - Uzbek * `vi` - Vietnamese
  - `scenario_type` 'instruction' | 'conditional_actions': Type of scenario. Defaults to `instruction`. Must be sent as `conditional_actions` when the request includes the `conditional_actions` field. * `instruction` - Instruction * `conditional_actions` - Conditional Actions
  - `suite_type` 'undefined' | 'infrastructure': Type of predefined suite (e.g., infrastructure) * `undefined` - Undefined * `infrastructure` - Infrastructure
  - `is_predefined` boolean: Whether this is a predefined scenario (template)
  - `test_profile` integer, nullable
  - `test_profile_data` AIAgentTestProfile
    - `id` integer
    - `project` integer, nullable
    - `agent` integer, nullable
    - `agent_name` string: Name of the agent associated with this test profile Example: `"Customer Support Agent"`
    - `name` string, required
    - `information` unknown
    - `created_by` integer, nullable: ID of the user who created this test profile
    - `last_updated_by` integer, nullable: ID of the user who last updated this test profile
    - `created_at` string, date-time: Timestamp when the test profile was created
    - `updated_at` string, date-time: Timestamp when the test profile was last updated
  - `dynamic_variable_values` unknown
  - `generated_mock_tool_entries` unknown
  - `folder_path` string, nullable: Path of an existing folder to assign this evaluator to, e.g. "Sales" or "Sales.Inbound". Create it first with the create-folder endpoint.
  - `max_duration` integer, nullable: Max call duration in seconds for this scenario. If not provided or set to null, the scenario will use the project's max_call_duration setting. Valid range: 10-3600 seconds (10 seconds to 60 minutes) Example: `600` (10 minutes)

## Changes

- **2026-11-03** `a6fb6a739212`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/test_framework/v2/scenarios/generate-instructions/post.md)

---

[API](https://skmtc.dev/cekura/apis/cekura-api.md) - [All operations](https://skmtc.dev/cekura/apis/cekura-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cekura/apis/cekura-api/revisions/a6fb6a739212?raw)
