Creates a webhook
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "events": "SOME_ARRAY OF STRING_VALUE",4 "url": "SOME_STRING_VALUE",5 "projectIds": "SOME_ARRAY OF STRING_VALUE"6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "post"11})
Query Parameter | Description |
---|---|
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
createdAtnumberRequired A number containing the date when the webhook was created in in milliseconds Example:
1567024758130
eventsarrayRequired The webhooks events Example:
deployment.created
idstringRequired The webhook id Example:
account_hook_GflD6EYyo7F4ViYS
ownerIdstringRequired The unique ID of the team the webhook belongs to Example:
ZspSRT4ljIEEmMHgoDwKWDei
projectIdsarray The ID of the projects the webhook is associated with Example:
["prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB"]
secretstringRequired The webhook secret used to sign the payload updatedAtnumberRequired A number containing the date when the webhook was updated in in milliseconds Example:
1567024758130
urlstringRequired A string with the URL of the webhook Example:
https://my-webhook.com
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request body is invalid. |
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "body": {3 "events": "SOME_ARRAY OF STRING_VALUE",4 "url": "SOME_STRING_VALUE",5 "projectIds": "SOME_ARRAY OF STRING_VALUE"6 },7 "headers": {8 "Authorization": "Bearer <TOKEN>"9 },10 "method": "post"11})
Deletes a webhook
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks/SOME_STRING_VALUE?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Path Parameter | Description |
---|---|
id | string required |
Code | Description |
---|---|
204 | |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks/SOME_STRING_VALUE?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "delete"6})
Get a webhook
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks/SOME_STRING_VALUE?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Path Parameter | Description |
---|---|
id | string required |
createdAtnumberRequired A number containing the date when the webhook was created in in milliseconds Example:
1567024758130
eventsarrayRequired The webhooks events Example:
deployment.created
idstringRequired The webhook id Example:
account_hook_GflD6EYyo7F4ViYS
ownerIdstringRequired The unique ID of the team the webhook belongs to Example:
ZspSRT4ljIEEmMHgoDwKWDei
projectIdsarray The ID of the projects the webhook is associated with Example:
["prj_12HKQaOmR5t5Uy6vdcQsNIiZgHGB"]
updatedAtnumberRequired A number containing the date when the webhook was updated in in milliseconds Example:
1567024758130
urlstringRequired A string with the URL of the webhook Example:
https://my-webhook.com
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks/SOME_STRING_VALUE?slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Get a list of webhooks
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Query Parameter | Description |
---|---|
projectId | string |
slug | string The Team slug to perform the request on behalf of. |
teamId | string The Team identifier to perform the request on behalf of. |
One of the following objects
Code | Description |
---|---|
200 | |
400 | One of the provided values in the request query is invalid. |
401 | |
403 | You do not have permission to access this resource. |
Optional params
fetch-request
1await fetch("https://api.vercel.com/v1/webhooks?projectId=SOME_STRING_VALUE&slug=SOME_STRING_VALUE&teamId=SOME_STRING_VALUE", {2 "headers": {3 "Authorization": "Bearer <TOKEN>"4 },5 "method": "get"6})
Was this helpful?