> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.scaleabm.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.scaleabm.org/_mcp/server.

# Messaging

> Send messages, read conversations, and manage your LinkedIn inbox

# Messaging

Voyager provides full messaging capabilities — send messages to connections and Open Profiles, read conversations, manage your inbox, export messages over a rolling window, and send InMail to non-connections.

> **Note**
>
> Every Voyager response is wrapped in the standard envelope `{ success, statusCode, message, data, errors }`. The JSON examples below show only the endpoint-specific payload — in your client, access it as `res.data.<field>`, not `res.<field>`. See [Introduction](/guides/getting-started/introduction) for the full envelope shape.

## Send a Message

```bash
curl -X POST "$BASE/api/send" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "profileUrl": "https://www.linkedin.com/in/janesmith/",
    "message": "Hi Jane, great connecting with you. Would love to chat about your work at Acme."
  }'
```

```json
{
  "success": true,
  "method": "api-direct"
}
```

### How Message Sending Works

Voyager uses a multi-phase approach to find or create the right conversation:

1. **Phase 0 -- Cache lookup**: If you've messaged this person before, Voyager has the conversation ID cached for instant delivery
2. **Phase 1 -- Participant query**: REST API lookup by recipient URN
3. **Phase 1.5 -- Conversation scan**: Scans recent conversations and matches by participant profile ID
4. **Phase 2 -- New conversation**: Creates a new conversation thread

> **Tip**
>
> For faster repeat sends, include `recipientUrn` from a previous profile lookup. This lets Voyager skip URN resolution entirely.

```bash
# Faster send with cached URN
curl -X POST "$BASE/api/send" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "profileUrl": "https://www.linkedin.com/in/janesmith/",
    "message": "Following up on our conversation...",
    "recipientUrn": "urn:li:fsd_profile:ABC123"
  }'
```

## Send InMail

Send InMail to non-connections (requires InMail credits on LinkedIn):

```bash
curl -X POST "$BASE/api/send-inmail" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "profileUrl": "https://www.linkedin.com/in/targetperson/",
    "subject": "Quick question about your platform work",
    "message": "Hi, I noticed your recent talk on distributed systems..."
  }'
```

## List Conversations

```bash
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/conversations?limit=20&category=PRIMARY_INBOX"
```

### Conversation Categories

| Category          | Description                           |
| ----------------- | ------------------------------------- |
| `INBOX`           | All conversations                     |
| `PRIMARY_INBOX`   | Primary inbox (default LinkedIn view) |
| `SECONDARY_INBOX` | Other / secondary messages            |
| `ARCHIVED_INBOX`  | Archived conversations                |
| `SPAM_INBOX`      | Spam / filtered messages              |

### Pagination

Conversations use cursor-based pagination:

```bash
# First page
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/conversations?limit=20"

# Next page (use nextCursor from previous response)
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/conversations?limit=20&nextCursor=CURSOR_VALUE"
```

## Read Messages in a Conversation

```bash
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/conversations/CONVERSATION_URN?limit=50"
```

Or by profile URL:

```bash
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/messages?profileUrl=https://www.linkedin.com/in/janesmith/&limit=20"
```

## Mark as Read

```bash
curl -X POST "$BASE/api/conversations/CONVERSATION_ID/read" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER"
```

## Export Full Inbox

Export your complete inbox history:

```bash
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/export/inbox?months=3&categories=PRIMARY_INBOX"
```

## Event-Driven Messaging

Instead of polling for new messages, use webhooks:

```bash
# Create a webhook for incoming messages
curl -X POST "$BASE/api/webhooks" \
  -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-server.com/webhook",
    "events": ["message_received"],
    "secret": "your-hmac-secret"
  }'
```

Or poll the event feed:

```bash
curl -H "Authorization: Bearer $KEY" \
  -H "X-User-Id: $USER" \
  "$BASE/api/events?types=message.received&since=2026-03-17T00:00:00Z&limit=50"
```

## Recommended Pacing

LinkedIn monitors messaging frequency. Recommended intervals:

* **Between messages**: 30-60 seconds
* **Daily limit**: No hard cap, but stay under 50-100 for new accounts
* **New connections**: Wait at least a few hours after connecting before messaging

> **Warning**
>
> Sending too many messages too quickly can trigger LinkedIn's spam detection, which may temporarily restrict your account's messaging ability.

## Related

* [Connections](/guides/core-concepts/connections) -- Connect before messaging non-Open Profiles
* [Webhooks](/guides/workflow-guides/webhooks) -- Real-time message notifications
* [Rate Limiting](/common-patterns/common-patterns/rate-limiting) -- Usage tracking and recommended intervals