Creates a new Check
POST
https://api.vercel.com/v1/deployments/{deploymentId}/checksCreates 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
{ "blocking": "false", "completedAt": "123", "conclusion": "succeeded", "createdAt": "123", "deploymentId": "example_id", "detailsUrl": "https://example.com", "externalId": "example_id", "id": "chk_1a2b3c4d5e6f7g8h9i0j", "integrationId": "example_id", "name": "Performance Check", "output": { "metrics": { "CLS": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "FCP": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "LCP": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "TBT": { "previousValue": "123", "source": "web-vitals", "value": "123" }, "virtualExperienceScore": { "previousValue": "123", "source": "web-vitals", "value": "123" } } }, "path": "/api/users", "rerequestable": "false", "startedAt": "123", "status": "completed", "updatedAt": "123"}AuthorizationbearerToken
Default authentication mechanism
application/json
200Success
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
410Error