Getting Started
Make sure to first set up your PlanetScale developer environment. Once you’ve installed thepscale CLI, you can interact with PlanetScale and manage your databases straight from the command line.
The webhook command
This command allows you to create, list, update, test, and delete webhooks for your database.
Usage:
Available sub-commands
Sub-command flags
Available flags
Global flags
Examples
List webhooks for a database
Command:Create a webhook
Command:Bearer $AUTOMATION_TOKEN, with the token supplied by the environment variable. PlanetScale sends the value unchanged. The header value is write-only and will not appear in command output. The webhook will be disabled by default until you enable it with the update command.
Output:
When you create a webhook, a secret is generated and displayed only once in the output. Store this secret securely as you’ll need it to validate webhook signatures. You can also view the secret later from the database settings page in the dashboard.
Show webhook details
Command:The
show command displays the webhook secret, which is useful if you need to retrieve it after creation. Store this secret securely as you’ll need it to validate webhook signatures.Update a webhook
Command:--enabled=false. You can also update the events or URL, or set an Authorization header with --authorization-header. Supply the complete header value, including the authentication scheme—for example, --authorization-header "Bearer $AUTOMATION_TOKEN". PlanetScale sends the value unchanged. Omitting --authorization-header preserves the configured value.
Webhook output indicates whether an Authorization header is configured without revealing its value. To remove a configured header, run:

