Webhooks
Retrieve a webhook
Retrieve a webhook by ID, with its subscribed events and delivery stats.
GET
/
api
/
v2
/
webhooks
/
{webhook_id}
from hai_agents import Client
client = Client()
webhook = client.webhooks.get_webhook(webhook_id=webhook_id)
print(webhook.url, webhook.enabled_events)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const webhook = await client.webhooks.getWebhook({ webhookId });
console.log(webhook.url, webhook.enabledEvents);
curl https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"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"
}
Path parameters
string
required
The webhook’s
id (UUID).Response
200 with the webhook object, also returned by create, list, update, and rotate.
Reads never return the signing secret. Only Create and Rotate secret return it.
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, for example
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.string
Creation time (UTC).
string
Last modification time (UTC).
from hai_agents import Client
client = Client()
webhook = client.webhooks.get_webhook(webhook_id=webhook_id)
print(webhook.url, webhook.enabled_events)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const webhook = await client.webhooks.getWebhook({ webhookId });
console.log(webhook.url, webhook.enabledEvents);
curl https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"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 | Not found, or not in your organization. |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
webhook = client.webhooks.get_webhook(webhook_id=webhook_id)
print(webhook.url, webhook.enabled_events)
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const webhook = await client.webhooks.getWebhook({ webhookId });
console.log(webhook.url, webhook.enabledEvents);
curl https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID \
-H "Authorization: Bearer $HAI_API_KEY"
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"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"
}