Skip to content
Docs

Create a check

POSThttps://api.vercel.com/v2/projects/{projectIdOrName}/checks
Creates a new check for a project.
https://api.vercel.com/v2/projects/{projectIdOrName}/checks
const response = await fetch('https://api.vercel.com/v2/projects/projectIdOrName/checks?teamId=string&slug=string', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Example Name",
"isRerequestable": "true",
"requires": "build-ready",
"targets": [],
"blocks": "build-start",
"source": "value",
"timeout": "123"
}),
});
const data = await response.json();
console.log(data);
Response
{
"blocks": "build-start",
"createdAt": "123",
"deletedAt": "123",
"id": "icfg_1234567890",
"isRerequestable": "false",
"name": "Example Name",
"ownerId": "example_id",
"projectId": "example_id",
"requires": "build-ready",
"source": {
"externalResourceId": "example_id",
"integrationConfigurationId": "example_id",
"integrationId": "example_id",
"kind": "integration",
"resourceId": "example_id"
},
"sourceIntegrationConfigurationId": "example_id",
"sourceKind": "git-provider",
"targets": [],
"timeout": "123",
"updatedAt": "123"
}
AuthorizationbearerToken

Default authentication mechanism

projectIdOrNamestringRequired
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
isRerequestablebooleanOptional
requiresstringRequired
targetsarrayOptional
blocksstringOptional
sourceobjectOptional3 variants
timeoutnumberOptional
200Success
blocksstringRequired
createdAtnumberRequired
deletedAtnumberOptional
idstringRequired
isRerequestablebooleanRequired
namestringRequired
ownerIdstringRequired
projectIdstringRequired
requiresstringRequired
sourceobjectRequired3 variants
sourceIntegrationConfigurationIdstringOptional
sourceKindstringRequired
targetsarrayRequired
timeoutnumberRequired
updatedAtnumberRequired
400One of the provided values in the request body is invalid. One of the provided values in the request query is invalid.
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
500Error