> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.dropboxapi.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.dropboxapi.com/_mcp/server.

# Upload Session Start

POST https://content.dropboxapi.com/2/files/upload_session/start
Content-Type: application/octet-stream

Upload sessions allow you to upload a single file in one or more requests, for example where
 the size of the file is greater than 150 MiB. This call starts a new upload session with the
 given data. You can then use [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) or [upload_session/append_batch](api:dropbox-api:POST/2/files/upload_session/append_batch) to add
 more data, then [upload_session/finish](api:dropbox-api:POST/2/files/upload_session/finish) or [upload_session/finish_batch:2](api:dropbox-api:POST/2/files/upload_session/finish_batch_v2) to save all the data to
 a file in Dropbox. A single request should not upload more than 150 MiB. The maximum size of
 a file one can upload to an upload session is 2^41 - 2^22 (2,199,019,061,248) bytes.
 An upload session can be used for a maximum of 7 days. Attempting to use a
 `UploadSessionStartResult.session_id` with [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) or other upload session
 routes more than 7 days after its creation will return `UploadSessionLookupError.not_found`.
 Calls to this endpoint will count as data transport calls for any Dropbox Business teams with a
 limit on the number of data transport calls allowed per month. For more information, see the
 Data transport limit page https://www.dropbox.com/developers/reference/data-transport-limit.
 By default, upload sessions require you to send content of the file in sequential order via
 consecutive [upload_session/start](api:dropbox-api:POST/2/files/upload_session/start), [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2), and [upload_session/finish](api:dropbox-api:POST/2/files/upload_session/finish) calls
 (or their batch variants). For better performance, you can optionally set
 `UploadSessionStartArg.session_type` to `UploadSessionType.concurrent` to start a concurrent
 upload session. Concurrent upload sessions may upload file data in concurrent
 [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) requests, with a few caveats. After all of the requests are complete,
 finish the session with [upload_session/finish](api:dropbox-api:POST/2/files/upload_session/finish) as normal. You can not send data in a
 [upload_session/start](api:dropbox-api:POST/2/files/upload_session/start) or [upload_session/finish](api:dropbox-api:POST/2/files/upload_session/finish) call, only with [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) or
 [upload_session/append_batch](api:dropbox-api:POST/2/files/upload_session/append_batch). Also, the length of the uploaded data in a call to
 [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) or [upload_session/append_batch](api:dropbox-api:POST/2/files/upload_session/append_batch) must be a multiple of 2^22 (4,194,304)
 bytes, except for the final append request with `UploadSessionAppendArg.close` or
 `UploadSessionAppendBatchArgEntry.close` set to true that may contain any remaining data.

**Required scope:** `files.content.write`

