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 (classic messaging and the Recruiter mailbox), 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 (and in a Recruiter Get Conversation) 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
(Email + WhatsApp) The id of the message carrying the attachment (
attachments[].message_id).
(LinkedIn Recruiter) The message URN (urn:li:ts_msg_message:…): event.metadata.entity_urn in a webhook, messages[].entity_urn in Get Conversation. A Recruiter file is signed per message, so it takes message_id instead of conversation_id, with account_id set to the Recruiter seat.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. On WhatsApp, sub_code NOT_CONNECTED is a reconnection: retry later. |
INVALID_PARAMS | Attachment not found: the message was deleted, or conversation_id / message_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?