Create a webhook
POST https://api.getpostman.com/webhooks
Creates a webhook that triggers a collection with a custom payload. You can get the webhook's URL from the webhookUrl
property in the endpoint's response.
Include the following properties in a webhook
object in the request body:
-
name
— The webhook's name. On success, the system creates a new monitor with this name in the Monitors tab. -
collection
— The collection UID to trigger when calling this webhook.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
workspace | string | Optional. A workspace ID in which to create the webhook. |
If you do not include this query parameter, the system creates the webhook in your "My Workspace" workspace. |
Request Body
{"webhook"=>{"name"=>"{{webhookName}}", "collection"=>"{{collectionUid}}"}}
RESPONSES
status: OK
{"webhook":{"id":"1f0df51a-8658-4ee8-a2a1-d2567dfa09a9","name":"Test Webhook","collection":"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2","webhookUrl":"https://newman-api.getpostman.com/run/12345678/267a6e99-b6da-407c-a96f-03be2d6282fb","uid":"12345678-1f0df51a-8658-4ee8-a2a1-d2567dfa09a9"}}