post/v1/webhooks

Creates a webhook

Optional params

fetch-request

1
await 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 Params
Body Params
Query ParameterDescription

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

CodeDescription
200
400One of the provided values in the request body is invalid.
401
403You do not have permission to access this resource.
delete/v1/webhooks/{id}

Deletes a webhook

Optional params

fetch-request

1
await 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 Params
Query Params
Path ParameterDescription

id

string

required
N/A
CodeDescription
204
400One of the provided values in the request query is invalid.
401
403You do not have permission to access this resource.
get/v1/webhooks/{id}

Get a webhook

Optional params

fetch-request

1
await 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 Params
Query Params
Path ParameterDescription

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

CodeDescription
200
400One of the provided values in the request query is invalid.
401
403You do not have permission to access this resource.
get/v1/webhooks

Get a list of webhooks

Optional params

fetch-request

1
await 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 Params
Query ParameterDescription

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
  • One of
CodeDescription
200
400One of the provided values in the request query is invalid.
401
403You do not have permission to access this resource.
Last updated on December 25, 2024