Thanks for your patience and providing detailed context!
Question for you: what are you building? This is a unique scenario, not heard of this before.
Would love to hear if you’ve made any breakthroughs since posting this, I’ll answer your question anyway in case anyone else comes across this thread in the future.
You can use the Vercel CLI commandvercel --prod to create a production deployment of the latest changes from your specified branch to re-deploy.
Typically, assigning a domain to a project shouldn’t require a re-deploy if the domain is correctly configured. The API endpoint you’re using (/v10/projects/${config.projectId}/domains) is correct for assigning a domain to a project. However, the “No Deployment” warning you’re seeing suggests that there might be an issue with the deployment or domain configuration.
To resolve this without a re-deploy, you could try:
Verifying that the gitBranch specified in your API request matches a branch with an existing deployment.
Checking if there are any DNS configuration issues for the domain.
Ensuring that the domain has been properly verified in your Vercel project settings.
Regarding cache purging, Vercel doesn’t provide a direct API endpoint for purging cache. Cache management in Vercel is typically handled through cache-control headers in your application.