APILinkedIn Messaging
Trigger conversation sync
Trigger a full sync of conversations from LinkedIn API to local database.
POST
/conversations/syncAuthentication requiredConversations
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/conversations/sync' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","force":false}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID |
force | boolean | No | Force sync even if recently synced |
Example
{
"accountId": "acc_12345",
"force": false
}Responses
| Status | Description |
|---|---|
| 200 | Sync completed |
| 401 | Unauthorized |
| 404 | Account not found |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
accountId | string | |
conversationsProcessed | number | |
messagesProcessed | number | |
durationMs | number | |
durationSeconds | string | |
error | string |
200 Example
{
"success": true,
"accountId": "acc_12345",
"conversationsProcessed": 0,
"messagesProcessed": 0,
"durationMs": 0,
"durationSeconds": "example_value",
"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"
}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).
Get sync status
Get sync status for one or all LinkedIn accounts.
