Get account status
Retrieve the current status of a LinkedIn account. If accountId is provided, returns that specific account. Otherwise returns the most recently used account for the authenticated user.
/account/statusCode Examples
curl -X GET 'https://api.connectsafely.ai/linkedin/account/status' \ -H 'Authorization: Bearer <your_api_key>'Retrieve the current status of a LinkedIn account. If accountId is provided, returns that specific account. Otherwise returns the most recently used account for the authenticated user.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
accountId | query | No | string | Optional LinkedIn account ID. If omitted, returns the most recently used account. |
Request Body
No request body.
Responses
| Status | Description |
|---|---|
| 200 | Account status retrieved successfully |
| 401 | Unauthorized - Invalid or missing API key |
| 404 | No LinkedIn account found for this user |
200 Response Parameters
| Name | Type | Description |
|---|---|---|
id | string | Unique account identifier |
firstName | string | LinkedIn user first name |
lastName | string | LinkedIn user last name |
publicId | string | LinkedIn public profile ID (e.g., "john-doe-123") |
platform | string | Platform name (e.g., "ConnectSafely") |
status | string | Internal account operational status (AVAILABLE = available, IN_USE = busy, ERROR = needs attention) |
enabled | boolean | Whether the account is enabled for automation |
lastUsed | string (date-time) | Last activity timestamp |
hasTokens | boolean | Whether valid LinkedIn session tokens exist |
linkedinPlan | object | LinkedIn premium plan info (only returned for accounts with AVAILABLE or WARMUP status, cached for 12 hours) |
200 Example
{
"id": "696ce9e780e0483585e4e553",
"firstName": "John",
"lastName": "Doe",
"publicId": "john-doe-123",
"platform": "ConnectSafely",
"status": "AVAILABLE",
"enabled": true,
"lastUsed": "2026-02-24T04:53:13.750Z",
"hasTokens": true,
"linkedinPlan": {
"premiumType": "NON_PREMIUM",
"isPremium": false,
"hasSalesNavigator": false,
"hasRecruiter": false,
"hasAwayMessages": false,
"hasAdvertiseBadge": false,
"hasHiringManager": false
}
}401 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
401 Example
{
"error": "Unauthorized - Invalid credentials"
}404 Response Parameters
| Name | Type | Description |
|---|---|---|
error | string |
404 Example
{
"error": "example_value"
}List connected LinkedIn accounts (lightweight + searchable)
Returns a lightweight list of the LinkedIn accounts visible to the caller (their own plus any shared via a workspace). This is a fast, database-only endpoint — it does NOT call LinkedIn or fetch premium status — so it is the preferred way to populate account pickers and run searches. Each item includes `apiSeatAllocated`, indicating whether the caller currently holds an active API seat for that account. Use the optional `q` query parameter to search. `q` matches (case-insensitive) against firstName, lastName and publicId; if `q` is a 24-character account id it matches that account exactly; and if `q` is a LinkedIn profile URL the public_id slug is extracted and matched against publicId. Example requests: - `GET /linkedin/accounts` — all visible accounts - `GET /linkedin/accounts?q=john` — by first/last name or public id - `GET /linkedin/accounts?q=john-doe-123` — by public id - `GET /linkedin/accounts?q=60d21b4667d0d8992e610c85` — exact account id - `GET /linkedin/accounts?q=https://www.linkedin.com/in/john-doe-123/` — by LinkedIn profile URL
Get specific account status
Retrieve the current status of a specific LinkedIn account by ID. Returns account details including name, public ID, operational status, session validity, and LinkedIn plan info (premium type). Useful for multi-account setups to check individual account status.
