Upload

View as MarkdownOpen in Claude
Create a new file with the contents provided in the request. Do not use this to upload a file larger than 150 MiB. Instead, create an upload session with [upload_session/start](api:dropbox-api:POST/2/files/upload_session/start). 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. **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)

Authentication

AuthorizationBearer
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).

Headers

Dropbox-API-Select-UserstringOptional

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-AdminstringOptional

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-RootstringOptional
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-ArgobjectRequired

JSON-encoded arguments. Non-ASCII characters and 0x7F must use JSON \uXXXX escape sequences to be HTTP-header-safe.

Request

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

Response headers

X-Dropbox-Request-IdstringOptional
A unique identifier for the request, useful for debugging and support.

Response

Successful response
client_modifieddatetime

For files, this is the modification time set by the desktop client when the file was added to Dropbox. Since this time is not verified (the Dropbox server stores whatever the desktop client sends up), this should only be used for display purposes (such as sorting) and not, for example, to determine if a file has changed or not.

idstring>=1 character
A unique identifier for the file.
namestring

The last component of the path (including extension). This never contains a slash.

revstringformat: "[0-9a-f]+">=9 characters
A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.
server_modifieddatetime
The last time the file was modified on Dropbox.
sizeuint64>=0
The file size in bytes.
content_hashstring or nullOptional=64 characters

A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page.

export_infoobject or nullOptional

Information about format this file can be exported to. This filed must be set if is_downloadable is set to false.

file_lock_infoobject or nullOptional
If present, the metadata associated with the file's current lock.
has_explicit_shared_membersboolean or nullOptional

This flag will only be present if include_has_explicit_shared_members is true in list_folder or get_metadata. If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.

is_downloadablebooleanOptionalDefaults to true

If true, file can be downloaded directly; else the file must be exported.

is_restorableboolean or nullOptional
If present, indicates whether this file revision can be restored.
media_infoobject or nullOptional

Additional information if the file is a photo or video. This field will not be set on entries returned by list_folder, list_folder/continue, or get_thumbnail_batch, starting December 2, 2019.

path_displaystring or nullOptional

The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user’s filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won’t be returned by list_folder/continue. This field will be null if the file or folder is not mounted.

path_lowerstring or nullOptional
The lowercased full path in the user's Dropbox. This always starts with a slash. This field will be null if the file or folder is not mounted.
preview_urlstring or nullOptional
The preview URL of the file.
property_groupslist of objects or nullOptional
Additional information if the file has custom properties with the property template specified.
sharing_infoobject or nullOptional
Set if this file is contained in a shared folder.
parent_shared_folder_idany or nullOptionalDeprecated

Please use FileSharingInfo.parent_shared_folder_id or FolderSharingInfo.parent_shared_folder_id instead.

Errors

401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error