Next.js Discord

Discord Forum

Is the Vercel CLI promote endpoint correct, different endpoint that is used in the UI?

Unanswered
Northern Goshawk posted this in #help-forum
Open in Discord
Northern GoshawkOP
I'm trying to use Vercel CLI to promote a build to production. I am receiving a 500 error. I've found that the error is from this line of code - https://github.com/vercel/vercel/blob/main/packages/cli/src/commands/promote/request-promote.ts#L46
For those that don't click through, the URL in the code is /v9/projects/${project.id}/promote/${deployment.id}. I logged and found that the project ID I'm using is correct, and the deployment ID used is correct.

When I promote to production through the Vercel UI, it uses the /v13/deployment endpoint with target: 'production'. I manually updated the CLI locally and it works as expected.

When I look through the Vercel REST API endpoints documentation (https://vercel.com/docs/rest-api/endpoints), there's no reference of /promote/ in any place there, nor was a reference to that endpoint when that code was introduced in May 2023.

Does the /v9/projects/${project.id}/promote/${deployment.id} endpoint exist and is it the correct endpoint for promoting builds?

0 Replies