> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linkupapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send Message or Email

> Send a LinkedIn message or InMail, or an email — from a connected account.

## Overview

Sends a message from a connected account. For a **LinkedIn** account it's a direct message — or a [Sales Nav InMail](#inmail) with `inmail: true` / a `recipient_urn`. For an **email** account (see [Connect a mailbox](/api-reference/v2/accounts/login#email-mailbox)) it sends an email. For a **WhatsApp** account it sends a WhatsApp message to `phone_number`. The `params` depend on the account's platform — each field below is tagged **(LinkedIn)**, **(Email)**, **(WhatsApp)**, or several.

<Note>This endpoint consumes **1 credit** for a text message or email (**2 credits** with LinkedIn media). An InMail consumes **1 InMail credit** from the account's premium seat (separate from your API credits — see [Balance](/api-reference/v2/messages/balance)). Ignore this if you're on per-seat pricing: usage is unlimited.</Note>

<Note>`media_link`, `media_file` and `media_path` attach **one** file (priority: `media_link` > `media_file` > `media_path`). To send **several attachments in the same message**, use `media_links` and/or `media_files` (up to 10 files per message, combinable with the single-file params).</Note>

<Note>An audio file (`.m4a`, `.mp3`, `.wav`, `.aac`) is delivered as a **native voice note**, not a file to download. LinkedIn caps them at 1 minute.</Note>

## Request

<ParamField header="x-api-key" type="string" required>
  Your API key for authentication.
</ParamField>

<ParamField body="account_id" type="string" required>
  The unique identifier of the account to use.
</ParamField>

<ParamField body="action" type="string" required>
  Must be `"send"`.
</ParamField>

