logo
InboxDownload attachment

Download attachment

Downloads an attachment from a conversation. Supports both attachments received from leads (replies) and attachments sent by the user (manual messages). The file is fetched on-demand from the email provider (Gmail or Outlook) and proxied through this endpoint. No files are stored on SendKit servers.

Supported providers: Gmail (OAuth), Outlook/Microsoft 365 (OAuth). SMTP/IMAP mailbox attachments are not supported. Sent attachments are only downloadable if provider attachment IDs were captured at send time.

The response is the raw binary file with appropriate Content-Type and Content-Disposition headers.

curl -X GET "https://api.sendkit.ai/v1/inbox/example_string/attachments/42" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY"
{}
GET
/v1/inbox/{conversationId}/attachments/{attachmentIndex}
GET
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
path
conversationIdstring
Required

Conversation ID (the inbox thread ID)

path
attachmentIndexinteger
Required

Zero-based index of the attachment across all reply and sent messages. Use the downloadUrl from the GET /v1/inbox/{conversationId} response to get the correct index.

Min: 0
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

Path Parameters

conversationIdstring
Required

Conversation ID (the inbox thread ID)

attachmentIndexinteger
Required

Zero-based index of the attachment across all reply and sent messages. Use the downloadUrl from the GET /v1/inbox/{conversationId} response to get the correct index.

Responses

Attachment file binary