Webhooks
列出投遞記錄
查看某個 webhook 的近期投遞嘗試記錄,包括成功和失敗的情況。
GET
/
api
/
v1
/
webhooks
/
{id}
/
deliveries
列出投遞記錄
curl --request GET \
--url https://api.example.com/api/v1/webhooks/{id}/deliveriesimport requests
url = "https://api.example.com/api/v1/webhooks/{id}/deliveries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/webhooks/{id}/deliveries', 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/webhooks/{id}/deliveries",
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/webhooks/{id}/deliveries"
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/webhooks/{id}/deliveries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/webhooks/{id}/deliveries")
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{
"deliveries": [
{
"id": "<string>",
"event_type": "<string>",
"http_status": {},
"error_message": {},
"status": "<string>",
"attempt": 123,
"failed_at": {}
}
]
}路徑參數
string
必填
該 webhook 的 UUID。
響應
返回最近的 50 次投遞嘗試記錄,按時間從新到舊排列。array
示例
curl https://www.hitheo.ai/api/v1/webhooks/WEBHOOK_ID/deliveries \
-H "Authorization: Bearer $THEO_API_KEY"
const deliveries = await theo.webhookDeliveries("WEBHOOK_ID");
響應
{
"deliveries": [
{
"id": "d1e2f3a4-...",
"event_type": "completion.created",
"http_status": 200,
"error_message": null,
"status": "success",
"attempt": 1,
"failed_at": "2026-04-15T12:01:00.000Z"
},
{
"id": "b5c6d7e8-...",
"event_type": "job.failed",
"http_status": 503,
"error_message": "HTTP 503",
"status": "failed",
"attempt": 4,
"failed_at": "2026-04-15T11:58:00.000Z"
}
]
}
失敗的投遞可以通過重試端點進行重試。
這個頁面有幫助嗎?
列出投遞記錄
curl --request GET \
--url https://api.example.com/api/v1/webhooks/{id}/deliveriesimport requests
url = "https://api.example.com/api/v1/webhooks/{id}/deliveries"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/webhooks/{id}/deliveries', 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/webhooks/{id}/deliveries",
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/webhooks/{id}/deliveries"
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/webhooks/{id}/deliveries")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/webhooks/{id}/deliveries")
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{
"deliveries": [
{
"id": "<string>",
"event_type": "<string>",
"http_status": {},
"error_message": {},
"status": "<string>",
"attempt": 123,
"failed_at": {}
}
]
}