Manage Applications

    Create upload session for existing file


    Creates an upload session for an existing file.



    Path Parameters

    stringin pathrequired

    The unique identifier that represent a file.

    The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the url https://* the file_id is 123.

    Request Body

    stringin bodyoptional

    The optional new name of new file

    integer / int64in bodyrequired

    The total number of bytes of the file to be uploaded


    application/jsonUpload Session

    Returns a new upload session.

    application/jsonClient Error

    Returns an error if the file already exists, or the account has run out of disk space.

    You can now try out some of our APIs live, right here in the documentation.
    Log In

    Request Example

    curl -X POST \
         -H "Authorization: Bearer <ACCESS_TOKEN>" \
         -H "Content-Type: application/json" \
         -d '{
           "file_size": 104857600
    file_size = 26000000
    file_name = 'test_file.pdf'
    upload_session = client.folder('22222').create_upload_session(file_size, file_name)
    print('Created upload session {0} with chunk size of {1} bytes'.format(, upload_session.part_size))

    Response Example

      "id": 11446498,
      "type": "upload_session",
      "session_expires_at": "2012-12-12T10:53:43-08:00",
      "part_size": 1024,
      "total_parts": 1000,
      "num_parts_processed": 455,
      "session_endpoints": {
        "upload_part": "",
        "commit": "",
        "abort": "",
        "list_parts": "",
        "status": "",
        "log_event": ""