skills/create-attachment/SKILL.md
# Create Attachment Adds a new attachment to an existing message, typically a draft message, by providing the file content as a base64-encoded string. ## API Details - **API**: Microsoft Outlook Mail API - **Method**: POST - **Path**: `/me/messages/{message-id}/attachments` - **Operation ID**: `createAttachment` - **Tag**: Attachments - **OpenAPI**: [microsoft-outlook-mail-api.yaml](../../openapi/microsoft-outlook-mail-api.yaml) ## Sandbox Mock server URL: `http://localhost:8080/rest/micros
npx skillsauth add naftiko/microsoft-outlook-sandbox skills/create-attachmentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Adds a new attachment to an existing message, typically a draft message, by providing the file content as a base64-encoded string.
/me/messages/{message-id}/attachmentscreateAttachmentMock server URL: http://localhost:8080/rest/microsoft-outlook-mail-api/1.0.0/me/messages/{message-id}/attachments
Authorization: Bearer {access-token}Content-Type: application/jsonMail.ReadWrite| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| message-id | string | Yes | The unique identifier of the message to attach to |
| Property | Type | Description |
|----------|------|-------------|
| @odata.type | string | The attachment type, e.g., #microsoft.graph.fileAttachment |
| name | string | The display name of the attachment |
| contentBytes | string | Base64-encoded content of the file |
| contentType | string | The MIME type of the attachment (optional) |
curl -X POST "http://localhost:8080/rest/microsoft-outlook-mail-api/1.0.0/me/messages/AAMkAGI1AAAGB1rUAAA=/attachments" \
-H "Authorization: Bearer {access-token}" \
-H "Content-Type: application/json" \
-d '{
"@odata.type": "#microsoft.graph.fileAttachment",
"name": "report.pdf",
"contentBytes": "SGVsbG8gV29ybGQ="
}'
{
"@odata.type": "#microsoft.graph.fileAttachment",
"id": "AAMkAGI1AAABEgAQAA==",
"name": "report.pdf",
"contentType": "application/pdf",
"size": 35684,
"isInline": false,
"lastModifiedDateTime": "2024-01-15T10:30:00Z",
"contentBytes": "SGVsbG8gV29ybGQ="
}
Use this operation to add a file attachment to a message, typically a draft message before sending. The file content must be base64-encoded in the contentBytes field. The @odata.type must be set to #microsoft.graph.fileAttachment for file attachments. A successful creation returns a 201 status code with the attachment object. This is commonly used in the draft workflow: create a draft, add attachments, then send. For attachments larger than 3 MB, use the upload session API instead.
tools
# Update Open Extension Update an existing open type extension on a message. ## API Details - **API**: Microsoft Outlook Mail API - **Method**: PATCH - **Path**: `/me/messages/{message-id}/extensions/{extension-id}` - **Operation ID**: `updateOpenExtension` - **Tag**: Extensions - **OpenAPI**: [microsoft-outlook-mail-api.yaml](../../openapi/microsoft-outlook-mail-api.yaml) ## Sandbox Mock server URL: `http://localhost:8080/rest/microsoft-outlook-mail-api/1.0.0/me/messages/{message-id}/exten
development
# Update Message Updates the properties of an existing message in the signed-in user's mailbox, such as marking it as read or changing its importance. ## API Details - **API**: Microsoft Outlook Mail API - **Method**: PATCH - **Path**: `/me/messages/{message-id}` - **Operation ID**: `updateMessage` - **Tag**: Messages - **OpenAPI**: [microsoft-outlook-mail-api.yaml](../../openapi/microsoft-outlook-mail-api.yaml) ## Sandbox Mock server URL: `http://localhost:8080/rest/microsoft-outlook-mail-
development
# Update Inbox Rule Update the properties of an existing inbox message rule. ## API Details - **API**: Microsoft Outlook Mail API - **Method**: PATCH - **Path**: `/me/mailFolders/inbox/messageRules/{messageRule-id}` - **Operation ID**: `updateMessageRule` - **Tag**: InboxRules - **OpenAPI**: [microsoft-outlook-mail-api.yaml](../../openapi/microsoft-outlook-mail-api.yaml) ## Sandbox Mock server URL: `http://localhost:8080/rest/microsoft-outlook-mail-api/1.0.0/me/mailFolders/inbox/messageRule
development
# Update Mailbox Settings Update the user's mailbox settings such as automatic replies, locale, time zone, or working hours. ## API Details - **API**: Microsoft Outlook Mail API - **Method**: PATCH - **Path**: `/me/mailboxSettings` - **Operation ID**: `updateMailboxSettings` - **Tag**: MailboxSettings - **OpenAPI**: [microsoft-outlook-mail-api.yaml](../../openapi/microsoft-outlook-mail-api.yaml) ## Sandbox Mock server URL: `http://localhost:8080/rest/microsoft-outlook-mail-api/1.0.0/me/mail