POST
/
v2
/
files
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",
  });

  // Handle the result
  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

200
application/json
File already uploaded File successfully uploaded
urls
string[]
required

Array of URLs where the file was updated

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