PgBeam Docs
Webhooks

TestWebhookEndpoint

Send a test event

Enqueues a test event delivery to the webhook endpoint.

Usage

result, err := client.Webhooks.TestWebhookEndpoint(ctx, "prj_xxx", "whk_xxx")

Parameters

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
projectIDstringYesUnique project identifier (prefixed, e.g. prj_xxx).
webhookIDstringYesUnique webhook endpoint identifier (prefixed, e.g. whk_xxx).

Response

(*pgbeam.unknown, error) — the result.

Example

import pgbeam "go.pgbeam.com/sdk"

client := pgbeam.NewClient(&pgbeam.ClientOptions{
  APIKey: "pgb_your_api_key",
})

result, err := client.Webhooks.TestWebhookEndpoint(ctx, "prj_xxx", "whk_xxx")
if err != nil {
  log.Fatal(err)
}
fmt.Println(result)

Errors

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
404Resource not found.

On this page