---
title: "Upload Deployment Files"
method: POST
path: "/v2/files"
tags: ["deployments"]
---

# Upload Deployment Files

`POST /v2/files`

## Request

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

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.

## Query parameters

- `teamId` string
- `slug` string

## Headers

- `Content-Length` number: The file size in bytes
- `x-vercel-digest` string: The file SHA1 used to check the integrity
- `x-now-digest` string: The file SHA1 used to check the integrity
- `x-now-size` number: The file size as an alternative to `Content-Length`

## Request body `application/octet-stream`

- string, binary

## Response `200`

File already uploaded
File successfully uploaded

- union
  - object
    - `urls` string[], required: Array of URLs where the file was updated
  - object

## Other responses

- `400`: One of the provided values in the headers is invalid Digest is not valid File size is not valid
- `401`: The request is not authorized.
- `403`: You do not have permission to access this resource.
- `404`
- `410`
- `426`

## Changes

- **2026-09-30** `099fbe1f521c`: 1 info
  - added the non-success response with the status `404`
- **2026-09-01** `606993b34ea5`: 4 warning, 4 info
  - deleted the `header` request parameter `'content-Length'`
  - deleted the `header` request parameter `'x-Now-Digest'`
  - deleted the `header` request parameter `'x-Now-Size'`
  - deleted the `header` request parameter `'x-Vercel-Digest'`
  - …4 more
- **2026-07-21** `2ae10ee9d21c`: 1 info
  - added the non-success response with the status `410`
- **2026-06-11** `14b4658f819e`: 4 warning, 5 info
  - deleted the `header` request parameter `Content-Length`
  - deleted the `header` request parameter `x-now-digest`
  - deleted the `header` request parameter `x-now-size`
  - deleted the `header` request parameter `x-vercel-digest`
  - …5 more
- **2025-10-09** `50caddad4ae7`: 1 warning
  - deleted the `header` request parameter `x-internal-v0-token`

[Operation history](https://skmtc.dev/vercel/apis/vercel-api/changes/v2/files/post.md)

---

[API](https://skmtc.dev/vercel/apis/vercel-api.md) - [All operations](https://skmtc.dev/vercel/apis/vercel-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vercel/apis/vercel-api/revisions/60686c0e1f6a?raw)
