Create a check
POST
/__remote/api.vercel.com/v2/projects/{projectIdOrName}/checksCreates a new check for a project.
/__remote/api.vercel.com/v2/projects/{projectIdOrName}/checks
const response = await fetch('/__remote/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
application/json
Whether check runs can be manually re-requested. Git provider checks cannot be re-requested.
Deployment targets where this check applies. Valid values are "production", "preview", "all", or a Custom Environment ID such as "env_...". If omitted, defaults to ["production"]. "all" cannot be combined with other targets.
200Success
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