Skip to content

kindgi webhooks

View as Markdown

Synopsis

Terminal window
kindgi webhooks <command>
Signature

Start flow runs from signed webhooks (WooCommerce, Drupal, GitHub, Shopify, Standard Webhooks): register, list, get, update, pause, resume, fires, take-ownership, unregister.

Commands

Command Description
kindgi webhooks register Start a flow's run when a signed request arrives: from WooCommerce, Drupal's Webhooks module, GitHub, Shopify, or any sender that signs with HMAC-SHA256 or Standard Webhooks.
kindgi webhooks list List webhook triggers.
kindgi webhooks get Fetch a webhook trigger, with its receive URL.
kindgi webhooks update Change a webhook trigger: its flow version, input, secret, scheme, delivery-id header or limits.
kindgi webhooks pause Pause a webhook trigger.
kindgi webhooks resume Resume a paused webhook trigger: deliveries start runs again.
kindgi webhooks fires A webhook trigger's deliveries, newest first: the run each started, or why it was skipped (paused) or refused (a wrong or missing signature, a stale one, the limits, …).
kindgi webhooks take-ownership Become a webhook trigger's owner, so its runs act as you from the next delivery (for a trigger whose owner left).
kindgi webhooks unregister Remove a webhook trigger: its sender is answered 410 from now on.

See also

Synopsis

Terminal window
kindgi webhooks register --flow=<id> --flow-version=<v> --secret=<name> [--generate-secret] [--preset=woocommerce|drupal-webhooks|github|shopify|standard-webhooks | --signature-header=<h> --signature-encoding=hex|base64 [--signature-prefix=<p>]] [--delivery-id-header=<h>] [--input=<json-or-@file>] [--project=<project-id>] [--body-limit=<bytes>] [--rate-limit=<per-minute>] [--label=<text>] [--run-as=<service-account-id>]
Signature

Start a flow's run when a signed request arrives: from WooCommerce, Drupal's Webhooks module, GitHub, Shopify, or any sender that signs with HMAC-SHA256 or Standard Webhooks. Its runs act as you, checked again at every delivery. The event the flow gets is data from outside, never instructions: check it in a step before any agent, and keep the agent that reads it read-only.

Options

