Skip to main content

GET /api/v1/public/prospects//connection-status/

Checks whether a LinkedIn account connected to the workspace is already connected (1st-degree relationship) with the given prospect on LinkedIn. This endpoint queries the underlying LinkedIn provider (Unipile) in real time using the prospect’s LinkedIn profile URL and one of the workspace’s connected LinkedIn accounts. It is intended to be used before sending a connection invitation, so a campaign can decide to skip the invite step when the user is already connected. The same endpoint is also exposed under the JWT-protected path GET /api/v1/prospects/{prospect_id}/connection-status/ for use from the in-app client.
  • Auth: X-API-Key
  • Method: GET

Path Parameters

  • prospect_id (integer, required): ID of the prospect to check.

Query Parameters

  • account_id (integer, optional): ID of a specific LinkedIn ConnectedAccount to use for the check. If omitted, the first active LinkedIn account in the current workspace is used.

Response

{
  "success": true,
  "is_connected": true,
  "connection_level": 1,
  "network_distance": "FIRST_DEGREE",
  "checked_with_account_id": 42
}
FieldTypeDescription
successbooleanAlways true on a successful response.
is_connectedbooleantrue when the prospect is a 1st-degree LinkedIn connection of the chosen account.
connection_levelinteger | nullNumeric LinkedIn connection degree. 1 = 1st-degree (direct connection), 2 = 2nd-degree, 3 = 3rd-degree. null when the relationship is unknown or out of network.
network_distancestring | nullRaw network distance reported by the provider. Typically one of FIRST_DEGREE, SECOND_DEGREE, THIRD_DEGREE, OUT_OF_NETWORK, or null if unknown.
checked_with_account_idintegerThe id of the ConnectedAccount actually used to perform the check.

Error Responses

StatuserrorWhen
400Prospect has no LinkedIn profile URL to check againstThe prospect has no linkedin_profile_url set.
400No active LinkedIn account is connected to this workspaceNo LinkedIn ConnectedAccount with status OK / SYNC_SUCCESS / CREATION_SUCCESS / RECONNECTED exists for the workspace.
400Requested LinkedIn account not found or not active in this workspaceAn account_id was supplied but it does not match an active LinkedIn account in the workspace.
403Access deniedThe prospect belongs to another workspace.
404Prospect not foundNo prospect exists with the given id.
502Failed to fetch prospect profile from LinkedIn providerUnipile call failed or returned a non-2xx response.

Examples

# Default: pick any active LinkedIn account in the workspace
curl -H "X-API-Key: <key>" \
  "https://api.staging.seleqt.ai/api/v1/public/prospects/12345/connection-status/"
# Force the check to use a specific connected LinkedIn account
curl -H "X-API-Key: <key>" \
  "https://api.staging.seleqt.ai/api/v1/public/prospects/12345/connection-status/?account_id=42"

Notes

  • The endpoint performs a live call to the LinkedIn provider on every request and is therefore subject to provider rate limits. It is intended for on-demand checks (for example, immediately before launching a campaign or scheduling an invite), not for bulk polling.
  • “Connected” is defined strictly as a 1st-degree LinkedIn relationship. A pending invitation does not count as connected.
  • The chosen LinkedIn account is the perspective from which the check is made. If a workspace has multiple LinkedIn accounts and the prospect is connected to only one of them, you may get different answers depending on which account is used — pass account_id explicitly when this matters.