Webhooks
Ping a webhook
Ping a webhook with a signed test event and see how your endpoint responds.
POST
/
api
/
v2
/
webhooks
/
{webhook_id}
/
ping
from hai_agents import Client
client = Client()
result = client.webhooks.ping_webhook(webhook_id=webhook_id)
print(result.response_status) # 200 if your endpoint accepted the ping
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const result = await client.webhooks.pingWebhook({ webhookId });
console.log(result.responseStatus); // 200 if your endpoint accepted the ping
curl -X POST https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID/ping \
-H "Authorization: Bearer $HAI_API_KEY"
{
"response_status": 200
}
Behavior
Theping event takes the real delivery path (same signature headers, same URL safety checks), and your endpoint’s HTTP response comes back synchronously.
The ping body has the standard event envelope with "type": "ping" and "data": {"webhook_id": "..."}. Pings bypass enabled_events filtering and are not retried.
Path parameters
string
required
The webhook’s
id (UUID).Response
200 with response_status, the HTTP status code your endpoint answered with.
from hai_agents import Client
client = Client()
result = client.webhooks.ping_webhook(webhook_id=webhook_id)
print(result.response_status) # 200 if your endpoint accepted the ping
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const result = await client.webhooks.pingWebhook({ webhookId });
console.log(result.responseStatus); // 200 if your endpoint accepted the ping
curl -X POST https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID/ping \
-H "Authorization: Bearer $HAI_API_KEY"
{
"response_status": 200
}
Errors
| Status | Cause |
|---|---|
400 | The webhook URL is not https:// or does not resolve to a public address. |
404 | Not found, or not in your organization. |
502 | The endpoint could not be reached (connection error or timeout). |
Was this page helpful?
⌘I
from hai_agents import Client
client = Client()
result = client.webhooks.ping_webhook(webhook_id=webhook_id)
print(result.response_status) # 200 if your endpoint accepted the ping
import { HaiAgentsClient } from "hai-agents";
const client = new HaiAgentsClient();
const result = await client.webhooks.pingWebhook({ webhookId });
console.log(result.responseStatus); // 200 if your endpoint accepted the ping
curl -X POST https://agp.eu.hcompany.ai/api/v2/webhooks/$WEBHOOK_ID/ping \
-H "Authorization: Bearer $HAI_API_KEY"
{
"response_status": 200
}