嵌入式组件
获取 Iframe 组件列表
列出当前认证用户的所有可嵌入组件配置。
GET
/
api
/
v1
/
iframes
获取 Iframe 组件列表
curl --request GET \
--url https://api.example.com/api/v1/iframesimport requests
url = "https://api.example.com/api/v1/iframes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/iframes', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/iframes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/iframes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"configs": [
{}
]
}响应
array
Iframe 配置数组。每项包含
id、name、status、api_key_id、appearance、behavior、security、created_at、updated_at。认证
需要仪表盘会话。示例
curl
curl https://www.hitheo.ai/api/v1/iframes \
-H "Authorization: Bearer $THEO_API_KEY"
响应
{
"configs": [
{
"id": "cfg_abc123",
"name": "Support Widget",
"status": "active",
"api_key_id": "key_abc123",
"appearance": { "primaryColor": "#715eac" },
"behavior": { "welcomeMessage": "Hi! How can I help?" },
"created_at": "2026-04-15T12:00:00.000Z"
}
]
}
管理
PATCH /api/v1/iframes/{id}— 更新配置DELETE /api/v1/iframes/{id}— 删除POST /api/v1/iframes/{id}/duplicate— 克隆配置POST /api/v1/iframes/{id}/preview-token— 生成预览令牌POST /api/v1/iframes/{id}/verify— 验证域名所有权
此页面对您有帮助吗?
获取 Iframe 组件列表
curl --request GET \
--url https://api.example.com/api/v1/iframesimport requests
url = "https://api.example.com/api/v1/iframes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/iframes', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/iframes")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/iframes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"configs": [
{}
]
}