Skip to main content
POST
/
v2
/
files
uploadFile
import { Vercel } from "@vercel/sdk";  const vercel = new Vercel({  bearerToken: "<YOUR_BEARER_TOKEN_HERE>", });  async function run() {  const result = await vercel.deployments.uploadFile({  teamId: "team_1a2b3c4d5e6f7g8h9i0j1k2l",  slug: "my-team-url-slug",  });   console.log(result); }  run();
{  "urls": [  "example-upload.aws.com"  ] }

Authorizations

Authorization
string
header
required

Default authentication mechanism

Headers

Content-Length
number

The file size in bytes

x-vercel-digest
string

The file SHA1 used to check the integrity

Maximum length: 40
x-now-digest
string
deprecated

The file SHA1 used to check the integrity

Maximum length: 40
x-now-size
number
deprecated

The file size as an alternative to Content-Length

Query Parameters

teamId
string

The Team identifier to perform the request on behalf of.

Example:

"team_1a2b3c4d5e6f7g8h9i0j1k2l"

slug
string

The Team slug to perform the request on behalf of.

Example:

"my-team-url-slug"

Body

application/octet-stream · file

The body is of type file.

Response

File already uploaded File successfully uploaded

  • Option 1
  • Option 2
urls
string[]
required

Array of URLs where the file was updated

Example:
["example-upload.aws.com"]
⌘I