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

# Onedrive upload file

> Create or replace a file in the user's OneDrive with text content. Replacing a file keeps the previous version in OneDrive's version history, and a…

`onedrive_upload_file`

Create or replace a file in the user's OneDrive with text content. Replacing a file keeps the previous version in OneDrive's version history, and a deleted file goes to the recycle bin — both are recoverable.

## Parameters

<ParamField path="name" type="string" required>
  File name including extension.
</ParamField>

<ParamField path="content" type="string" required>
  Text content of the file.
</ParamField>

<ParamField path="parentId" type="string">
  Optional parent folder id. Defaults to the drive root.
</ParamField>

<ParamField path="mimeType" type="string">
  MIME type. Default text/plain.
</ParamField>
