deployments

Upload Deployment Files

Changed on

Before 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.

post/v2/files

Request

  • Base URL: https://api.vercel.com
  • URL: https://api.vercel.com/v2/files
  • Auth: HTTP bearer

Query parameters

teamIdstring
Example:team_1a2b3c4d5e6f7g8h9i0j1k2l

The Team identifier to perform the request on behalf of.

slugstring
Example:my-team-url-slug

The Team slug to perform the request on behalf of.

Headers

Content-Lengthnumber

The file size in bytes

x-vercel-digeststring

The file SHA1 used to check the integrity

x-now-digeststring

The file SHA1 used to check the integrity

x-now-sizenumber

The file size as an alternative to Content-Length

Request body application/octet-stream

string binary required

Response

File already uploaded File successfully uploaded

OR
object required

Example response

{
  "urls": [
    "example-upload.aws.com"
  ]
}

Changes

    • info

      added the non-success response with the status

    • warning

      deleted the header request parameter 'content-Length'

    • warning

      deleted the header request parameter 'x-Now-Digest'

    • warning

      deleted the header request parameter 'x-Now-Size'

    • warning

      deleted the header request parameter 'x-Vercel-Digest'

    • info

      added the new optional header request parameter Content-Length

    • info

      added the new optional header request parameter x-now-digest

    • info

      added the new optional header request parameter x-now-size

    • info

      added the new optional header request parameter x-vercel-digest