Generate scenarios from uploaded transcripts - Cognigy Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API Endpoint
POST /v1/generate-from-transcript
Description
Generate scenarios from uploaded transcripts
Request Example
cURL
curl --request POST \
--url https://api-trial.cognigy.ai/testing/v1/generate-from-transcript \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
'```
#### Python
```python
import requests
url = "https://api-trial.cognigy.ai/testing/v1/generate-from-transcript"
payload = {
"projectId": "683ef2a378a878cc6550f78b",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"flowReference": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
Successful Response
Status Code
200
Example Response
{
"success": true,
"scenarios": [
{
"simulationName": "Order Status Inquiry",
"personaName": "Impatient Online Shopper",
"personaDescription": "A busy professional who ordered a product 3 days ago and hasn't received shipping updates. They are growing increasingly frustrated and want immediate answers.",
"mission": "Get a definitive answer about the order status and expected delivery date",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Order Located",
"text": "The agent successfully locates and identifies the customer's order"
}
},
{
"type": "text",
"params": {
"name": "Status Communicated",
"text": "The current shipping status is clearly communicated to the customer"
}
},
{
"type": "text",
"params": {
"name": "Delivery Date Provided",
"text": "An expected delivery date is provided to the customer"
}
}
]
},
{
"simulationName": "Return Process Assistance",
"personaName": "Confused Return Requester",
"personaDescription": "A customer who received a damaged item and wants to return it but is unfamiliar with the return process. They need step-by-step guidance.",
"mission": "Successfully initiate a return for a damaged item and understand the refund timeline",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Return Initiated",
"text": "A return request is successfully created for the damaged item"
}
},
{
"type": "text",
"params": {
"name": "Process Explained",
"text": "The return process steps are clearly explained to the customer"
}
},
{
"type": "text",
"params": {
"name": "Refund Timeline",
"text": "The expected refund timeline is communicated"
}
}
]
},
{
"simulationName": "Account Access Recovery",
"personaName": "Locked Out Account Holder",
"personaDescription": "A long-time customer who has been locked out of their account after multiple failed login attempts. They are anxious about accessing recent purchase history.",
"mission": "Regain access to the locked account and verify recent purchase information",
"successCriteria": [
{
"type": "text",
"params": {
"name": "Identity Verified",
"text": "The customer's identity is verified through security questions"
}
},
{
"type": "text",
"params": {
"name": "Account Unlocked",
"text": "The account is successfully unlocked and access is restored"
}
},
{
"type": "text",
"params": {
"name": "Purchase History",
"text": "The customer can access their recent purchase history"
}
}
]
}
],
"metadata": {
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filesProcessed": 2,
"totalTextLength": 4500,
"model": "default",
"processedAt": "2026-02-08T14:35:00.000Z",
"generationTimeMs": 12500
}
}
Authorization
Required: JWT Bearer Token for authentication
Query Parameters
projectId: Project identifier
Request Body
Content-Type: application/json
requestId: Required. Request ID from the create-request step (all files uploaded for this request are used).numberOfSuccessCriteria: Required. Number of success criteria per scenario (1-10), Required range:1 <= x <= 10flowReference: Optional flow reference (MongoDB ObjectId) for context-aware generation, Pattern:^[a-fA-F0-9]{24}$.