# Connections

Manage LinkedIn connections and invitations – check status, send, list, accept, ignore, withdraw, and remove.

## connection status

Check connection status with a LinkedIn person.

```bash
linkedin connection status <url>
```

```bash
linkedin connection status https://www.linkedin.com/in/vprudnikoff
```

## connection send

Send a connection request.

```bash
linkedin connection send <url> [flags]
```

| Flag | Type | Description |
| --- | --- | --- |
| `--note` | string | Personalized note to include with the request |
| `--email` | string | Email address (required by some profiles to connect) |

```bash
linkedin connection send https://www.linkedin.com/in/vprudnikoff
linkedin connection send https://www.linkedin.com/in/vprudnikoff --note "Love to connect!"
linkedin connection send https://www.linkedin.com/in/vprudnikoff --email vlad@example.com
```

## connection list

List your LinkedIn connections with optional filters.

```bash
linkedin connection list [flags]
```

| Flag | Type | Description |
| --- | --- | --- |
| `--limit` | integer | Max connections to return |
| `--since` | string | Only connections made since this ISO timestamp |
| `--first-name` | string | Filter by first name |
| `--last-name` | string | Filter by last name |
| `--position` | string | Filter by job position |
| `--locations` | string | Comma-separated locations |
| `--industries` | string | Comma-separated industries |
| `--current-companies` | string | Comma-separated current company names |
| `--previous-companies` | string | Comma-separated previous company names |
| `--schools` | string | Comma-separated school names |

> `--since` only works when no filter flags are used.

```bash
linkedin connection list --limit 50 --json
linkedin connection list --current-companies "Linked API" --position "Engineer" --json
linkedin connection list --since 2024-01-01T00:00:00Z --json
```

## connection pending

List pending outgoing connection requests.

```bash
linkedin connection pending --json
```

## connection invitations

List incoming connection, company-follow, and newsletter-subscription invitations.

```bash
linkedin connection invitations --json
```

## connection accept

Accept an incoming invitation. The type must match the target URL.

```bash
linkedin connection accept <type> <url>
```

```bash
linkedin connection accept connect https://www.linkedin.com/in/vprudnikoff
linkedin connection accept companyFollow https://www.linkedin.com/company/example
linkedin connection accept newsletterSubscribe https://www.linkedin.com/newsletters/example-1234567890
```

## connection ignore

Ignore an incoming invitation. The type must match the target URL.

```bash
linkedin connection ignore <type> <url>
```

```bash
linkedin connection ignore connect https://www.linkedin.com/in/vprudnikoff
linkedin connection ignore companyFollow https://www.linkedin.com/company/example
linkedin connection ignore newsletterSubscribe https://www.linkedin.com/newsletters/example-1234567890
```

## connection withdraw

Withdraw a pending connection request.

```bash
linkedin connection withdraw <url> [flags]
```

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--unfollow` / `--no-unfollow` | boolean | `true` | Also unfollow the person |

```bash
linkedin connection withdraw https://www.linkedin.com/in/vprudnikoff
linkedin connection withdraw https://www.linkedin.com/in/vprudnikoff --no-unfollow
```

## connection remove

Remove an existing connection.

```bash
linkedin connection remove <url>
```

```bash
linkedin connection remove https://www.linkedin.com/in/vprudnikoff
```

## network sync

Enable network monitoring for the account. Run once — afterwards connection events (accepted requests, new connections, incoming requests) become available via `network events`.

```bash
linkedin network sync
```

> Only changes that happen after this runs are captured.

## network events

Get connection events from the monitored network.

```bash
linkedin network events [flags]
```

| Flag | Type | Description |
| --- | --- | --- |
| `--since` | string | Only retrieve events after this ISO timestamp |
| `--type` | string | Filter by event type: `connectionRequestReceived`, `connectionAccepted`, or `connectionAdded` (default: all) |

```bash
linkedin network events --json
linkedin network events --since 2024-01-15T10:30:00Z --type connectionAccepted
```

> Requires network monitoring to be enabled once with `network sync`. Events are retained for 90 days.
