curl --request PATCH \
--url https://tavusapi.com/v2/objectives/{objectives_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"op": "replace",
"path": "/objective_name",
"value": "updated_objective_name"
}
]
'{
"message": "Objective updated successfully"
}{
"error": "Invalid patch operation"
}{
"message": "Invalid access token"
}{
"error": "Objective not found"
}Objectives
Patch Objective
This endpoint allows you to update specific fields of an objective using JSON Patch operations.
PATCH
/
v2
/
objectives
/
{objectives_id}
curl --request PATCH \
--url https://tavusapi.com/v2/objectives/{objectives_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"op": "replace",
"path": "/objective_name",
"value": "updated_objective_name"
}
]
'{
"message": "Objective updated successfully"
}{
"error": "Invalid patch operation"
}{
"message": "Invalid access token"
}{
"error": "Objective not found"
}For AI agents, use
https://docs.tavus.io/openapi.yaml for the full HTTP API contract.Authorizations
Path Parameters
The unique identifier of the objective.
Example:
"o12345"
Body
application/json
Note: The path field is a JSON Pointer string that references a location within the target document where the operation is performed.
For example:
[
{ "op": "replace", "path": "/data/0/objective_name", "value": "updated_objective_name" },
{ "op": "replace", "path": "/data/0/objective_prompt", "value": "Updated prompt for the objective" },
{ "op": "replace", "path": "/data/0/confirmation_mode", "value": "manual" },
{ "op": "add", "path": "/data/0/output_variables", "value": ["new_variable"] },
{ "op": "replace", "path": "/data/0/modality", "value": "visual" },
{ "op": "remove", "path": "/data/0/callback_url" }
]
The operation to perform. Must be one of: add, remove, replace, copy, move, test
Available options:
add, remove, replace, copy, move, test Example:
"replace"
A JSON Pointer string that references a location within the target document where the operation is performed
Example:
"/objective_name"
The value to be used within the operation. This field is not required for the remove operation.
Example:
"updated_objective_name"
Response
Objective updated successfully
Success message
Example:
"Objective updated successfully"

