VercelVercel
Menu

Creates a new Check

POSThttps://api.vercel.com/v1/deployments/{deploymentId}/checks
Creates a new check. This endpoint must be called with an OAuth2 or it will produce a 400 error.

This endpoint is deprecated

https://api.vercel.com/v1/deployments/{deploymentId}/checks
const response = await fetch('https://api.vercel.com/v1/deployments/deploymentId/checks?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Performance Check",
"path": "/",
"blocking": "true",
"detailsUrl": "http://example.com",
"externalId": "1234abc",
"rerequestable": "true"
}),
});
const data = await response.json();
console.log(data);
Response
{
"id": "chk_1a2b3c4d5e6f7g8h9i0j",
"name": "Performance Check",
"createdAt": "123",
"updatedAt": "123",
"deploymentId": "example_id",
"status": "completed",
"conclusion": "succeeded",
"externalId": "example_id",
"output": {
"metrics": {
"FCP": {
"value": "123",
"previousValue": "123",
"source": "web-vitals"
},
"LCP": {
"value": "123",
"previousValue": "123",
"source": "web-vitals"
},
"CLS": {
"value": "123",
"previousValue": "123",
"source": "web-vitals"
},
"TBT": {
"value": "123",
"previousValue": "123",
"source": "web-vitals"
},
"virtualExperienceScore": {
"value": "123",
"previousValue": "123",
"source": "web-vitals"
}
}
},
"completedAt": "123",
"path": "/api/users",
"blocking": "false",
"detailsUrl": "https://example.com",
"integrationId": "example_id",
"startedAt": "123",
"rerequestable": "false"
}
AuthorizationbearerToken

Default authentication mechanism

deploymentIdstringRequired
The deployment to create the check for.
teamIdstringOptional
The Team identifier to perform the request on behalf of.
slugstringOptional
The Team slug to perform the request on behalf of.
application/json
namestringRequired
The name of the check being created
pathstringOptional
Path of the page that is being checked
blockingbooleanRequired
Whether the check should block a deployment from succeeding
detailsUrlstringOptional
URL to display for further details
externalIdstringOptional
An identifier that can be used as an external reference
rerequestablebooleanOptional
Whether a user should be able to request for the check to be rerun if it fails
200Success
idstringRequired
namestringRequired
createdAtnumberRequired
updatedAtnumberRequired
deploymentIdstringRequired
statusstringRequired
conclusionstringOptional
externalIdstringOptional
outputobjectOptional
completedAtnumberOptional
pathstringOptional
blockingbooleanRequired
detailsUrlstringOptional
integrationIdstringRequired
startedAtnumberOptional
rerequestablebooleanOptional
400One of the provided values in the request body is invalid. One of the provided values in the request query is invalid. Cannot create check for finished deployment The provided token is not from an OAuth2 Client
401The request is not authorized.
403You do not have permission to access this resource.
404The deployment was not found