curl -X GET "https://api.linkupapi.com/v2/messages/attachment?account_id=ACCOUNT_ID&conversation_id=CONVERSATION_URN&asset_urn=ASSET_URN" \
-H "x-api-key: YOUR_API_KEY" \
--output attachment.pdf
Messaging
Download Attachment
Download the bytes of a message attachment.
GET
/
v2
/
messages
/
attachment
curl -X GET "https://api.linkupapi.com/v2/messages/attachment?account_id=ACCOUNT_ID&conversation_id=CONVERSATION_URN&asset_urn=ASSET_URN" \
-H "x-api-key: YOUR_API_KEY" \
--output attachment.pdf
Overview
Returns the raw file for an attachment received in a message — on LinkedIn, email (Gmail / Outlook) and WhatsApp accounts. LinkedIn’s own media URL requires the account session and its signature expires, so this endpoint re-resolves it on demand; for email the bytes are fetched over the mailbox API. For LinkedIn, every attachment in a webhook payload already carries a ready-to-calldownload_url — see Webhooks Introduction. For email, use the attachments[] from Get Conversation. You still send your x-api-key header.
This endpoint costs 1 credit per successful download. Nothing is stored on our side. Ignore this if you’re on per-seat pricing: usage is unlimited.
Request
string
required
Your API key for authentication.
string
required
The account the message belongs to.
string
(LinkedIn) The conversation URN, from
event.metadata.conversation_urn.string
(LinkedIn) The attachment identifier, from
event.attachments[].asset_urn.string
(Email + WhatsApp) The id of the message carrying the attachment (
attachments[].message_id).string
(Email) The attachment id (
attachments[].attachment_id).string
(Email) Optional filename for the download.
Response
On success, the raw file with its ownContent-Type (and Content-Disposition when a filename is known) — not the usual JSON envelope.
On failure, the standard V2 error envelope:
| Code | Meaning |
|---|---|
INSUFFICIENT_CREDITS | Not enough credits. |
ACCOUNT_INACTIVE | The account is disconnected — re-authenticate it. |
INVALID_PARAMS | Attachment not found: the message was deleted, or conversation_id / asset_urn is wrong. |
curl -X GET "https://api.linkupapi.com/v2/messages/attachment?account_id=ACCOUNT_ID&conversation_id=CONVERSATION_URN&asset_urn=ASSET_URN" \
-H "x-api-key: YOUR_API_KEY" \
--output attachment.pdf
Was this page helpful?