CLI: Webhooks
Commands to create, change, and delete webhooks, and to view and resend deliveries. Common flags that you can add to any command (--host, --json, and others) are in the CLI command reference.
What gets delivered is described in Receive webhooks.
| Command | Description |
|---|---|
hakocms-cli webhooks create |
Create a webhook |
hakocms-cli webhooks delete |
Delete a webhook |
hakocms-cli webhooks deliveries list |
Webhook delivery history |
hakocms-cli webhooks deliveries redeliver |
Resend a delivered webhook with the same body |
hakocms-cli webhooks get |
Get a webhook |
hakocms-cli webhooks list |
List webhooks |
hakocms-cli webhooks test |
Send a test webhook immediately and print the result |
hakocms-cli webhooks update |
Change a webhook’s settings |
hakocms-cli webhooks create
Section titled “hakocms-cli webhooks create”Create a webhook.
hakocms-cli webhooks create [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--content-type-id <TEXT> |
Send events for this content type only. If null, all content types and media |
--enabled[=true|false] |
Whether to send. Default true |
--events <JSON> |
Array of event names to send. Default [“entry.published”, “entry.deleted”]. Use @file to read from a file, - to read from standard input |
--headers <JSON> |
Custom headers (an object mapping names to values). Up to 20. Use @file to read from a file, - to read from standard input |
--name <TEXT> |
Name |
--preset <TEXT> |
Delivery format. Allowed values: custom, vercel, netlify, slack. Default custom |
--secret-stdin |
Signing secret (8–256 characters). Read from the first line of standard input |
--url <TEXT> |
Destination (http:// or https://) |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |
hakocms-cli webhooks delete
Section titled “hakocms-cli webhooks delete”Delete a webhook.
hakocms-cli webhooks delete [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--force |
Do it without asking for confirmation |
hakocms-cli webhooks deliveries list
Section titled “hakocms-cli webhooks deliveries list”Webhook delivery history.
hakocms-cli webhooks deliveries list [OPTIONS] --webhook <TEXT>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--webhook <TEXT> |
ID (required) |
--limit <N> |
Number of items to output (default 30) |
--all |
Follow all pages |
hakocms-cli webhooks deliveries redeliver
Section titled “hakocms-cli webhooks deliveries redeliver”Resend a delivered webhook with the same body.
Resends a webhook delivery with the same body.
Resends the same body as before (the deliveryId in the body is also the same as before) from the start, as a new delivery.
hakocms-cli webhooks deliveries redeliver [OPTIONS] --webhook <TEXT> <DELIVERY_ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
--webhook <TEXT> |
ID (required) |
<DELIVERY_ID> |
Delivery ID |
hakocms-cli webhooks get
Section titled “hakocms-cli webhooks get”Get a webhook.
hakocms-cli webhooks get [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
hakocms-cli webhooks list
Section titled “hakocms-cli webhooks list”List webhooks.
hakocms-cli webhooks list [OPTIONS]| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
hakocms-cli webhooks test
Section titled “hakocms-cli webhooks test”Send a test webhook immediately and print the result.
Sends a test webhook.
Sends it immediately and returns the result. It is not retried if it fails.
hakocms-cli webhooks test [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
hakocms-cli webhooks update
Section titled “hakocms-cli webhooks update”Change a webhook’s settings.
hakocms-cli webhooks update [OPTIONS] <ID>| Flag or argument | Description |
|---|---|
-s, --space <SLUG> |
Space. If omitted: HAKOCMS_SPACE, hakocms-cli.toml, then the one set with spaces use, in that order |
<ID> |
ID |
--content-type-id <TEXT> |
Send events for this content type only. If null, all content types and media |
--enabled[=true|false] |
Whether to send |
--events <JSON> |
Array of event names to send. Use @file to read from a file, - to read from standard input |
--headers <JSON> |
Custom headers (an object mapping names to values). Up to 20. Use @file to read from a file, - to read from standard input |
--name <TEXT> |
Name |
--preset <TEXT> |
Delivery format. Allowed values: custom, vercel, netlify, slack |
--secret-stdin |
Signing secret (8–256 characters). Send null to remove the secret. Read from the first line of standard input |
--url <TEXT> |
Destination (http:// or https://) |
--data <JSON> |
The whole body (JSON). Use @file to read from a file, - to read from standard input. Other flags are applied on top of it |