Embed Widgets
Take Over Session
Hand a live widget conversation to a human operator and suppress AI replies.
POST
/
api
/
v1
/
iframes
/
{id}
/
conversations
/
{sessionId}
/
takeover
Take Over Session
curl --request POST \
--url https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeoverimport requests
url = "https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover', 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://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"takeover_status": "<string>",
"taken_over_by": "<string>",
"taken_over_at": "<string>"
}Marks the session as human-driven so the widget stops generating AI replies. Idempotent — repeated calls just refresh the takeover timestamp. Hand control back with Release.
Authentication
Requires a Bearer token (API key) or a dashboard session.Path Parameters
string
required
The widget config UUID.
string
required
The session UUID.
Response
string
string
"human" after a successful takeover.string
The operator user ID.
string
ISO timestamp of the takeover.
Example
curl
curl -X POST https://www.hitheo.ai/api/v1/iframes/CONFIG_ID/conversations/SESSION_ID/takeover \
-H "Authorization: Bearer $THEO_API_KEY"
Was this page helpful?
Take Over Session
curl --request POST \
--url https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeoverimport requests
url = "https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover', 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://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/iframes/{id}/conversations/{sessionId}/takeover")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body{
"session_id": "<string>",
"takeover_status": "<string>",
"taken_over_by": "<string>",
"taken_over_at": "<string>"
}