---
title: "Create scenarios from call logs"
method: POST
path: "/observability/v2/call-logs/create_scenarios/"
tags: ["observability"]
---

# Create scenarios from call logs

`POST /observability/v2/call-logs/create_scenarios/`

## Request

- Base URL: `https://api.cekura.ai`
- URL: `https://api.cekura.ai/observability/v2/call-logs/create_scenarios/`
- Auth: one of:
  - API key in header `X-CEKURA-API-KEY`
  - HTTP bearer
  - HTTP bearer
  - HTTP bearer

Generate test scenarios from real production call logs.

Returns a `progress_id` immediately — the actual scenario creation runs in the background.
Poll `GET /observability/v1/call-logs/create_scenarios_progress?progress_id=<id>` until
`completed_scenarios + failed_scenarios >= total_scenarios`. The `scenarios_list` field
(full Scenario objects) is populated only once processing is complete.

**`call_logs` accepts:** a list of IDs `[1, 2, 3]` or `"all"` for every call log on the agent.

**`copy_to_agent`:** optionally copy the generated scenarios to a different agent —
useful when your observation agent and your test agent are separate.

**Prerequisite:** call logs must have a transcript (uploaded via `transcript_json`).
Audio-only logs without a transcript cannot produce scenarios.

## Request body

- SchemaPostCreateScenarios
  - `agent_id` integer: Agent ID, required if assistant_id is not provided Example: `2142`
  - `assistant_id` string: Assistant ID, required if agent_id is not provided Example: `asst_1234567890`
  - `call_logs` integer[]: List of call log IDs to create scenarios from. Can also be the string "all" to process all call logs. Example: `[1, 2, 3]` or `"all"`
  - `copy_to_agent` integer, nullable: Optional agent ID to copy created scenarios to Example: `2142`
  - `project_id` integer: Project ID. Required when using folder_path. Example: `1376`
  - `folder_path` string, nullable: Folder path to assign the created scenarios to. Example: `"Sales.Inbound"`

## Response `200`

- object
  - `progress_id` string, uuid: Unique identifier for tracking the progress of scenario creation

## Other responses

- `400`
- `403`

## Changes

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

[Operation history](https://skmtc.dev/cekura/apis/cekura-api/changes/observability/v2/call-logs/create_scenarios/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)
