Capability Sources

Create or replace a OneDrive text file as the calling member

Changed on

Creates or replaces a bounded UTF-8 text file at a path in the calling member's OneDrive, or in another drive such as a SharePoint library with driveId. For Office, PDF or other binary files, use an upload session.

put/v1/capabilities/microsoft-365/drive-files

Request

  • Base URL
    https://api.openworklabs.com
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Request body

Microsoft365DriveFileWriteBody required
driveId, string

The file's driveId from a search, folder or link result. Omit for the member's own OneDrive.

path, string required
content, string required

Response

OneDrive file written.

Microsoft365DriveFileWriteResponse required
ok, true required
file, Microsoft365DriveItem required

Changes

    • breaking

      the response property file/size became nullable for the status

    • info

      response property file/size list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      added the new optional request property driveId

    4 more changes in this revision