> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploads resources

The direct file upload API supports files up to 50MB in size and sends all the binary data to the Box API in 1 API request.

## Conflict error

The error that occurs when a file can not be created due to a conflict.

<Accordion title="Attributes and example">
  | Property       | Type           | Required | Description                                                                                                                                                                                                                                                                                                                              |
  | -------------- | -------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `type`         | `enum<string>` | No       | The value will always be `error`. Available options: `error`.                                                                                                                                                                                                                                                                            |
  | `status`       | `integer`      | No       | The HTTP status of the response.                                                                                                                                                                                                                                                                                                         |
  | `code`         | `enum<string>` | No       | A Box-specific error code. Available options: `created`, `accepted`, `no_content`, `redirect`, `not_modified`, `bad_request`, `unauthorized`, `forbidden`, `not_found`, `method_not_allowed`, `conflict`, `precondition_failed`, `too_many_requests`, `internal_server_error`, `unavailable`, `item_name_invalid`, `insufficient_scope`. |
  | `message`      | `string`       | No       | A short message describing the error.                                                                                                                                                                                                                                                                                                    |
  | `context_info` | `object`       | No       |                                                                                                                                                                                                                                                                                                                                          |
  | `help_url`     | `string`       | No       | A URL that links to more information about why this error occurred.                                                                                                                                                                                                                                                                      |
  | `request_id`   | `string`       | No       | A unique identifier for this response, which can be used when contacting Box support.                                                                                                                                                                                                                                                    |

  ```json Example theme={null}
  {
    "type": "error",
    "status": 400,
    "code": "item_name_invalid",
    "message": "Method Not Allowed",
    "context_info": {
      "conflicts": [
        {
          "id": "12345",
          "etag": "1",
          "type": "file",
          "sequence_id": "3",
          "name": "Contract.pdf",
          "sha1": "85136C79CBF9FE36BB9D05D0639C70C265C18D37",
          "file_version": {
            "id": "12345",
            "type": "file_version",
            "sha1": "134b65991ed521fcfe4724b7d814ab8ded5185dc"
          }
        }
      ]
    },
    "help_url": "https://developer.box.com/guides/api-calls/permissions-and-errors/common-errors/",
    "request_id": "abcdef123456"
  }
  ```
</Accordion>

## Upload URL

The details for the upload session for the file.

<Accordion title="Attributes and example">
  | Property       | Type     | Required | Description                                                      |
  | -------------- | -------- | -------- | ---------------------------------------------------------------- |
  | `upload_url`   | `string` | No       | A URL for an upload session that can be used to upload the file. |
  | `upload_token` | `string` | No       | An optional access token to use to upload the file.              |

  ```json Example theme={null}
  {
    "upload_url": "https://upload-las.app.box.com/api/2.0/files/content?upload_session_id=1234",
    "upload_token": "Pc3FIOG9vSGV4VHo4QzAyg5T1JvNnJoZ3ExaVNyQWw6WjRsanRKZG5lQk9qUE1BVQP"
  }
  ```
</Accordion>
