Create a new webhook

This example demonstrates how to create a new webhook subscription.

Replace the following placeholder value in the sample code:

KeyDescription
bearer_tokenYour OAuth token. Read more about OAuth tokens
urlDestination URL for events
eventsArray of events to subscribe to
signingAlgoSigning algorithm for the webhook
signingKeySigning key for the webhook
metadataPolicyMetadata policy for the webhook
curl --location --request POST 'https://api.vonage.com/t/vbc.prod/vis/v1/self/webhooks' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer $bearer_token' \--data-raw '{ "url": "$url", "events": "$events", "signingAlgo": "$signingAlgo", "signingKey": "$signingKey", "metadataPolicy": "$metadataPolicy" }'