File storage
OneDrive in your product and your AI agents, through one API
The OneDrive toolkit covers files, folders and their sharing: list and search items, read metadata and a download link, create folders, rename, move, copy and delete items, create sharing links and manage who has access. The customer connects a personal or Microsoft 365 account once with OAuth, and your product or AI agent calls every operation through one Connect endpoint.
15 days to try it. No credit card.
POST https://connect.reportei.com/api/tools/onedrive_create_folder/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"parent_id": "<parent_id>",
"name": "<name>",
"folder": {}
}
}How it works
From a connected customer to the first OneDrive call.
- 1
Your customer connects the account
Your system opens a Connect session for the toolkit and your customer connects their OneDrive account. You get the connection id.
- 2
Your product calls the tool
A POST to /api/tools/{tool}/execute with the connection id and arguments. On success, Connect preserves the app's response status and body.
- 3
Connect handles the rest
It stores the credential encrypted, renews tokens for OAuth connections that support renewal and records executions in an audit trail available through the API.
Use cases
What your product does with OneDrive.
Files in your customer's drive
Let users browse folders from your product, find a file by name or content, and get a download link for it.
Share a deliverable
After your product generates a report or asset, create a folder for it and a sharing link, or share it with specific people by email with read or write access.
AI agent for file organization
Let an agent search the drive, rename and move items into folders, copy a folder and list who can access a file.
Tools
11 OneDrive tools
- List itemsGETLists the files and folders inside a folder, with id, name, size, lastModifiedDateTime, webUrl and a folder or file facet. Only the first page comes back.
- Search itemsGETSearches the drive by file name, metadata and content, and returns the matching files and folders with id, name, webUrl and parentReference. Only the first page comes back.
- Get itemGETReturns the metadata of a file or folder: name, size, dates, createdBy, webUrl, parentReference with the driveId and the folder id, and a folder or file facet. A file also has @microsoft.graph.downloadUrl, a download link that needs no sign-in and expires in about an hour.
- Create folderPOSTCreates a folder inside another folder and returns it with its id.
- Update itemPATCHRenames a file or folder, or moves it to another folder of the same drive, and returns it. Only the fields sent change.
- Copy itemPOSTCopies a file or folder, with its contents, to a folder or under a new name. The copy runs in the background: the response is 202 with no body, and the new item shows up in List items once it is done. Sharing is not copied.
- Delete itemDELETEMoves a file or folder to the recycle bin of OneDrive, where the user can restore it.
- Create sharing linkPOSTCreates a sharing link for a file or folder, or returns the link of the same type that already exists, as a permission whose link.webUrl is the link to send.
- List permissionsGETLists who has access to a file or folder: links, people and groups, each with id, roles and inheritedFrom when it comes from a parent folder. The owner sees every permission; other people see only their own.
- Create permissionPOSTShares a file or folder with people by email, with read or write access, and returns the new permissions. With sendInvitation true, OneDrive emails them a link. The top folder of a personal drive cannot be shared.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/onedrive, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
Questions about the OneDrive toolkit
Do I need to build against the OneDrive API?
No. Connect ships 11 OneDrive tools, described and ready. Your customer connects the account and your system calls every tool through the same endpoint, with the same request format.
How does my customer connect their OneDrive account?
With the mode the toolkit accepts: OAuth with your product's app. Connect stores the credential encrypted and never returns it to your system.
Does it work with AI agents?
Yes. Each tool's input is described in JSON Schema, which your agent uses directly as a tool definition. The agent picks the tool and the arguments, and your system makes the call to Connect.
Does my customer need a Reportei account?
No. Your customer connects the account on a Connect screen, or your system sends the credential through the API, and they keep using only your product.
Toolkits in the same category
See all 100 toolkitsSee Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