Option Default Description
--body-limit <value> 262144 bytes (256 KiB) The largest body it takes, in bytes (1024 to 1048576; default 262144).
--delivery-id-header <value> none, or the header the preset sets The header whose value, with the body, dedupes deliveries (a preset sets it; none on update stops deduping).
--flow <value> required The flow each delivery starts.
--flow-version <value> required The flow version.
--generate-secret none The runtime makes a new signing secret, stores it as --secret in the trigger's project, and shows it once, to paste into the sender. Letters and digits only (WooCommerce HTML-decodes its secret); whsec_… with --preset=standard-webhooks.
--input <value> none (the flow gets the event) The flow's input on every delivery, in place of the event, as JSON or @<file> (default: the event).
--label <value> none A short label.
--preset <value> none (with no --signature-header either: a hex HMAC-SHA256 in X-Kindgi-Signature) How the sender signs, by sender: woocommerce|drupal-webhooks|github|shopify|standard-webhooks. Sets the scheme and the delivery-id header.
--project <value> the tenant's Default project The trigger's project, by id (default: the tenant's Default project).
--rate-limit <value> 600 a minute Accepted deliveries a minute (1 to 6000; default 600); past it, 429.
--run-as <value> none (you own the trigger) A service account, by id: the trigger's owner, so its runs act as that account from the next delivery (not as you). Needs act_as on the account; omit it to own the trigger yourself.
--secret <value> required The signing secret's name: one written with kindgi secrets set in the env the runtime serves (it's read at the trigger's project, its org or the tenant, whichever you administer that has it), or the name --generate-secret stores it under. Never a model provider's key. Under kindgi dev, --generate-secret writes it to an env file, so the name is capital letters, digits and underscores, not starting with a digit (ACME_WOO_ORDERS).
--signature-encoding <value> required with --signature-header With --signature-header: hex or base64.
--signature-header <value> none Instead of --preset: the header that carries an HMAC-SHA256 of the raw body (with --signature-encoding).
--signature-prefix <value> none With --signature-header: stripped before decoding (e.g. sha256=).

Every command also takes the global flags.

Examples

From Start runs from WooCommerce, Drupal or any signed webhook:

Terminal window
pnpm exec kindgi webhooks register --flow=acme-shop.order-review --flow-version=0.1.0 \

See also

Synopsis

Terminal window
kindgi webhooks list [--project=<project-id>] [--status=active|paused] [--limit=<n>] [--cursor=<c>]
Signature

List webhook triggers.

Options

Option Default Description
--cursor <value> none Resume after this cursor, from the previous page's nextCursor.
--limit <value> 25 (at most 100) The most to return (default 25, at most 100).
--project <value> none Only this project's webhook triggers.
--status <value> none (both active and paused) Only active or only paused triggers.

Every command also takes the global flags.

Examples

List the webhook triggers in a project.

Terminal window
kindgi webhooks list --project=<project-id>

List only the paused triggers, as a table.

Terminal window
kindgi webhooks list --status=paused --table

See also

Synopsis

Terminal window
kindgi webhooks get <trigger-id>
Signature

Fetch a webhook trigger, with its receive URL.

Options

Every command also takes the global flags.

Examples

Show a trigger and the URL its sender posts to.

Terminal window
kindgi webhooks get <trigger-id>

See also

Synopsis

Terminal window
kindgi webhooks update <trigger-id> [--flow-version=<v>] [--input=<json-or-@file>] [--secret=<name>] [--preset=woocommerce|drupal-webhooks|github|shopify|standard-webhooks | --signature-header=<h> --signature-encoding=hex|base64 [--signature-prefix=<p>]] [--delivery-id-header=<h>|none] [--body-limit=<bytes>] [--rate-limit=<per-minute>] [--label=<text>]
Signature

Change a webhook trigger: its flow version, input, secret, scheme, delivery-id header or limits. Its flow stays: register another trigger for another flow.

Options

Option Default Description
--body-limit <value> unchanged The largest body it takes, in bytes (1024 to 1048576; default 262144).
--delivery-id-header <value> unchanged The header whose value, with the body, dedupes deliveries (a preset sets it; none on update stops deduping).
--flow-version <value> unchanged Start this flow version instead.
--input <value> unchanged The flow's input on every delivery, as JSON or @<file>.
--label <value> unchanged A short label.
--preset <value> unchanged How the sender signs, by sender: woocommerce|drupal-webhooks|github|shopify|standard-webhooks. Sets the scheme and the delivery-id header.
--rate-limit <value> unchanged Accepted deliveries a minute (1 to 6000; default 600); past it, 429.
--secret <value> unchanged Verify with another secret, by name. To change a secret's value, use kindgi secrets rotate.
--signature-encoding <value> required with --signature-header With --signature-header: hex or base64.
--signature-header <value> unchanged Instead of --preset: the header that carries an HMAC-SHA256 of the raw body (with --signature-encoding).
--signature-prefix <value> none With --signature-header: stripped before decoding (e.g. sha256=).

Every command also takes the global flags.

Examples

Point a trigger at a newer flow version.

Terminal window
kindgi webhooks update <trigger-id> --flow-version=0.2.0

Switch the sender's scheme to the GitHub preset and raise the rate limit.

Terminal window
kindgi webhooks update <trigger-id> --preset=github --rate-limit=1200

See also

Synopsis

Terminal window
kindgi webhooks pause <trigger-id>
Signature

Pause a webhook trigger. Deliveries are still taken (so the sender keeps the webhook on), recorded as skipped, and start nothing: their events are dropped, and WooCommerce never resends them.

Options

Every command also takes the global flags.

Examples

Pause a trigger so deliveries start nothing.

Terminal window
kindgi webhooks pause <trigger-id>

See also

Synopsis

Terminal window
kindgi webhooks resume <trigger-id>
Signature

Resume a paused webhook trigger: deliveries start runs again.

Options

Every command also takes the global flags.

Examples

Resume a paused trigger.

Terminal window
kindgi webhooks resume <trigger-id>

See also

Synopsis

Terminal window
kindgi webhooks fires <trigger-id> [--limit=<n>] [--cursor=<c>]
Signature

A webhook trigger's deliveries, newest first: the run each started, or why it was skipped (paused) or refused (a wrong or missing signature, a stale one, the limits, …). A fire keeps the event only until its run starts.

Options

Option Default Description
--cursor <value> none Resume after this cursor, from the previous page's nextCursor.
--limit <value> 25 (at most 100) The most to return (default 25, at most 100).

Every command also takes the global flags.

Examples

From Start runs from WooCommerce, Drupal or any signed webhook:

Terminal window
pnpm exec kindgi webhooks fires <trigger-id> --table

See also

Synopsis

Terminal window
kindgi webhooks take-ownership <trigger-id> [--run-as=<service-account-id>]
Signature

Become a webhook trigger's owner, so its runs act as you from the next delivery (for a trigger whose owner left). With --run-as, a service account becomes the owner instead.

Options

Option Default Description
--run-as <value> none (you own the trigger) A service account, by id: the trigger's owner, so its runs act as that account from the next delivery (not as you). Needs act_as on the account; omit it to own the trigger yourself.

Every command also takes the global flags.

Examples

Make its runs act as you.

Terminal window
kindgi webhooks take-ownership <trigger-id>

See also

Synopsis

Terminal window
kindgi webhooks unregister <trigger-id>
Signature

Remove a webhook trigger: its sender is answered 410 from now on.

Options

Every command also takes the global flags.

Examples

Remove a trigger; its sender gets 410 from then on.

Terminal window
kindgi webhooks unregister <trigger-id>

See also