# List LinkedIn accounts

Source: https://docs.emelia.io/docs/linkedin-accounts/list-linkedin-accounts

Guide: [List the accounts](https://docs.emelia.io/docs/linkedin-accounts.md#list-the-accounts)

`GET https://api.emelia.io/linkedin/accounts`

Returns the LinkedIn accounts connected to the workspace of the API key and their state. No session cookie or password is returned.

`status` is `active`, `connecting` (a LinkedIn verification is in progress), `disconnected` (the account must be reconnected, see `POST /linkedin/invitations` with `authId`) or `disabled` (no LinkedIn slot for this account).

Use `id` as the `linkedin` value of an identity in `PATCH /advanced/campaigns/{campaignId}/identities`.

## Authentication

Send your API key in the `Authorization` header: `Authorization: <your API key>`.

## Example request

**cURL**

```bash
curl -X GET "https://api.emelia.io/linkedin/accounts" \
  -H "Authorization: $EMELIA_API_KEY"
```

**JavaScript**

```js
const response = await fetch('https://api.emelia.io/linkedin/accounts', {
  method: 'GET',
  headers: { Authorization: process.env.EMELIA_API_KEY },
});
console.log(await response.json());
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://api.emelia.io/linkedin/accounts",
    headers={"Authorization": os.environ["EMELIA_API_KEY"]},
)
print(response.json())
```

## Responses

### 200: Accounts of the workspace.

| Field | Type | Required | Description |
|---|---|---|---|
| `success` | boolean | no |  |
| `accounts` | array of object | no |  |
| `accounts[].id` | string | no |  |
| `accounts[].name` | string | no |  |
| `accounts[].handle` | string | no |  |
| `accounts[].accountType` | enum: `standard`, `premium`, `sales_navigator`, `recruiter` | no |  |
| `accounts[].status` | enum: `active`, `connecting`, `disconnected`, `disabled` | no |  |
| `accounts[].connectedAt` | string (date-time) | no |  |
| `accounts[].campaigns` | array of object | no |  |

```json
{
  "success": true,
  "accounts": [
    {
      "id": "6650f1a2b839d80011c5a0bb",
      "name": "Claire Fontaine",
      "handle": "claire-fontaine",
      "accountType": "premium",
      "status": "active",
      "connectedAt": "2026-10-01T08:00:00.000Z",
      "campaigns": [
        {
          "id": "6650f1a2b839d80011c5a0f1",
          "name": "Q4 founders",
          "status": "RUNNING",
          "type": "MULTICANAL"
        }
      ]
    }
  ]
}
```

### 401: Missing, malformed, unknown or disabled API key. The key must be exactly 48 characters, otherwise it is treated as a session token and rejected the same way.

| Field | Type | Required | Description |
|---|---|---|---|
| `error` | string or object | yes | Human readable message. A few legacy routes return an empty object `{}` here instead of a string. |
| `code` | enum: `INVALID_REQUEST`, `INVALID_PARAMETERS`, `SUBSCRIPTION_REQUIRED`, `CAMPAIGN_NOT_FOUND`, `CAMPAIGN_ALREADY_RUNNING`, `SCHEDULE_MISSING`, `STEPS_MISSING`, `NO_RECIPIENTS`, `TOO_MANY_RECIPIENTS`, `PLANNED_START_INVALID`, `PLANNED_START_IN_PAST`, `EMAIL_PROVIDER_MISSING`, `EMAIL_PROVIDER_DISCONNECTED`, `EMAIL_PROVIDER_EXPIRED`, `ONE_EMAIL_PROVIDER_EXPIRED`, `EMAIL_ADDRESS_DISCONNECTED`, `TRACKING_DOMAINS_REQUIRED`, `LINKEDIN_ACCOUNT_MISSING`, `LINKEDIN_COOKIE_EXPIRED`, `LINKEDIN_SLOT_EXPIRED`, `WHATSAPP_ACCOUNT_EXPIRED`, `WHATSAPP_SLOT_EXPIRED`, `NO_IDENTITY_SET`, `IDENTITY_FOREIGN_ACCOUNT`, `IDENTITY_EMAIL_PROVIDER_MISSING`, `LINKEDIN_ACCOUNT_AMBIGUOUS`, `WHATSAPP_ACCOUNT_AMBIGUOUS`, `LINKEDIN_AUDIO_MISSING`, `EMAIL_STEP_NO_ACTIVE_VERSION`, `EMAIL_VERSION_NO_CONTENT`, `EMAIL_VERSION_NO_SUBJECT`, `RECIPIENTS_NO_EMAIL`, `RECIPIENTS_NO_LINKEDIN`, `MC_LINKEDIN_DAILY_LIMIT_CONNECTION`, `MC_LINKEDIN_DAILY_LIMIT`, `DAILY_CONTACT_TOO_LOW`, `LINKEDIN_DAILY_CONTACT_LIMIT`, `VERIFY_EMAIL_TOKEN_INVALID`, `VERIFY_EMAIL_TOKEN_EXPIRED`, `FREE_CREDITS_DOMAIN_ALREADY_CLAIMED`, `FREE_CREDITS_ALREADY_GRANTED`, `FREE_CREDITS_NOT_ELIGIBLE`, `RATE_LIMITED`, `STATS_COMPUTING`, `WARMUP_PROVIDER_UNSUPPORTED`, `ACCOUNT_DISCONNECTED`, `EMAIL_PROVIDER_NOT_FOUND`, `TRACKING_DOMAIN_MISSING`, `TRACKING_DOMAIN_INVALID`, `TRACKING_DOMAIN_TAKEN`, `TRACKING_DOMAIN_NOT_FOUND`, `TRACKING_DOMAIN_DISABLED`, `TRACKING_DOMAIN_PROVIDERS_MISSING`, `INVALID_STEP_ID`, `INVALID_VERSION_ID`, `DUPLICATE_STEP_ID` | no | Stable machine readable error code. Present only on catalogued errors (mainly the campaign start checks), on validation errors (`INVALID_REQUEST`) and on some LinkedIn provider errors (`ACCOUNT_DISCONNECTED`, `RATE_LIMITED`). Most other errors have no code: rely on the HTTP status and on `error`. Codes are never renamed once deployed. |
| `params` | object | no | Values interpolated in the message, for example `{"max": 30000}`. |

```json
{
  "error": "Authentication required"
}
```
