---
title: "Download an Outlook attachment's bytes as the calling member"
method: GET
path: "/v1/capabilities/microsoft-365/mail-attachment/{messageId}/{attachmentId}"
tags: ["Capability Sources"]
---

# Download an Outlook attachment's bytes as the calling member

`GET /v1/capabilities/microsoft-365/mail-attachment/{messageId}/{attachmentId}`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/capabilities/microsoft-365/mail-attachment/{messageId}/{attachmentId}`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Downloads one file attachment from an Outlook message as base64, up to 10 MiB, using the attachment id from the mail-attachments capability. Decode contentBase64 locally to reconstruct the file, e.g. a PDF or spreadsheet. Attached Outlook items, cloud links and larger files return contentUnavailableReason instead.

## Path parameters

- `messageId` string, required
- `attachmentId` string, required

## Response `200`

Outlook attachment returned.

- Microsoft365MailAttachmentResponse
  - `ok` true, required
  - `attachment` object, required
    - `id` string, required
    - `name` string, required
    - `contentType` string, required
    - `size` number, nullable, required
    - `isInline` boolean, required: Shown inside the message body, such as a signature image, rather than as a separate file.
    - `kind` 'file' | 'item' | 'reference' | 'unknown', required: Only file attachments have bytes to download; item is an attached Outlook item and reference a link to a cloud file.
    - `contentBase64` string, nullable, required: Standard base64-encoded file bytes; decode locally to reconstruct the file.
    - `contentUnavailableReason` 'not_a_file' | 'file_too_large', nullable, required

## Other responses

- `401`: The caller must be signed in.
- `409`: The calling member has not connected their Microsoft account or is missing permission.
- `502`: Microsoft Graph rejected the request.

## Changes

- **2026-10-27** `78491ac9c743`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/capabilities/microsoft-365/mail-attachment/:messageId/:attachmentId/get.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/8117bc7c5626?raw)
