Skip to main content
PUT
/
api
/
roleplay
/
{id}
Update Roleplay
curl --request PUT \
  --url https://app.replay.sale/api/roleplay/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "title": "<string>",
  "instructions": "<string>",
  "objective": "<string>",
  "passingScore": 50,
  "isLive": true,
  "isBlind": true,
  "language": "<string>",
  "conversationStarters": [
    "<string>"
  ],
  "keyterms": [
    "<string>"
  ],
  "timerInSeconds": 1,
  "showResults": true,
  "maxAttempts": 1,
  "shouldActAsCustomer": true,
  "requireVideoRecording": true,
  "customAttributes": {
    "scorecard_id": "sc_789",
    "fs_category": "customer_service",
    "difficulty": "intermediate"
  }
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "title": "<string>",
  "instructions": "<string>",
  "passingScore": 50,
  "isLive": true,
  "conversationType": {
    "title": "<string>",
    "roleplayType": "<string>"
  },
  "customerPersona": {
    "name": "<string>",
    "imageUrl": "<string>",
    "tags": [
      "<string>"
    ]
  },
  "customerBackground": {
    "title": "<string>",
    "tags": [
      "<string>"
    ]
  },
  "customAttributes": {
    "scorecard_id": "sc_789",
    "fs_category": "customer_service",
    "difficulty": "intermediate"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.replay.sale/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

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

Path Parameters

id
string<uuid>
required

The UUID of the premade roleplay to update

Body

application/json

At least one field must be provided. Only the specified fields will be updated.

title
string

Title of the roleplay

Minimum string length: 1
instructions
string

Instructions for the user

objective
string

Live instructions shown to the user during the roleplay

passingScore
integer

Minimum score to pass (0-100)

Required range: 0 <= x <= 100
isLive
boolean

Whether the roleplay is live and accessible to users (true) or in draft mode (false)

isBlind
boolean

If true, scoring criteria are hidden from the user

language
string

Language code: 'en', 'es', 'fr-CA', 'pt-BR', 'cs'

conversationStarters
string[]

Opening conversation prompts shown to the user

keyterms
string[]

Key terms relevant to the roleplay

timerInSeconds
integer | null

Time limit in seconds. null = no limit.

Required range: x >= 0
showResults
boolean

Whether to show results after roleplay completion

maxAttempts
integer | null

Maximum attempts allowed. null = unlimited.

Required range: x >= 0
shouldActAsCustomer
boolean

Whether the AI acts as the customer (true) or the rep (false)

requireVideoRecording
boolean

Whether video recording is required

customAttributes
object

Custom key-value pairs for external integrations (LMS systems, analytics, etc.)

Example:
{
"scorecard_id": "sc_789",
"fs_category": "customer_service",
"difficulty": "intermediate"
}

Response

Successfully updated roleplay

id
string<uuid>
required

Unique identifier for the premade roleplay

title
string
required

Title of the roleplay

instructions
string | null
required

Instructions for the user

passingScore
integer
required

Minimum score required to pass

Required range: 0 <= x <= 100
isLive
boolean
required

Whether the roleplay is live and accessible to users (true) or in draft mode (false)

conversationType
object
required
customerPersona
object
required
customerBackground
object
required
customAttributes
object

Custom key-value pairs for external integrations (LMS systems, analytics, etc.)

Example:
{
"scorecard_id": "sc_789",
"fs_category": "customer_service",
"difficulty": "intermediate"
}