Typescript
import { Vercel } from "@vercel/sdk"; const vercel = new Vercel({ bearerToken: "<YOUR_BEARER_TOKEN_HERE>", }); async function run() { const result = await vercel.webhooks.createWebhook({ teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l", slug: "my-team-url-slug", requestBody: { url: "https://experienced-sailor.biz/", events: [ "domain.renewal.failed", ], }, }); console.log(result); } run();
{ "secret": "<string>", "events": "deployment.created", "id": "account_hook_GflD6EYyo7F4ViYS", "url": "https://my-webhook.com", "ownerId": "ZspSRT4ljIEEmMHgoDwKWDei", "createdAt": 1567024758130, "updatedAt": 1567024758130, "projectIds": [ "prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB" ] }
Creates a webhook
Default authentication mechanism
The Team identifier to perform the request on behalf of.
"team_1a2b3c4d5e6f7g8h9i0j1k2l"
The Team slug to perform the request on behalf of.
"my-team-url-slug"
The response is of type object.
object