Upload message attachment
Upload a file attachment for use in a LinkedIn message.
/conversations/upload-attachmentCode Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/conversations/upload-attachment' \ -H 'Authorization: Bearer <your_api_key>'Parameters
No parameters.
Request Body
No request body schema available.
Responses
| Status | Description |
|---|---|
| 200 | File uploaded |
| 400 | Upload failed |
| 401 | Unauthorized |
| 404 | Account not found |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
attachment | object |
200 Example
{
"success": true,
"attachment": {}
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
400 Example
{
"error": "example_value"
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "example_value"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "example_value"
}500 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
500 Example
{
"error": "example_value"
}Send message (with channel selection)
Send a LinkedIn message. By default, messagingChannel is "auto" which auto-detects whether to use Sales Navigator or standard LinkedIn inbox based on the account premium status. Users can explicitly control the messaging channel by setting messagingChannel to: "sales_navigator" — forces the message through the Sales Navigator API (returns a 400 error if the account does not have an active Sales Navigator subscription), or "linkedin_inbox" — forces standard LinkedIn messaging even if the account has Sales Navigator. Example: to send via standard inbox on a Sales Nav account, pass { "messagingChannel": "linkedin_inbox" }. To explicitly use Sales Navigator, pass { "messagingChannel": "sales_navigator" }. If omitted or set to "auto", the system decides automatically. Supports file attachments.
Download media from message
Download media (images, files, videos, audio) from a LinkedIn messaging URL. Uses account session cookies for authentication. No proxy is used — media is fetched directly from LinkedIn CDN. Supports URLs from www.linkedin.com/dms/prv/ (private messaging media) and media.licdn.com (CDN-hosted media).