<ParamField body="params" type="object" required>
  <Expandable title="params properties">
    <ParamField body="message_text" type="string" required>
      **(LinkedIn + Email + WhatsApp)** The text content. Required for LinkedIn; for email, provide `message_text` and/or `html`; for WhatsApp, `message_text` and/or an attachment.
    </ParamField>

    <ParamField body="subject" type="string">
      **(InMail + Email)** Subject line. On LinkedIn it applies to InMails only (ignored for standard messages, and alone it does **not** trigger an InMail); on email it's the email subject.
    </ParamField>

    <ParamField body="profile_url" type="string">
      **(LinkedIn)** URL of the recipient's profile. Used for a standard message and an InMail (with `inmail: true`). Required unless you pass `recipient_urn`.
    </ParamField>

    <ParamField body="inmail" type="boolean" default={false}>
      **(LinkedIn)** Set to `true` to send an **InMail** (to a non-connection, via the premium seat) instead of a standard message. Consumes 1 InMail credit. Not needed when `recipient_urn` is a Sales Nav URN.
    </ParamField>

    <ParamField body="recipient_urn" type="string">
      **(LinkedIn InMail)** The lead's `urn:li:fs_salesProfile:(...)` from the [lead search](/api-reference/v2/profiles/search-people-nav). Passing it sends an InMail. Use this **or** `profile_url` + `inmail: true`.
    </ParamField>

    <ParamField body="phone_number" type="string">
      **(WhatsApp)** Recipient number in international format, e.g. `+33612345678`. Required for a WhatsApp account.
    </ParamField>

    <ParamField body="to" type="string">
      **(Email)** Recipient email address. Required for an email account.
    </ParamField>

    <ParamField body="html" type="string">
      **(Email)** HTML body. Provide `html` and/or `message_text`.
    </ParamField>

    <ParamField body="reply_to" type="string">
      **(Email)** Optional `Reply-To` address.
    </ParamField>

    <ParamField body="thread_ref" type="string">
      **(Email)** Message-ID to reply into an existing thread.
    </ParamField>

    <ParamField body="cc" type="string | string[]">
      **(Email)** CC recipients (a comma-separated string or an array).
    </ParamField>

    <ParamField body="bcc" type="string | string[]">
      **(Email)** BCC recipients — hidden from the other recipients (e.g. to log a copy into a CRM).
    </ParamField>

    <ParamField body="custom_headers" type="object">
      **(Email)** Extra `X-…` headers as a `{ name: value }` map — e.g. `{ "X-Campaign-Id": "camp-42" }` — to correlate replies/bounces back to your system.
    </ParamField>

    <ParamField body="account_ids" type="string[]">
      **(Email)** Optional pool of your own mailbox ids to route the send across (home-court + daily limits). `sent_from` in the response tells you which was used.
    </ParamField>

    <ParamField body="media_link" type="string">
      **(LinkedIn + Email + WhatsApp)** A publicly accessible URL to a file to attach.
    </ParamField>

    <ParamField body="media_file" type="object">
      **(LinkedIn + Email + WhatsApp)** A base64-encoded file to attach.

      <Expandable title="media_file properties">
        <ParamField body="data" type="string" required>
          The base64-encoded file content.
        </ParamField>

        <ParamField body="filename" type="string" required>
          The filename including extension (e.g. `"document.pdf"`).
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="media_path" type="string">
      **(LinkedIn + Email)** A server-side file path to a file to attach.
    </ParamField>

    <ParamField body="media_links" type="string[]">
      **(LinkedIn + Email + WhatsApp)** Publicly accessible URLs of files to attach — all delivered in the same message.
    </ParamField>

    <ParamField body="media_files" type="object[]">
      **(LinkedIn + Email + WhatsApp)** Base64-encoded files to attach — same shape as `media_file` (`data`, `filename`).
    </ParamField>

    <ParamField body="voice_message" type="boolean" default={false}>
      **(LinkedIn + WhatsApp)** Force the attached media to be sent as a **voice note**. Only needed when the filename carries no usable extension.
    </ParamField>

    <ParamField body="quoted_message_id" type="string">
      **(WhatsApp)** Reply to a message: its `id` from [Get Conversation](/api-reference/v2/messages/get-conversation).
    </ParamField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="data" type="object">
  Details of the sent message. The shape differs between a LinkedIn standard message, an InMail, and an email.

  <Expandable title="standard message">
    <ResponseField name="status" type="string">
      `"success"` when the message was sent.
    </ResponseField>

    <ResponseField name="data" type="object">
      <Expandable title="properties">
        <ResponseField name="entityUrn" type="string">
          The unique URN of the sent message entity.
        </ResponseField>

        <ResponseField name="conversation_id" type="string">
          The URN of the conversation the message was sent in.
        </ResponseField>

        <ResponseField name="deliveredAt" type="integer">
          Unix epoch timestamp in **milliseconds**.
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>

  <Expandable title="InMail">
    <ResponseField name="status" type="string">
      `"success"` when the InMail was sent.
    </ResponseField>

    <ResponseField name="message" type="string">
      Human-readable result, e.g. `"InMail sent"`.
    </ResponseField>

    <ResponseField name="recipient_urn" type="string">
      The Sales Nav URN the InMail was sent to.
    </ResponseField>

    <ResponseField name="data" type="object">
      Raw send result: `{ "value": { "threadId": "...", "messageId": "..." } }`.
    </ResponseField>
  </Expandable>

  <Expandable title="email">
    <ResponseField name="status" type="string">`"success"` when the email was sent.</ResponseField>

    <ResponseField name="data" type="object">
      <Expandable title="properties">
        <ResponseField name="message_id" type="string">The sent email's Message-ID.</ResponseField>
        <ResponseField name="sent_from" type="string">The mailbox address the email was sent from.</ResponseField>
        <ResponseField name="esp" type="string">Sending mailbox provider bucket (`google` / `outlook` / `other`).</ResponseField>
        <ResponseField name="recipient_esp" type="string">Recipient's detected provider bucket.</ResponseField>
        <ResponseField name="home_court" type="boolean">`true` when sender and recipient are on the same provider.</ResponseField>
        <ResponseField name="over_cap" type="boolean">`true` when the mailbox is over its daily limit (the send still went out).</ResponseField>
        <ResponseField name="mailbox_health" type="object">`sends_today`, `daily_limit`, `bounce_rate` for the sending mailbox.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="metadata" type="object">
  <Expandable title="metadata properties">
    <ResponseField name="action" type="string">
      The action that was performed (`"send"`).
    </ResponseField>

    <ResponseField name="account_id" type="string">
      The account ID used for the request.
    </ResponseField>

    <ResponseField name="credits_consumed" type="integer">
      Number of credits consumed (1 for text, 2 with media).
    </ResponseField>

    <ResponseField name="timestamp" type="string">
      ISO 8601 timestamp of the response.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 (message) theme={null}
  {
    "success": true,
    "data": {
      "status": "success",
      "data": {
        "entityUrn": "urn:li:msg_message:(urn:li:fsd_profile:ACoAA...,2-MTc4NTI3...)",
        "conversation_id": "urn:li:msg_conversation:(urn:li:fsd_profile:ACoAA...,2-M2RkYWQ4...)",
        "deliveredAt": 1785272227840
      }
    },
    "metadata": {
      "action": "send",
      "account_id": "your-account-id",
      "credits_consumed": 1,
      "timestamp": "2026-03-24T12:00:00Z"
    }
  }
  ```

  ```json 200 (InMail) theme={null}
  {
    "success": true,
    "data": {
      "status": "success",
      "message": "InMail sent",
      "recipient_urn": "urn:li:fs_salesProfile:(ACwAAA...,name, )",
      "data": {
        "value": {
          "threadId": "2-OTQwMTJlODEt...",
          "messageId": "2-MTc4NTIyODc1..."
        }
      }
    },
    "metadata": {
      "action": "send",
      "account_id": "your-account-id",
      "credits_consumed": 1,
      "timestamp": "2026-03-24T12:00:00Z"
    }
  }
  ```

  ```json 200 (email) theme={null}
  {
    "success": true,
    "data": {
      "status": "success",
      "data": {
        "message_id": "<...@gmail.com>",
        "sent_from": "you@company.com",
        "esp": "google",
        "recipient_esp": "other",
        "home_court": false,
        "over_cap": false,
        "mailbox_health": { "sends_today": 1, "daily_limit": 40, "bounce_rate": 0.0 }
      }
    },
    "metadata": { "action": "send", "account_id": "your-email-account-id", "credits_consumed": 1, "timestamp": "2026-09-14T12:00:00Z" }
  }
  ```

  ```json 200 (WhatsApp) theme={null}
  {
    "success": true,
    "data": {
      "status": "success",
      "data": {
        "entityUrn": "3EB05338283099EC87F1F8",
        "conversation_id": "33612345678@s.whatsapp.net",
        "deliveredAt": 1790436783000,
        "phone_number": "33612345678"
      }
    },
    "metadata": { "action": "send", "account_id": "your-whatsapp-account-id", "credits_consumed": 1, "timestamp": "2026-09-26T15:33:03Z" }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": {
      "code": "INVALID_PARAMS",
      "message": "message_text is required"
    },
    "metadata": {
      "action": "send",
      "account_id": "your-account-id",
      "credits_consumed": 0,
      "timestamp": "2026-03-24T12:00:00Z"
    }
  }
  ```
</ResponseExample>

## InMail

Reaches someone you are not connected to, through the account's premium seat. Triggered by `inmail: true` or a `recipient_urn` — a `subject` alone never turns a message into an InMail. Prefer `recipient_urn` from the [lead search](/api-reference/v2/profiles/search-people-nav) when you have it.

```json theme={null}
{
  "account_id": "your-account-id",
  "action": "send",
  "params": {
    "recipient_urn": "urn:li:fs_salesProfile:(...)",
    "subject": "Quick question",
    "message_text": "Hi ..."
  }
}
```

A profile that cannot be InMailed is rejected before any credit is spent. Credits come from the seat — see [Balance](/api-reference/v2/messages/balance).

## Email

Sending from an [email mailbox](/api-reference/v2/accounts/login#email-mailbox) uses the same `params` above — `to` + `subject` + `message_text` (and/or `html`):

```json theme={null}
{
  "account_id": "your-email-account-id",
  "action": "send",
  "params": { "to": "prospect@example.com", "subject": "Quick question", "message_text": "Hi there, ..." }
}
```

## WhatsApp

Sending from a [WhatsApp account](/api-reference/v2/accounts/login#whatsapp) uses `phone_number` + `message_text`:

```json theme={null}
{
  "account_id": "your-whatsapp-account-id",
  "action": "send",
  "params": { "phone_number": "+33612345678", "message_text": "Hi there, ..." }
}
```

A number without WhatsApp returns `CHANNEL_ERROR` (422). Check numbers first with [Check Numbers](/api-reference/v2/messages/check-numbers).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.