Skip to main content
OPTIONS
/
files
/
content
cURL
curl -i -X OPTIONS "https://api.box.com/2.0/files/content" \
     -H "authorization: Bearer <ACCESS_TOKEN>" \
     -H "content-type: application/json" \
     -d '{"name":"Contract.pdf", "parent":{"id":"11446498"}}'
{
  "upload_url": "https://upload-las.app.box.com/api/2.0/files/content?upload_session_id=1234",
  "upload_token": "Pc3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQP"
}
This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.Learn more about Box SDK versioning strategy.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string

The name for the file.

Example:

"File.mp4"

size
integer<int32>

The size of the file in bytes.

Example:

1024

parent
object

The parent folder to upload the file to.

Response

If the check passed, the response will include a session URL that can be used to upload the file to.

The details for the upload session for the file.

upload_url
string

A URL for an upload session that can be used to upload the file.

Example:

"https://upload-las.app.box.com/api/2.0/files/content?upload_session_id=1234"

upload_token
string

An optional access token to use to upload the file.

Example:

"Pc3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQP"