Box Developer Documentation
 
    Latest version

    Preflight check before upload

    options
    https://api.box.com/2.0
    /files/content

    This endpoint is in the version 2024.0. No changes are required to continue using it. For more details, see Box API versioning.

    Performs a check to verify that a file will be accepted by Box before you upload the entire file.

    Request

    bearer [ACCESS_TOKEN]
    application/json

    Request Body

    stringin bodyoptional
    "File.mp4"

    The name for the file

    objectin body

    The parent folder to upload the file to

    stringin bodyoptional
    "123"

    The ID of parent item

    integer (int32)in bodyoptional
    1024

    The size of the file in bytes

    Response

    application/jsonUpload URL

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

    application/jsonConflict error

    If the check did not pass, the response will include some details on why it did not pass.

    application/jsonClient error

    An unexpected client error.

    options
    Preflight check before upload
    You can now try out some of our APIs live, right here in the documentation.
    Log in

    Request Example

    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"}}'

    Response Example

    {
      "upload_token": "Pc3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQP",
      "upload_url": "https://upload-las.app.box.com/api/2.0/files/content?upload_session_id=1234"
    }