upload-file-content
Upload base64-encoded file content to a specific item in OneDrive or SharePoint. Overwrites existing files without warning.
Instructions
The content stream, if the item represents a file.
💡 TIP: Body is a base64-encoded string of the file bytes; the server decodes it before PUT. Max 4MB inline (use create-upload-session above 4MB). For new files use path format: /items/root:/path/to/file.txt:/content. Overwrites existing files without warning.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Base64-encoded file content. The server decodes it and PUTs the raw bytes to Microsoft Graph. | |
| driveId | Yes | Path parameter: driveId | |
| driveItemId | Yes | Path parameter: driveItemId | |
| includeHeaders | No | Include response headers (including ETag) in the response metadata | |
| excludeResponse | No | Exclude the full response body and only return success or failure indication |