Skip to main content
PATCH
/
personas
/
{persona_id}
Update persona
curl --request PATCH \
  --url https://api.coval.dev/v1/personas/{persona_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "voice_name": "aria",
  "language_code": "en-US",
  "wait_seconds": 0.8
}
'
{
  "persona": {
    "resource_name": "personas/3zfmuDbVQsi4GaseDtiVcS",
    "id": "3zfmuDbVQsi4GaseDtiVcS",
    "name": "Friendly Customer",
    "create_time": "2025-01-24T10:00:00Z",
    "persona_prompt": "You are a friendly customer calling for technical support...",
    "voice_name": "aria",
    "language_code": "en-US",
    "background_sound": "office",
    "wait_seconds": 0.5,
    "conversation_initiation": "speak_first",
    "hold_music_timeout_seconds": 15,
    "update_time": "2025-01-24T12:30:00Z"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

persona_id
string
required

Persona resource ID

Body

application/json

All fields are optional. Only provided fields will be updated.

name
string | null

Human-readable persona name

Required string length: 1 - 200
persona_prompt
string | null

Instructions describing persona behavior and personality

voice_name
string | null

Coval voice name. Use GET /personas/voices to discover available voices and their supported language codes.

language_code
string | null

BCP-47 language code for voice synthesis. Must be supported by the selected voice. Use GET /personas/voices to discover valid voice and language combinations.

background_sound
enum<string> | null

Background noise type

Available options:
off,
office,
lounge,
crowd,
airport,
bus,
playground,
doorbell,
train-arrival,
portable-air-conditioner,
skatepark,
small-dog-bark,
cafe,
ferry-and-announcement,
heavy-rain,
moderate-wind,
newborn-baby-crying,
office-with-alarm,
street-with-sirens,
construction-work
Maximum string length: 100
wait_seconds
number<float> | null

Response delay in seconds

Required range: 0.1 <= x <= 2
conversation_initiation
enum<string> | null

Who initiates the conversation

Available options:
speak_first,
wait_for_user
hold_music_timeout_seconds
number<float> | null

Disconnect after this many seconds of no speech (5-300)

Required range: 5 <= x <= 300

Response

Persona updated successfully

persona
object
required

Persona resource representation returned by API responses.