Skip to main content
POST
/
v1
/
generate-from-transcript
Generate scenarios from uploaded transcripts
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
}
'
{
  "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
  }
}

Authorizations

Authorization
string
header
required

JWT Bearer Token for authentication

Query Parameters

projectId
string

Project identifier

Body

application/json
requestId
string
required

Request ID from the create-request step (all files uploaded for this request are used)

numberOfSuccessCriteria
integer
required

Number of success criteria per scenario (required, 1-10)

Required range: 1 <= x <= 10
projectId
string

Project identifier

flowReference
string

Optional flow reference (MongoDB ObjectId) for context-aware generation

Pattern: ^[a-fA-F0-9]{24}$

Response

Scenarios generated successfully

success
boolean
required
scenarios
object[]
required

3 generated simulation scenarios

metadata
object
required
Last modified on July 2, 2026