Patch Deployment
curl --request PATCH \
--url https://tavusapi.com/v2/deployments/{deployment_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"op": "replace",
"path": "/name",
"value": "Support widget"
}
]
'import requests
url = "https://tavusapi.com/v2/deployments/{deployment_id}"
payload = [
{
"op": "replace",
"path": "/name",
"value": "Support widget"
}
]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([{op: 'replace', path: '/name', value: 'Support widget'}])
};
fetch('https://tavusapi.com/v2/deployments/{deployment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tavusapi.com/v2/deployments/{deployment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
[
'op' => 'replace',
'path' => '/name',
'value' => 'Support widget'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tavusapi.com/v2/deployments/{deployment_id}"
payload := strings.NewReader("[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://tavusapi.com/v2/deployments/{deployment_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/deployments/{deployment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]"
response = http.request(request)
puts response.read_body{
"deployment_id": "d1234567890abcdef",
"pal_id": "pcb7a34da5fe",
"channel": "widget",
"status": "draft",
"name": "<string>",
"has_password": true,
"customization": {},
"replica_thumbnail_video_url": "<string>",
"thumbnail_video_url": "<string>",
"thumbnail_image_url": "<string>",
"limits": {},
"allowed_origins": [
"<string>"
],
"usage_total": 123,
"usage_today": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid JSON patch format"
}Deployments
Patch Deployment
Apply a JSON Patch array to the deployment document.
Send the ETag from GET as If-Match for optimistic concurrency.
PATCH
/
v2
/
deployments
/
{deployment_id}
Patch Deployment
curl --request PATCH \
--url https://tavusapi.com/v2/deployments/{deployment_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
[
{
"op": "replace",
"path": "/name",
"value": "Support widget"
}
]
'import requests
url = "https://tavusapi.com/v2/deployments/{deployment_id}"
payload = [
{
"op": "replace",
"path": "/name",
"value": "Support widget"
}
]
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([{op: 'replace', path: '/name', value: 'Support widget'}])
};
fetch('https://tavusapi.com/v2/deployments/{deployment_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tavusapi.com/v2/deployments/{deployment_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
[
'op' => 'replace',
'path' => '/name',
'value' => 'Support widget'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tavusapi.com/v2/deployments/{deployment_id}"
payload := strings.NewReader("[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://tavusapi.com/v2/deployments/{deployment_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://tavusapi.com/v2/deployments/{deployment_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"op\": \"replace\",\n \"path\": \"/name\",\n \"value\": \"Support widget\"\n }\n]"
response = http.request(request)
puts response.read_body{
"deployment_id": "d1234567890abcdef",
"pal_id": "pcb7a34da5fe",
"channel": "widget",
"status": "draft",
"name": "<string>",
"has_password": true,
"customization": {},
"replica_thumbnail_video_url": "<string>",
"thumbnail_video_url": "<string>",
"thumbnail_image_url": "<string>",
"limits": {},
"allowed_origins": [
"<string>"
],
"usage_total": 123,
"usage_today": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "Invalid JSON patch format"
}For AI agents, use
https://docs.tavus.io/openapi.yaml for the full HTTP API contract.Authorizations
Headers
ETag from a prior GET response.
Path Parameters
Body
application/json
Example:
[
{
"op": "replace",
"path": "/name",
"value": "Support widget"
}
]
Response
Updated deployment
A managed deployment. See Deployments overview.
Example:
"d1234567890abcdef"
PAL that powers the deployment.
Example:
"pcb7a34da5fe"
Available options:
widget, embed, landing-page Available options:
draft, active, inactive Removed. Use thumbnail_video_url and thumbnail_image_url instead.
URL for the face preview video thumbnail.
URL for the face preview image thumbnail.
⌘I

