Retrieve a webhook
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_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://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"enabled_events": [
"<string>"
],
"description": {},
"disabled": true,
"last_delivery_status": {},
"last_delivery_error": {},
"last_delivery_at": {},
"last_success_at": {},
"consecutive_failures": 123,
"created_at": "<string>",
"updated_at": "<string>"
}Webhooks
Retrieve a webhook
Fetch a single webhook by id.
GET
/
api
/
v2
/
webhooks
/
{webhook_id}
Retrieve a webhook
curl --request GET \
--url https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_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://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://agp.eu.hcompany.ai/api/v2/webhooks/{webhook_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"url": "<string>",
"enabled_events": [
"<string>"
],
"description": {},
"disabled": true,
"last_delivery_status": {},
"last_delivery_error": {},
"last_delivery_at": {},
"last_success_at": {},
"consecutive_failures": 123,
"created_at": "<string>",
"updated_at": "<string>"
}Fetches one webhook. The signing
secret is never returned by reads. It appears only in the Create response.
Returns the webhook object.
Path parameters
string
required
The webhook’s
id (UUID).The webhook object
string
Unique identifier (UUID).
string
Target URL for deliveries.
string[]
Event types delivered to this webhook;
["*"] means the session.status_updated firehose.string | null
Optional label.
boolean
When
true, the webhook stays registered but receives no deliveries. Set manually via Update, or automatically after repeated delivery failures.string | null
Result of the most recent delivery attempt:
succeeded or failed. null before the first attempt.string | null
What went wrong on the most recent delivery attempt, e.g.
HTTP 503 or a connection error. null when it succeeded.string | null
When the most recent delivery attempt happened (UTC).
null before the first attempt.string | null
When a delivery last succeeded (UTC).
null if none has.integer
Failed delivery attempts since the last success. Resets to
0 on a successful delivery or a manual re-enable. The webhook is disabled automatically when it grows too large. See Delivery semantics.string
Creation time (UTC).
string
Last modification time (UTC).
Examples
curl https://agp.eu.hcompany.ai/api/v2/webhooks/f47ac10b-58cc-4372-a567-0e02b2c3d479 \
-H "Authorization: Bearer $HAI_API_KEY"
from hai_agents import Client
client = Client()
webhook = client.webhooks.get_webhook(webhook_id="f47ac10b-58cc-4372-a567-0e02b2c3d479")
print(webhook.url, webhook.enabled_events)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const webhook = await client.webhooks.getWebhook({ webhookId: "f47ac10b-58cc-4372-a567-0e02b2c3d479" });
console.log(webhook.url, webhook.enabledEvents);
Response
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"url": "https://example.com/hooks/h",
"enabled_events": ["session.status_updated"],
"description": "Production listener",
"disabled": false,
"last_delivery_status": "succeeded",
"last_delivery_error": null,
"last_delivery_at": "2026-07-03T08:30:00Z",
"last_success_at": "2026-07-03T08:30:00Z",
"consecutive_failures": 0,
"created_at": "2026-06-11T15:04:05Z",
"updated_at": "2026-06-11T15:04:05Z"
}
Errors
| Status | Cause |
|---|---|
404 | Webhook not found or you don’t have access. |
Last modified on September 11, 2026
Was this page helpful?