APILinkedIn Messaging
Check if profile supports email messaging
Check whether a LinkedIn profile has email messaging enabled (open profile). Some LinkedIn members allow direct email contact through their profile. Use this to verify before attempting email outreach.
POST
/messaging/check-email-supportAuthentication requiredMessaging
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/messaging/check-email-support' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","profileId":"john-doe-123"}'Parameters
No parameters.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accountId | string | No | LinkedIn account ID to use. If not provided, uses the default account. |
profileId | string | Conditional | LinkedIn profile public ID (e.g., "john-doe-123") Either profileId or profileUrn must be provided. |
profileUrn | string | Conditional | LinkedIn profile URN (e.g., "urn:li:fsd_profile:ABC123") Either profileUrn or profileId must be provided. |
Example
{
"profileUrn": "urn:li:fsd_profile:ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o"
}Responses
| Status | Description |
|---|---|
| 200 | Email support status retrieved successfully |
| 400 | Bad request - Must provide profileId or profileUrn |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Server error |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
accountId | string | |
profileId | string | |
profileUrn | string | |
supportsFreeEmail | boolean | |
message | string |
200 Example
{
"success": true,
"accountId": "696ce9e780e0483585e4e553",
"profileId": null,
"profileUrn": "urn:li:fsd_profile:ACoAAFpqSoMB8vTqRbg4mN_wbabO8w0gjgFu-6o",
"supportsFreeEmail": true,
"message": "Profile supports free email messaging (open profile)"
}400 Response Parameters
| Name | Type | Description |
|---|---|---|
success | boolean | |
error | object |
400 Example
{
"success": false,
"error": "Either profileId or profileUrn is required"
}401 Example
{
"error": "Unauthorized - Invalid credentials"
}500 Example
{
"error": "Failed to get LinkedIn authentication credentials",
"success": false
}Mark all messages as read
Mark all LinkedIn messages as read for the authenticated account. Clears all unread indicators in the inbox. Useful for bulk inbox management.
LinkedIn Search API
Search LinkedIn for jobs, companies, groups, and people programmatically. Use advanced filters for location, industry, job type, and more via the ConnectSafely API.
