Upload Deployment Files
POST
/__remote/api.vercel.com/v2/filesBefore you create a deployment you need to upload the required files for that deployment. To do it, you need to first upload each file to this endpoint. Once that's completed, you can create a new deployment with the uploaded files. The file content must be placed inside the body of the request. In the case of a successful response you'll receive a status code 200 with an empty body.
/__remote/api.vercel.com/v2/files
const response = await fetch('/__remote/api.vercel.com/v2/files?teamId=string&slug=string', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_ACCESS_TOKEN', 'Content-Type': 'application/json', },});
const data = await response.json();console.log(data);Response
{ "urls": []}AuthorizationbearerToken
Default authentication mechanism
400One of the provided values in the headers is invalid
Digest is not valid
File size is not valid
401The request is not authorized.
403You do not have permission to access this resource.
404Error
410Error
426Error