Send a connection request
Send a connection request to a LinkedIn member to become 1st-degree connections. Optionally include a personalized message (300 character limit). Connection requests with custom messages have higher acceptance rates. Provide either profileId or profileUrn.
/connectSend a connection request
Send a connection request to a LinkedIn member to become 1st-degree connections. Optionally include a personalized message (300 character limit). Connection requests with custom messages have higher acceptance rates. Provide either profileId or profileUrn.
Code Examples
curl -X POST 'https://api.connectsafely.ai/linkedin/connect' \ -H 'Authorization: Bearer <your_api_key>' \ -H 'Content-Type: application/json' \ -d '{"accountId":"acc_12345","profileId":"john-doe-123","profileUrn":"urn:li:fsd_profile:ACoAABcdefgh","customMessage":"Hello! I would like to connect with you."}'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 | No | Target LinkedIn profile public ID (e.g., "john-doe-123") |
profileUrn | string | No | Target LinkedIn profile URN (e.g., "urn:li:fsd_profile:ABC123") |
customMessage | string | No | Personalized connection message (max 300 characters). Leave empty for default request. |
Example
{
"accountId": "acc_12345",
"profileId": "john-doe-123",
"profileUrn": "urn:li:fsd_profile:ACoAABcdefgh",
"customMessage": "Hello! I would like to connect with you."
}Responses
| Status | Description |
|---|---|
| 200 | Connection request sent successfully |
Send a LinkedIn message
Send a direct message to a LinkedIn member. Supports regular messages (requires 1st-degree connection) and InMail (for non-connections, requires Premium). Can also send messages in group context. Provide either recipientProfileId or recipientProfileUrn.
Check relationship status with profile
Check the relationship between your default LinkedIn account and a target profile. Returns connection status (1st, 2nd, 3rd degree), whether you follow them, and if you are connected. Useful for determining which actions are available (message, connect, etc.).