**Endpoint format:** [Content-upload](https://docs.dropboxapi.com/dropbox-api/docs/technical-reference/request-response-formats#content-upload-endpoints)

**Authentication:** [User](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#user-authentication), [Dropbox-API-Select-Admin (Team Admin)](https://docs.dropboxapi.com/dropbox-api/docs/auth-types#admin-authentication-via-dropbox-api-select-admin)

Reference: https://docs.dropboxapi.com/dropbox-api/api-reference/user-endpoints/files/upload-session-start

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 token issued to a specific user. Use `Authorization: Bearer <token>`. Public clients should use the authorization code flow with PKCE (S256). For background or offline access, send `token_access_type=offline` during authorization and use the returned refresh token to obtain new access tokens. You can generate a short-lived access token from the App Console; see [Testing with a generated token](https://docs.dropboxapi.com/dropbox-api/docs/oauth#testing-with-a-generated-token).

## Request

### Headers

- `Dropbox-API-Select-User` (string, optional) — Acts on behalf of a team member for supported user-auth operations. Pass a team member ID such as `dbmid:...`. When used with a team token, that token must also include the `team_data.member` scope.
- `Dropbox-API-Select-Admin` (string, optional) — Acts as the specified team admin for supported user-auth operations. Pass a team member ID for an admin account. When used with a team token, that token must also include the `team_data.member` scope.
- `Dropbox-API-Path-Root` (string, optional) — Scopes path-based operations to a namespace (root). The value is a JSON serialization of the `common.PathRoot` union: `{".tag": "home"}`, `{".tag": "root", "root": "<namespace_id>"}`, or `{".tag": "namespace_id", "namespace_id": "<namespace_id>"}`. On failure the request returns 422 with a `common.PathRootError`.
- `Dropbox-API-Arg` (object, required) — JSON-encoded arguments. Non-ASCII characters and 0x7F must use JSON \uXXXX escape sequences to be HTTP-header-safe.
  - `close` (boolean, optional, default: false) — If true, the current session will be closed, at which point you won't be able to call [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) anymore with the current session.
  - `content_hash` (string, optional, nullable) — A hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. Optional, but recommended to avoid committing data corrupted in transit. For more information see our [Content hash](https://www.dropbox.com/developers/reference/content-hash) page.
  - `session_type` (object or object, optional, nullable) — Type of upload session you want to start. If not specified, default is `UploadSessionType.sequential`.
    - files.UploadSessionType.sequential
      - `.tag` (enum, required)
        - Allowed values: `sequential`
    - files.UploadSessionType.concurrent
      - `.tag` (enum, required)
        - Allowed values: `concurrent`

### Body (application/octet-stream)

This endpoint expects binary data of type application/octet-stream.

- Binary request body.

## Response

### 200

Successful response

- `session_id` (string, required) — A unique identifier for the upload session. Pass this to [upload_session/append:2](api:dropbox-api:POST/2/files/upload_session/append_v2) and [upload_session/finish](api:dropbox-api:POST/2/files/upload_session/finish).

## Errors

### 401 Unauthorized Error

Bad or expired token

- `error` (object or object or object or object or object or object or object or object, required) — Errors occurred during authentication.
  - auth_apiv2.AuthError.invalid_access_token
    - `.tag` (enum, required)
      - Allowed values: `invalid_access_token`
  - auth_apiv2.AuthError.invalid_select_user
    - `.tag` (enum, required)
      - Allowed values: `invalid_select_user`
  - auth_apiv2.AuthError.invalid_select_admin
    - `.tag` (enum, required)
      - Allowed values: `invalid_select_admin`
  - auth_apiv2.AuthError.user_suspended
    - `.tag` (enum, required)
      - Allowed values: `user_suspended`
  - auth_apiv2.AuthError.expired_access_token
    - `.tag` (enum, required)
      - Allowed values: `expired_access_token`
  - auth_apiv2.AuthError.missing_scope
    - `.tag` (enum, required)
      - Allowed values: `missing_scope`
    - `required_scope` (string, required) — The required scope to access the route.
  - auth_apiv2.AuthError.route_access_denied
    - `.tag` (enum, required)
      - Allowed values: `route_access_denied`
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.

### 403 Forbidden Error

The user or team account doesn't have access to the endpoint or feature

- `error` (object or object or object or object or object, required) — Error occurred because the account doesn't have permission to access the resource.
  - auth_apiv2.AccessError.invalid_account_type
    - `.tag` (enum, required)
      - Allowed values: `invalid_account_type`
    - `invalid_account_type` (object or object or object, required)
      - auth_apiv2.InvalidAccountTypeError.endpoint
        - `.tag` (enum, required)
          - Allowed values: `endpoint`
      - auth_apiv2.InvalidAccountTypeError.feature
        - `.tag` (enum, required)
          - Allowed values: `feature`
      - Other
        - `.tag` (string, optional)
  - auth_apiv2.AccessError.paper_access_denied
    - `.tag` (enum, required)
      - Allowed values: `paper_access_denied`
    - `paper_access_denied` (object or object or object, required)
      - auth_apiv2.PaperAccessError.paper_disabled
        - `.tag` (enum, required)
          - Allowed values: `paper_disabled`
      - auth_apiv2.PaperAccessError.not_paper_user
        - `.tag` (enum, required)
          - Allowed values: `not_paper_user`
      - Other
        - `.tag` (string, optional)
  - auth_apiv2.AccessError.team_access_denied
    - `.tag` (enum, required)
      - Allowed values: `team_access_denied`
  - auth_apiv2.AccessError.no_permission
    - `.tag` (enum, required)
      - Allowed values: `no_permission`
    - `no_permission` (object or object, required)
      - auth_apiv2.NoPermissionError.unauthorized_account_id_usage
        - `.tag` (enum, required)
          - Allowed values: `unauthorized_account_id_usage`
        - `unauthorized_account_ids` (list of string, required) — The account IDs that the caller does not have permission to use.
      - Other
        - `.tag` (string, optional)
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.

### 409 Conflict Error

Endpoint-specific error

- `error` (object or object or object or object or object, required)
  - files.UploadSessionStartError.concurrent_session_data_not_allowed
    - `.tag` (enum, required)
      - Allowed values: `concurrent_session_data_not_allowed`
  - files.UploadSessionStartError.concurrent_session_close_not_allowed
    - `.tag` (enum, required)
      - Allowed values: `concurrent_session_close_not_allowed`
  - files.UploadSessionStartError.payload_too_large
    - `.tag` (enum, required)
      - Allowed values: `payload_too_large`
  - files.UploadSessionStartError.content_hash_mismatch
    - `.tag` (enum, required)
      - Allowed values: `content_hash_mismatch`
  - Other
    - `.tag` (string, optional)
- `error_summary` (string, required) — A human-readable summary of the error.
- `user_message` (object, optional)
  - `locale` (string, optional)
  - `text` (string, optional)

### 429 Too Many Requests Error

The app is making too many requests for the given user or team and is being rate limited. The app should wait for the number of seconds specified in the "Retry-After" response header before trying again.

- `error` (object, required) — Error occurred because the app is being rate limited.
  - `reason` (object or object or object, required) — The reason why the app is being rate limited.
    - auth_apiv2.RateLimitReason.too_many_requests
      - `.tag` (enum, required)
        - Allowed values: `too_many_requests`
    - auth_apiv2.RateLimitReason.too_many_write_operations
      - `.tag` (enum, required)
        - Allowed values: `too_many_write_operations`
    - Other
      - `.tag` (string, optional)
  - `retry_after` (uint64, optional, default: 1) — The number of seconds that the app should wait before making another request.
- `error_summary` (string, required) — A human-readable summary of the error.

### 500 Internal Server Error

Internal server error. An error occurred on the Dropbox servers. Check https://status.dropbox.com/ for announcements about Dropbox service issues.

- `any`

## Examples

**Response**

```json
{
  "session_id": "pid_upload_session:h-NtwvAdw3XDqqHmb0J2t0XfIaSnQw2Eor59pfZI9D_ZGNJ4Ew"
}
```

**SDK Code**

```python
import requests

url = "https://content.dropboxapi.com/2/files/upload_session/start"

headers = {
    "Dropbox-API-Arg": "{\"close\":false}",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/octet-stream"
}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://content.dropboxapi.com/2/files/upload_session/start';
const options = {
  method: 'POST',
  headers: {
    'Dropbox-API-Arg': '{"close":false}',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/octet-stream'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://content.dropboxapi.com/2/files/upload_session/start"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Dropbox-API-Arg", "{\"close\":false}")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/octet-stream")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://content.dropboxapi.com/2/files/upload_session/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Dropbox-API-Arg"] = '{"close":false}'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/octet-stream'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://content.dropboxapi.com/2/files/upload_session/start")
  .header("Dropbox-API-Arg", "{\"close\":false}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/octet-stream")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://content.dropboxapi.com/2/files/upload_session/start', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/octet-stream',
    'Dropbox-API-Arg' => '{"close":false}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://content.dropboxapi.com/2/files/upload_session/start");
var request = new RestRequest(Method.POST);
request.AddHeader("Dropbox-API-Arg", "{\"close\":false}");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/octet-stream");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Dropbox-API-Arg": "{\"close\":false}",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/octet-stream"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://content.dropboxapi.com/2/files/upload_session/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```