POST
/
test_framework
/
v1
/
scenarios
/
create_scenario_from_transcript
/
cURL
curl --request POST \
  --url https://api.cekura.ai/test_framework/v1/scenarios/create_scenario_from_transcript/ \
  --header 'Content-Type: application/json' \
  --header 'X-CEKURA-API-KEY: <api-key>' \
  --data '{
  "personality": 123,
  "agent": 123,
  "assistant_id": "<string>",
  "transcript_json": {},
  "name": "<string>",
  "expected_outcome_prompt": "<string>"
}'
{
  "id": 123,
  "name": "<string>",
  "personality": 123,
  "personality_name": "<string>",
  "phone_number": "<string>",
  "expected_outcome_prompt": "<string>",
  "instructions": "<string>",
  "scenario_language": "ar",
  "tags": "<any>",
  "agent": 123,
  "inbound_phone_number": 123,
  "inbound_phone_number_data": {
    "id": 123,
    "number": "<string>",
    "phone_number_id": "<string>",
    "common": "<string>"
  },
  "metrics": [
    123
  ],
  "metric_names": "<string>",
  "first_message": "Hello",
  "tool_ids": "<any>",
  "test_profile": 123,
  "test_profile_data": {
    "id": 123,
    "agent": 123,
    "name": "<string>",
    "information": {}
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

X-CEKURA-API-KEY
string
header
required

API Key Authentication. It should be included in the header of each request.

Body

transcript_json
object
required

JSON representation of the conversation transcript

personality
integer

ID of the personality to use in the simulation

agent
integer

ID of the agent to use in the simulation

assistant_id
string

Assistant ID to use in the simulation

name
string

Name for the simulated scenario

expected_outcome_prompt
string

Prompt describing the expected outcome of the scenario

Response

name
string
required

Name of the scenario

Maximum length: 80
personality_name
string
required

Name of the personality used in this scenario

phone_number
string
required
expected_outcome_prompt
string
required
instructions
string
required

Detailed instructions that guide the AI agent's behavior in this scenario

agent
integer
required

Foreign key reference to the AI agent that owns this scenario

inbound_phone_number_data
object
required

Details of the phone number used for inbound calls

metric_names
string
required

List of metric names associated with this scenario

test_profile_data
object
required

Details of the test profile associated with this scenario

created_at
string<date-time>
required

Timestamp when the scenario was created

updated_at
string<date-time>
required

Timestamp when the scenario was last updated

id
integer

Unique identifier for the AI agent

personality
integer | null

Foreign key reference to the personality used in this scenario

scenario_language
enum<string> | null

Language code for the scenario (ISO language code)

  • ar - Arabic
  • bg - Bulgarian
  • zh - Chinese Simplified
  • cs - Czech
  • da - Danish
  • nl - Dutch
  • en - English
  • fi - Finnish
  • fr - French
  • de - German
  • el - Greek
  • hi - Hindi
  • hu - Hungarian
  • id - Indonesian
  • it - Italian
  • ja - Japanese
  • ko - Korean
  • ms - Malay
  • multi - Multilingual
  • no - Norwegian
  • pl - Polish
  • pt - Portuguese
  • ro - Romanian
  • ru - Russian
  • sk - Slovak
  • es - Spanish
  • sv - Swedish
  • tr - Turkish
  • uk - Ukrainian
  • vi - Vietnamese
Available options:
ar,
bg,
zh,
cs,
da,
nl,
en,
fi,
fr,
de,
el,
hi,
hu,
id,
it,
ja,
ko,
ms,
multi,
no,
pl,
pt,
ro,
ru,
sk,
es,
sv,
tr,
uk,
vi
tags
any

List of tags associated with this scenario for categorization

inbound_phone_number
integer | null

Foreign key reference to the phone number used for inbound calls

metrics
integer[]

List of metrics associated with this scenario for evaluation

first_message
string
default:Hello

The initial message that the AI agent will send when the scenario starts

Maximum length: 1000
tool_ids
any

List of tool IDs that are available for use in this scenario

test_profile
integer | null

Foreign key reference to the test profile used for scenario evaluation