Test a webhook with a sample event
/v1/webhooks/{webhook_id}/testconst result = await bird.webhooks.test("whk_01krdgeqcxet5s7t44vh8rt9mg", {
event_type: "email.delivered",
});
console.log(result.status);result = client.webhooks.test(
"whk_01krdgeqcxet5s7t44vh8rt9mg",
event_type="email.delivered",
)
print(result.status)result, err := client.Webhooks.Test(context.Background(), "whk_123", bird.WebhooksTestParams{
EventType: bird.Ptr("email.delivered"),
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Status)$result = $bird->webhooks->test(
'whk_01krdgeqcxet5s7t44vh8rt9mg',
(new WebhookTestRequest())->setEventType('email.delivered'),
);
echo $result->getStatus();bird webhooks test <webhook-id> --event-type email.deliveredcurl -X POST "https://us1.platform.bird.com/v1/webhooks/{webhook_id}/test" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"event_type": "email.delivered"
}'{
"status": "delivered",
"response_status_code": 200,
"response_body": "OK",
"response_duration_ms": 142,
"event_payload": {
"type": "amb.accepted",
"timestamp": "2026-09-25T12:00:00Z",
"data": {
"workspace_id": "ws_01krdgeqcxet5s7t44vh8rt9mg",
"message": {
"id": "amb_01krdgeqcxet5s7t44vh8rt9mg",
"conversation_id": "acv_01krdgeqcxet5s7t44vh8rt9mg",
"business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
"direction": "outbound",
"status": "accepted",
"kind": "text",
"source": "operator",
"content": {
"type": "text",
"body": "Your order has shipped."
},
"locale": "en_US",
"category": "order_update",
"tags": [
{
"name": "category",
"value": "welcome"
}
],
"cost": null,
"created_at": "2026-09-25T11:59:59Z"
}
}
},
"error": "connection refused"
}
Sends a signed synthetic event and returns whether your endpoint accepted it, its HTTP status, and the round-trip latency. An unreachable endpoint returns status: failed in the response body. The endpoint has 10 seconds to respond.
The body is a minimal JSON object with the event type, signed like a real delivery. It does not mirror that event's payload. Tests work on paused endpoints and do not appear in List delivery attempts.
The operation returns 412 if the endpoint lacks a valid signing secret or, when event_type is omitted, has no subscribed event type to use.
Paramètres
webhook_idstringID of the webhook endpoint (whk_ prefix), as returned when it was created.
Corps de la requête
event_typeEvent type to simulate. Any type from the event catalog is accepted, whether or not the endpoint subscribes to it; an unknown type returns a 422. When omitted, the endpoint's first subscribed event type is used.
Contenu de la réponse
statusWhether your endpoint accepted the test event. delivered means it returned a 2xx status; failed means it returned a non-2xx status or could not be reached (see error for the latter).
Possible values: delivered, failed
response_status_codeHTTP status returned by your endpoint. Null when no response was received (timeout, connection error, DNS failure).
response_bodyResponse body returned by your endpoint, truncated to the first 1024 bytes. Omitted when your endpoint returned no body or could not be reached.
response_duration_msRound-trip delivery latency in milliseconds.
event_payloadThe full event body delivered to your endpoint. Test sends use a minimal synthetic body rather than a full event payload, so this field is omitted.
errorA short explanation of why the event could not be delivered. Present only when your endpoint could not be reached.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.