Create scenario from transcript - Cognigy Documentation
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
POST
/personas/from-transcript
Try it
cURL
withSessionId
curl --request POST \
--url https://api-trial.cognigy.ai/testing/personas/from-transcript \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"projectReference": "683ef2a378a878cc6550f78b",
"sessionId": "session-8f9046b1-6f80-474c-9ce7-24866dbd7cf3",
"flowId": "683ef3d978a878cc6550fb9d",
"numberOfSuccessCriteria": 5
}
'
200
Example
{
"success": true,
"personaPackage": {
"simulationName": "Account Unlock Request",
"personaName": "Frustrated Traveler",
"personaDescription": "A business traveler who is tech-savvy but stressed due to being locked out of their account before an important flight. Communicates directly and expects quick resolutions.",
"mission": "Unlock the account quickly to access booking information for an upcoming flight",
"successCriteria": [
{
"name": "Account Unlocked",
"text": "User successfully regains access to their account"
},
{
"name": "Booking Confirmed",
"text": "User can view and confirm their flight booking details"
},
{
"name": "Security Verified",
"text": "Account security is verified and strengthened"
}
]
},
"metadata": {
"transcriptSummary": "8-turn conversation (4 user, 4 bot): \"Hi, I need help unlocking my account. I have a flight in 2 hours...\"",
"analysisTimestamp": "2024-10-22T10:00:43.000Z",
"warnings": [],
"turnCount": 8,
"extractedIntents": [
"Unlock account",
"Access flight booking",
"Verify travel details"
],
"messages": [
{
"source": "user",
"content": "Hi, I need help unlocking my account. I have a flight in 2 hours and I cannot access my booking.",
"timestamp": "2024-10-22T10:00:00.000Z"
},
{
"source": "bot",
"content": "Hello! I can help you unlock your account. Can you please provide me with your email address?",
"timestamp": "2024-10-22T10:00:05.000Z"
},
{
"source": "user",
"content": "My email is traveler@example.com",
"timestamp": "2024-10-22T10:00:15.000Z"
},
{
"source": "bot",
"content": "Thank you. I have found your account. For security purposes, can you verify your date of birth?",
"timestamp": "2024-10-22T10:00:20.000Z"
},
{
"source": "user",
"content": "January 15, 1985",
"timestamp": "2024-10-22T10:00:30.000Z"
},
{
"source": "bot",
"content": "Perfect. Your account has been unlocked. You should now be able to access your booking.",
"timestamp": "2024-10-22T10:00:35.000Z"
},
{
"source": "user",
"content": "Thank you! Can you confirm my flight details?",
"timestamp": "2024-10-22T10:00:45.000Z"
},
{
"source": "bot",
"content": "Your flight is scheduled for today at 12:00 PM, Flight AB123 to New York.",
"timestamp": "2024-10-22T10:00:50.000Z"
}
]
}
}
Authorizations
bearerAuthapiKeyAuthbearerAuthapiKeyAuth
Authorization
string
header
required
JWT Bearer Token for authentication
Query Parameters
projectId
string
Project identifier (alternative to projectReference in body)
Body
application/json
projectReference
string
Project reference for context identification (alternative to projectId query parameter)
sessionId
string
Session identifier to retrieve transcript from analytics service. If provided, takes precedence over transcriptContent.
transcriptContent
object
Direct transcript content. Optional if sessionId is provided.
flowId
string
Optional: Flow ID to associate with and extract agent context for enhanced generation
numberOfSuccessCriteria
integer
default:5
Optional: Number of success criteria to generate (default: 5, min: 1, max: 10)
Required range: 1 <= x <= 10
Response
200
application/json
Scenario created successfully from transcript
success
boolean
required
Whether the generation was successful
personaPackage
object
required
Generated persona package
metadata
object
required
Analysis metadata