Creates a webhook
POST
https://api.vercel.com/v1/webhooksCreates a webhook
https://api.vercel.com/v1/webhooks
const response = await fetch('https://api.vercel.com/v1/webhooks?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', }, body: JSON.stringify({ "url": "https://example.com", "events": [], "projectIds": [] }),});
const data = await response.json();console.log(data);Response
{ "alertRuleIds": [], "createdAt": "1567024758130", "events": [], "id": "account_hook_GflD6EYyo7F4ViYS", "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", "projectIds": [], "secret": "string", "updatedAt": "1567024758130", "url": "https://my-webhook.com"}AuthorizationbearerToken
Default authentication mechanism
200Success
400One of the provided values in the request body is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error