Docs
Search docs

Ping a webhook

POST/api/repos/{owner}/{repo}/hooks/{webhook_id}/ping

pingWebhook

Sends a `ping` event to the webhook now and returns the recorded delivery, whatever the endpoint answered. Requires admin access.

Requires authentication using a bearer token or a session cookie — see tokens and scopes.

curl

curl -X POST 'https://neosource.dev/api/repos/OWNER/REPO/hooks/WEBHOOK_ID/ping' \
  -H 'Authorization: Bearer $NEOSOURCE_TOKEN'

fetch

fetch("https://neosource.dev/api/repos/OWNER/REPO/hooks/WEBHOOK_ID/ping", {
  method: "POST",
  headers: {
    Authorization: "Bearer $NEOSOURCE_TOKEN",
  },
});

Path parameters

ownerrequired

Repository owner or organization slug.

string

reporequired

Repository name.

string

webhook_idrequired

Webhook ID.

string

Responses

200Ping sent; the recorded delivery

application/json

WebhookDeliveryResponse

object

attemptrequired

integerint32

1-based attempt number: the dispatch round, or one more than the delivery a redelivery repeated.

created_atrequired

integerint64

delivery_idrequired

string

duration_msrequired

integerint32

event_id

string | null

The outbox event this delivery carried; a redelivery shares its original's. `None` for pings.

event_typerequired

WebhookEventType

string

User-facing event types for webhook subscriptions. The vocabulary is deliberately closed; the `OpenAPI` spec advertises it as a real enum so SDK clients get exhaustive types. New events extend this enum. Only `workflow_run`, `registry_package` and `release` are delivered today; the other six are accepted but not yet delivered (#511).

"push""pull_request""mention""assigned""review_requested""issue_comment""workflow_run""registry_package""release""ping"

payloadrequired
request_headers

object | null

The headers the request was sent (or, on a transport error, attempted) with, name → value. `None` when the SSRF guard blocked the delivery before any request, and on deliveries recorded before headers were kept.

additional properties

string

response_body

string | null

response_status

integer | nullint32

successrequired

boolean

webhook_idrequired

string

Standard errors

Bodies documented once for the whole API — see standard errors.

  • 400Bad Request — one of: invalid_input
  • 401Authentication required
  • 403Forbidden — one of: forbidden
  • 404Not Found — one of: not_found
  • 409Conflict — one of: already_exists, conflict, non_fast_forward
  • 423Locked — one of: busy
  • 429Rate limited — retry after the `Retry-After` header
  • 500Internal server error
  • 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
  • 504Gateway timeout — the request exceeded the server's handling budget