curl --request POST \
--url https://tavusapi.com/v2/objectives \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"data": [
{
"objective_name": "ask_if_new_patient",
"objective_prompt": "Ask the patient if they are new or have been here before",
"confirmation_mode": "auto",
"output_variables": [
"patient_status"
],
"modality": "verbal",
"next_conditional_objectives": {
"new_patient_intake_process": "If the patient has never been to the practice before",
"existing_patient_intake_process": "If the patient has been to the practice before"
},
"next_required_objectives": [
"get_patient_name"
],
"callback_url": "https://your-server.com/webhook"
}
]
}
'{
"objectives_id": "o12345",
"objective_name": "New Objectives",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}This endpoint creates a new objective for a persona. Objectives provide goal-oriented instructions that help guide conversations toward specific achievements and desired outcomes.
curl --request POST \
--url https://tavusapi.com/v2/objectives \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"data": [
{
"objective_name": "ask_if_new_patient",
"objective_prompt": "Ask the patient if they are new or have been here before",
"confirmation_mode": "auto",
"output_variables": [
"patient_status"
],
"modality": "verbal",
"next_conditional_objectives": {
"new_patient_intake_process": "If the patient has never been to the practice before",
"existing_patient_intake_process": "If the patient has been to the practice before"
},
"next_required_objectives": [
"get_patient_name"
],
"callback_url": "https://your-server.com/webhook"
}
]
}
'{
"objectives_id": "o12345",
"objective_name": "New Objectives",
"status": "active",
"created_at": "2024-01-15T10:30:00Z"
}Array of objectives to create
Show child attributes
A descriptive name for the objective. This must be a string value without spaces.
"ask_if_new_patient"
The detailed prompt that defines what the objective should accomplish.
"Ask the patient if they are new or have been here before"
How the objective completion should be confirmed. If set to manual, the user will be prompted to confirm the objective completion. If set to auto, the LLM will determine whether the objective was completed or not.
auto, manual "auto"
Optional list of variables that should be extracted or collected during the objective.
["patient_status"]The communication modality for the objective. If set to verbal, the objective will be completed by the user's responses. If set to visual, the objective can only be completed by visual / perception cues observed by Raven.
verbal, visual "verbal"
A mapping of objective names to conditions that must be satisfied for that objective to be activated.
Show child attributes
{
"new_patient_intake_process": "If the patient has never been to the practice before",
"existing_patient_intake_process": "If the patient has been to the practice before"
}List of objective names that will be activated once the current objective is completed.
["get_patient_name"]Optional URL that will receive notifications when the objective is completed.
"https://your-server.com/webhook"
Objective created successfully
Unique identifier for the created objective
"o12345"
Name of the objective
"New Objectives"
Current status of the objective
"active"
ISO 8601 timestamp of when the objective was created
"2024-01-15T10:30:00Z"