api-gateway
VerifiedCall third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, run a query through a connected search or scraping provider. Every call goes to an app the user connected. It is not a general-purpose browser or network client, and it cannot reach a service with no Maton connection. It also manages event triggers, webhook destinations that forward event payloads to an external URL until deleted, and local `--exec` handlers that run a script per event - separate, high-risk capabilities beyond a normal API call. Default to read and list calls; every write, connection, trigger, destination, or handler needs explicit user confirmation.
references/sharepoint/README.md
View on GitHub# SharePoint
## API Reference
> **Safety:** All write operations (POST, PUT, PATCH, DELETE) require explicit user confirmation before execution. Verify the target resource and intended effect with the user first. See the main [SKILL.md](../../SKILL.md#security--permissions) for full security policy.
**App name:** `sharepoint`
**Upstream base URL:** `graph.microsoft.com`
Replace the upstream base URL with the app name. Everything after the base URL including query strings is kept as-is. Any account-specific part of the base URL and the API credentials are stored in the Maton connection, and the gateway injects both so requests never carry them. For example:
- Upstream: `https://graph.microsoft.com/v1.0/sites/root`
- Gateway: `https://api.maton.ai/sharepoint/v1.0/sites/root`
### Sites API
#### Get Root Site
```bash
maton api '/sharepoint/v1.0/sites/root'
```
**Response:**
```json
{
"id": "contoso.sharepoint.com,guid1,guid2",
"displayName": "Communication site",
"name": "root",
"webUrl": "https://contoso.sharepoint.com"
}
```
#### Get Site by ID
```bash
maton api '/sharepoint/v1.0/sites/{site_id}'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
Site IDs follow the format: `{hostname},{site-guid},{web-guid}`
#### Get Site by Hostname and Path
```bash
maton api '/sharepoint/v1.0/sites/{hostname}:/{site-path}'
```
**Note:** `{hostname}` and `{site-path}` are placeholders. Replace each of them with real values before sending the request.
Example: `GET /sharepoint/v1.0/sites/contoso.sharepoint.com:/sites/marketing`
#### Get Root Site by Hostname
```bash
maton api '/sharepoint/v1.0/sites/{hostname}:/'
```
**Note:** `{hostname}` is a placeholder. Replace it with a real value before sending the request.
#### Search Sites
```bash
maton api '/sharepoint/v1.0/sites?search={query}'
```
**Note:** `{query}` is a placeholder. Replace it with a real value before sending the request.
#### List Subsites
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/sites'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
#### Get Site Columns
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/columns'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
#### Get Followed Sites
```bash
maton api '/sharepoint/v1.0/me/followedSites'
```
### Lists API
#### List Site Lists
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
**Response:**
```json
{
"value": [
{
"id": "b23974d6-a0aa-4e9b-9535-25393598b973",
"name": "Events",
"displayName": "Events",
"webUrl": "https://contoso.sharepoint.com/Lists/Events"
}
]
}
```
#### Get List
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
#### List Columns
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/columns'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
#### List Content Types
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/contentTypes'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
#### List Items
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
With field values (use `$expand=fields`):
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items?$expand=fields'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
**Response:**
```json
{
"value": [
{
"id": "1",
"createdDateTime": "2026-03-05T08:00:00Z",
"fields": {
"Title": "Team Meeting",
"EventDate": "2026-03-10T14:00:00Z",
"Location": "Conference Room A"
}
}
]
}
```
#### Get List Item
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items/{item_id}?$expand=fields'
```
**Note:** `{site_id}`, `{list_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
#### Create List Item
```bash
maton api -X POST '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items' -H 'Content-Type: application/json' --input - <<'JSON'
{
"fields": {
"Title": "New Event",
"EventDate": "2026-04-01T10:00:00Z",
"Location": "Main Hall"
}
}
JSON
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
#### Update List Item
```bash
maton api -X PATCH '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items/{item_id}/fields' -H 'Content-Type: application/json' --input - <<'JSON'
{
"Title": "Updated Event Title"
}
JSON
```
**Note:** `{site_id}`, `{list_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
#### Delete List Item
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items/{item_id}' -X DELETE
```
**Note:** `{site_id}`, `{list_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
Returns `204 No Content` on success.
### Drives API
#### List Site Drives
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/drives'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
#### Get Default Drive
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/drive'
```
**Note:** `{site_id}` is a placeholder. Replace it with a real value before sending the request.
#### Get Drive by ID
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}'
```
**Note:** `{drive_id}` is a placeholder. Replace it with a real value before sending the request.
**Note:** Drive IDs containing `!` (e.g., `b!abc123`) must be URL-encoded: `b%21abc123`
### Drive Content API
#### List Root Contents
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/root/children'
```
**Note:** `{drive_id}` is a placeholder. Replace it with a real value before sending the request.
**Response:**
```json
{
"value": [
{
"id": "01WBMXT7NQEEYJ3BAXL5...",
"name": "Documents",
"folder": { "childCount": 5 },
"webUrl": "https://contoso.sharepoint.com/Shared%20Documents/Documents"
},
{
"id": "01WBMXT7LISS5OMIG4CZ...",
"name": "report.docx",
"file": { "mimeType": "application/vnd.openxmlformats-officedocument.wordprocessingml.document" },
"size": 25600
}
]
}
```
#### Get Item by ID
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}'
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
#### Get Item by Path
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/root:/{path}'
```
**Note:** `{drive_id}` and `{path}` are placeholders. Replace each of them with real values before sending the request.
Example: `GET /sharepoint/v1.0/drives/{drive_id}/root:/Reports/Q1.xlsx`
#### List Folder Contents
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{folder_id}/children'
```
**Note:** `{drive_id}` and `{folder_id}` are placeholders. Replace each of them with real values before sending the request.
Or by path:
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/root:/{folder_path}:/children'
```
**Note:** `{drive_id}` and `{folder_path}` are placeholders. Replace each of them with real values before sending the request.
#### Download File
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/content'
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
Or by path:
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/root:/{path}:/content'
```
**Note:** `{drive_id}` and `{path}` are placeholders. Replace each of them with real values before sending the request.
Returns a redirect to the download URL (follow redirects to get file content).
#### Upload File (Simple - up to 4MB)
```bash
maton api -X PUT '/sharepoint/v1.0/drives/{drive_id}/root:/{filename}:/content' -H 'Content-Type: application/octet-stream' \
--input ./file.txt
```
**Note:** `{drive_id}` and `{filename}` are placeholders. Replace each of them with real values before sending the request.
Example:
```bash
maton api -X PUT '/sharepoint/v1.0/drives/{drive_id}/root:/{file_path}:/content' -H 'Content-Type: text/plain' --input - <<'BODY'
File content here
BODY
```
**Note:** `{drive_id}` and `{file_path}` are placeholders. Replace each of them with real values before sending the request.
#### Create Folder
```bash
maton api -X POST '/sharepoint/v1.0/drives/{drive_id}/root/children' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "New Folder",
"folder": {},
"@microsoft.graph.conflictBehavior": "rename"
}
JSON
```
**Note:** `{drive_id}` is a placeholder. Replace it with a real value before sending the request.
Or in a specific folder:
```bash
maton api -X POST '/sharepoint/v1.0/drives/{drive_id}/items/{parent_id}/children'
```
**Note:** `{drive_id}` and `{parent_id}` are placeholders. Replace each of them with real values before sending the request.
#### Rename/Move Item
```bash
maton api -X PATCH '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "new-filename.txt"
}
JSON
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
To move to another folder:
```bash
maton api -X PATCH '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}' -H 'Content-Type: application/json' --input - <<'JSON'
{
"parentReference": {
"id": "{target_folder_id}"
}
}
JSON
```
**Note:** `{drive_id}`, `{item_id}` and `{target_folder_id}` are placeholders. Replace each of them with real values before sending the request.
#### Copy Item
```bash
maton api -X POST '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/copy' -H 'Content-Type: application/json' --input - <<'JSON'
{
"name": "copied-file.txt"
}
JSON
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
This is an async operation - returns `202 Accepted` with a `Location` header for progress tracking.
#### Delete Item
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}' -X DELETE
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
Returns `204 No Content` on success. Deleted items go to the recycle bin.
#### Search Files
```bash
maton api "/sharepoint/v1.0/drives/{drive_id}/root/search(q='{query}')"
```
**Note:** `{drive_id}` and `{query}` are placeholders. Replace each of them with real values before sending the request.
**Response:**
```json
{
"value": [
{
"id": "01WBMXT7...",
"name": "quarterly-report.xlsx",
"webUrl": "https://contoso.sharepoint.com/..."
}
]
}
```
#### Track Changes (Delta)
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/root/delta'
```
**Note:** `{drive_id}` is a placeholder. Replace it with a real value before sending the request.
Returns changed items and a `@odata.deltaLink` for subsequent requests.
### Permissions API
#### Get Item Permissions
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/permissions'
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
#### Create Sharing Link
```bash
maton api -X POST '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/createLink' -H 'Content-Type: application/json' --input - <<'JSON'
{
"type": "view",
"scope": "organization"
}
JSON
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
**Request body:**
- `type`: `view`, `edit`, or `embed`
- `scope`: `anonymous`, `organization`, or `users`
**Response:**
```json
{
"id": "f0cfb2bd-ef5f-4451-9932-8e9a3e219aaa",
"roles": ["read"],
"link": {
"type": "view",
"scope": "organization",
"webUrl": "https://contoso.sharepoint.com/:t:/g/..."
}
}
```
### Versions API
#### List File Versions
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/versions'
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
**Response:**
```json
{
"value": [
{
"id": "2.0",
"lastModifiedDateTime": "2026-03-05T08:07:12Z",
"size": 25600,
"lastModifiedBy": {
"user": { "displayName": "John Doe" }
}
},
{
"id": "1.0",
"lastModifiedDateTime": "2026-03-04T10:00:00Z",
"size": 24000
}
]
}
```
#### Get Specific Version
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/versions/{version_id}'
```
**Note:** `{drive_id}`, `{item_id}` and `{version_id}` are placeholders. Replace each of them with real values before sending the request.
#### Download Version Content
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/versions/{version_id}/content'
```
**Note:** `{drive_id}`, `{item_id}` and `{version_id}` are placeholders. Replace each of them with real values before sending the request.
### Thumbnails API
#### Get Item Thumbnails
```bash
maton api '/sharepoint/v1.0/drives/{drive_id}/items/{item_id}/thumbnails'
```
**Note:** `{drive_id}` and `{item_id}` are placeholders. Replace each of them with real values before sending the request.
**Response:**
```json
{
"value": [
{
"id": "0",
"small": { "height": 96, "width": 96, "url": "..." },
"medium": { "height": 176, "width": 176, "url": "..." },
"large": { "height": 800, "width": 800, "url": "..." }
}
]
}
```
### OData Query parameters
SharePoint/Graph API supports OData query parameters:
| Parameter | Description | Example |
|-----------|-------------|---------|
| `$select` | Select specific properties | `?$select=id,name,size` |
| `$expand` | Expand related entities | `?$expand=fields` |
| `$filter` | Filter results | `?$filter=name eq 'Report'` |
| `$orderby` | Sort results | `?$orderby=lastModifiedDateTime desc` |
| `$top` | Limit results | `?$top=10` |
| `$skip` | Skip results (pagination) | `?$skip=10` |
Example with multiple parameters:
```bash
maton api '/sharepoint/v1.0/sites/{site_id}/lists/{list_id}/items?$expand=fields&$top=50&$orderby=createdDateTime%20desc'
```
**Note:** `{site_id}` and `{list_id}` are placeholders. Replace each of them with real values before sending the request.
### Notes
- Site IDs follow the format: `{hostname},{site-guid},{web-guid}`
- Drive IDs with `!` (e.g., `b!abc123`) must be URL-encoded (`b%21abc123`)
- Item IDs are opaque strings (e.g., `01WBMXT7NQEEYJ3BAXL5...`)
- File uploads via PUT are limited to 4MB; use upload sessions for larger files
- Copy operations are asynchronous - check the Location header for progress
- Deleted items go to the SharePoint recycle bin
- Some admin operations require elevated permissions (Sites.FullControl.All)
### Resources
- [Sites API](https://learn.microsoft.com/en-us/graph/api/resources/sharepoint)
- [DriveItem API](https://learn.microsoft.com/en-us/graph/api/resources/driveitem)
- [List API](https://learn.microsoft.com/en-us/graph/api/resources/list)
- [Maton CLI Manual](https://cli.maton.ai/manual)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |