POST
/
v2
/
objectives
Create Objectives
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"
}

Authorizations

x-api-key
string
header
required

Body

application/json
data
object[]
required

Array of objectives to create

Response

Objective created successfully

objectives_id
string

Unique identifier for the created objective

Example:

"o12345"

objective_name
string

Name of the objective

Example:

"New Objectives"

status
string

Current status of the objective

Example:

"active"

created_at
string

ISO 8601 timestamp of when the objective was created

Example:

"2024-01-15T10:30:00Z"