Skip to main content
POST
/
api
/
roleplay
/
generate-from-transcript
Generate Roleplay From Transcript
curl --request POST \
  --url https://app.replay.sale/api/roleplay/generate-from-transcript \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data @- <<EOF
{
  "uniqueIdentifier": "user-123",
  "transcript": "Hello, how can I help you today? I'm having trouble with my internet connection.",
  "metadata": {
    "uploadDate": "2025-01-24T12:00:00Z",
    "duration": 120000,
    "participants": [
      "John Doe",
      "Jane Smith"
    ]
  }
}
EOF
{
  "status": "success",
  "message": "Transcript received and processing started"
}

Authorizations

x-api-key
string
header
required

API key for authentication. Get your API key from your company settings.

Body

application/json
uniqueIdentifier
string
required

Unique identifier for the external user. Used for user resolution:

Existing User: If a user with the same uniqueIdentifier exists for the company, their record is used New User: If no matching user exists, an Integration user is automatically created with the provided uniqueIdentifier, associated with the company's Integration team

Minimum string length: 1
Example:

"user-123"

transcript
string
required

The transcript text to process. This will be stored and processed on-demand when the user views the recording.

Minimum string length: 1
Example:

"Hello, how can I help you today? I'm having trouble with my internet connection."

metadata
object

Optional metadata about the transcript

Response

Transcript received successfully. Processing will happen asynchronously. The recording will be available for the user to view, and snippets will be generated on-demand when the user selects this recording.

status
enum<string>
required

Indicates the transcript was received successfully

Available options:
success
Example:

"success"

message
string
required

Confirmation message

Example:

"Transcript received and processing started"