Webhook commands
This topic covers webhook commands for the Postman CLI.
You can use the postman webhook commands to create, list, delete, and manage webhooks in a workspace directly from the CLI. You can check the status of a webhook and start or pause it as needed. You can also forward events received on a webhook to your local server to aid development and debugging. In each of these operations, you have the choice to pass either the webhook URL or the webhook ID.
For more information about webhooks in Postman, see Webhooks.
You can find the webhook ID using the postman webhook list command or postman webhook status command.
postman webhook create
This command creates a new webhook in the specified workspace. Add the command to your CI/CD script or agent workflow to automate webhook provisioning.
To use this command, sign in to Postman with the postman login command.
Usage
Options
The name of the webhook.
The ID of the workspace in which to create the webhook.
Example
postman webhook list
This command lists all webhooks in the specified workspace, along with their IDs and current status.
To use this command, sign in to Postman with the postman login command.
Usage
Options
The ID of the workspace whose webhooks you want to list.
Example
postman webhook delete
This command permanently deletes a webhook by its ID. This action can’t be undone.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the webhook to delete.
Options
The ID of the Postman workspace containing the webhook.
Your Postman API key.
Example
postman webhook status
This command shows details for a webhook, including its title, current status (active or inactive), invoke URL, and creation date.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the webhook.
Options
The ID of the Postman workspace containing the webhook.
Your Postman API key.
Example
postman webhook start
This command starts a paused or inactive webhook, enabling it to begin receiving events.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the webhook to start.
Example
postman webhook pause
This command pauses an active webhook, stopping it from receiving events. You can resume it at any time using postman webhook start.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the webhook to pause.
Example
postman webhook forward
This command forwards events received on a webhook from external services (such as Stripe or Slack) to a port on your local server. This is useful for developing and debugging webhook handlers without exposing a public endpoint.
The command listens for incoming events on the specified webhook and relays them to your local server at the given port. The forwarding runs until you stop it by pressing Control+C or Ctrl+C.
To use this command, sign in to Postman with the postman login command.
Usage
The unique identifier of the webhook whose events you want to forward.
The local port number to forward events to.