# rc.sendMessage

Send an InMail to a candidate from a LinkedIn Recruiter Lite seat, or reply in an existing Recruiter conversation. Paid InMail credits are spent only when you allow it.

> The API Reference is also the SDK and CLI reference. Consecutive code fences marked `tab=HTTP`, `tab=Node`, `tab=Python` and `tab=CLI` are the same call on each surface (a fence marked `tab=HTTP,CLI` is the same text for both), and a block between `:::surface <names>` and `:::` applies only to the surfaces it names. Identifiers in the text are written as in Node and in HTTP JSON (camelCase); the Python SDK spells methods, parameters and result attributes in snake_case (`sendMessage` → `send_message`, `reconnectionLink` → `reconnection_link`), while names inside HTTP JSON stay camelCase.

Send a message from LinkedIn Recruiter Lite. There are two forms:

- **A new InMail** to a candidate, by their Recruiter profile URL, with a subject and a text. Use it on its own, or under [rc.doForPeople](/docs/action-rc-do-for-people) for each candidate of a search.
- **A reply in an existing conversation**, by its `threadId`, with a text only.

A message that costs a paid InMail credit is sent only when you set `allowPaidCredit` to `true`.

The account needs a Recruiter Lite seat, Linked API's Plus plan and a [supported LinkedIn interface language](/docs/recruiter-lite-overview#seat-requirements) – see [Recruiter Lite](/docs/recruiter-lite-overview). To read the replies, enable the Recruiter inbox with [rc.syncInbox](/docs/action-rc-sync-inbox) **before** you send: sending does not enable it, and the inbox does not import messages from before the minute it was enabled.

:::surface node,python
In the SDK this is the `rcSendMessage` method. It takes the parameters below except `label`, which exists only in workflow JSON, and returns the result below in `data`.
:::

:::surface cli
The command is `linkedin recruiter message send`. Its arguments and flags are listed below.
:::

## Constraints

> ⏺️ **Root Start:** allowed, when `personUrl` or `threadId` parameter is provided.

> ⬆️ **Parent Actions:** [rc.doForPeople](/docs/action-rc-do-for-people).

> ⬇️ **Child Actions:** N/A.

## Parameters

**A new InMail:**

```json tab=HTTP
{
  "actionType": "rc.sendMessage",
  "label": "inmail1",
  "personUrl": "https://www.linkedin.com/talent/profile/AEMAAB0xExampleProfileId1",
  "subject": "Data Engineer role in Amsterdam",
  "text": "Hi Jane, I'm hiring a Data Engineer for our Amsterdam team and your pipeline work stood out. Would you be open to a short call next week?"
}
```

```typescript tab=Node
const workflow = await linkedapi.rcSendMessage.execute({
  personUrl: "https://www.linkedin.com/talent/profile/AEMAAB0xExampleProfileId1",
  subject: "Data Engineer role in Amsterdam",
  text: "Hi Jane, I'm hiring a Data Engineer for our Amsterdam team and your pipeline work stood out. Would you be open to a short call next week?"
});

const { data, errors } = await linkedapi.rcSendMessage.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import RcSendMessageParams

workflow = linkedapi.rc_send_message.execute(
    RcSendMessageParams(
        person_url="https://www.linkedin.com/talent/profile/AEMAAB0xExampleProfileId1",
        subject="Data Engineer role in Amsterdam",
        text="Hi Jane, I'm hiring a Data Engineer for our Amsterdam team and your pipeline work stood out. Would you be open to a short call next week?",
    )
)

result = linkedapi.rc_send_message.result(workflow.workflow_id)
```

```bash tab=CLI
linkedin recruiter message send \
  https://www.linkedin.com/talent/profile/AEMAAB0xExampleProfileId1 \
  "Hi Jane, I'm hiring a Data Engineer for our Amsterdam team and your pipeline work stood out. Would you be open to a short call next week?" \
  --subject "Data Engineer role in Amsterdam" \
  --json
```

**A reply in an existing conversation:**

```json tab=HTTP
{
  "actionType": "rc.sendMessage",
  "label": "reply1",
  "threadId": "2-RXhhbXBsZVJlY3J1aXRlclRocmVhZA==",
  "text": "Thanks, Jane! Does Thursday at 15:00 work for you?"
}
```

```typescript tab=Node
const workflow = await linkedapi.rcSendMessage.execute({
  threadId: "2-RXhhbXBsZVJlY3J1aXRlclRocmVhZA==",
  text: "Thanks, Jane! Does Thursday at 15:00 work for you?"
});

const { data, errors } = await linkedapi.rcSendMessage.result(workflow.workflowId);
```

```python tab=Python
from linkedapi import RcSendMessageParams

workflow = linkedapi.rc_send_message.execute(
    RcSendMessageParams(
        thread_id="2-RXhhbXBsZVJlY3J1aXRlclRocmVhZA==",
        text="Thanks, Jane! Does Thursday at 15:00 work for you?",
    )
)

result = linkedapi.rc_send_message.result(workflow.workflow_id)
```

```bash tab=CLI
linkedin recruiter message send \
  --thread-id "2-RXhhbXBsZVJlY3J1aXRlclRocmVhZA==" \
  "Thanks, Jane! Does Thursday at 15:00 work for you?" \
  --json
```

In AI assistants, the MCP tool is `rc_send_message`. The n8n action is **Send message in Recruiter Lite**; the Make module is **Send Message in Recruiter Lite**.

| Parameter | Description |
| --- | --- |
| `label` | Optional. Label included in workflow completion. |
| `personUrl` | At the root, the candidate to send a new InMail to. A Recruiter profile URL, `https://www.linkedin.com/talent/profile/…`, such as `recruiterProfileUrl` from [rc.searchPeople](/docs/action-rc-search-people) or [rc.retrieveProjectCandidates](/docs/action-rc-retrieve-project-candidates), or the `personRecruiterUrl` of a Recruiter Lite [inbox message](/docs/monitoring-inbox#recruiter-lite-inbox). A public profile URL (`linkedin.com/in/…`) is rejected with `invalidWorkflow`. Not allowed under [rc.doForPeople](/docs/action-rc-do-for-people), which supplies it. |
| `threadId` | At the root, the conversation to reply in, instead of `personUrl`: the `threadId` of a Recruiter Lite message from [inbox polling](/docs/monitoring-inbox#recruiter-lite-inbox) or an `inbox.*` [webhook event](/docs/webhook-event-types#inbox-events). Up to 58 characters. Not allowed under [rc.doForPeople](/docs/action-rc-do-for-people). |
| `subject` | Required for a new InMail, including under [rc.doForPeople](/docs/action-rc-do-for-people). A single line of 1 to 200 characters. Not accepted with `threadId`: a reply has no subject. |
| `text` | Required. Message text, from 1 to 1,900 characters. |
| `allowPaidCredit` | Optional. `true` allows the action to spend a paid InMail credit when Recruiter asks for one. Defaults to `false`. Set it only when the user has explicitly approved spending a paid InMail credit on this message; on `inMailCreditRequired`, ask the user instead of retrying with it set. |

At the root, give exactly one of `personUrl` and `threadId`. Both, neither, or a `subject` with `threadId` are rejected with `invalidWorkflow`.

:::surface cli
| Arg | Required | Description |
| --- | --- | --- |
| `person-url` | for a new InMail | Recruiter profile URL of the candidate, `https://www.linkedin.com/talent/profile/…`. Omit it with `--thread-id`. |
| `text` | yes | Message text, 1 to 1,900 characters. With `--thread-id`, it is the only argument. |

| Flag | Description |
| --- | --- |
| `--subject` | Required for a new InMail. A single line of 1 to 200 characters. Not accepted with `--thread-id`. |
| `--thread-id` | Reply in this conversation instead of sending a new InMail to `person-url`. |
| `--allow-paid-credit` | Allows a paid InMail credit. Off unless you pass it: a paid credit is spent only when it is set. Pass it only when the user has explicitly approved spending a paid InMail credit on this message; on `inMailCreditRequired`, ask the user instead of retrying with it. |

The CLI rejects `person-url` or `--subject` together with `--thread-id` before it sends anything.
:::

Each successful message counts one `rcMessages` [limit](/docs/recruiter-lite-overview#limits); a refused message does not. Every execution also counts one `rcPersonProfileViews`, whatever the outcome – a new InMail or a reply, sent, refused or failed. Only a new InMail (`personUrl`), which opens the candidate's Recruiter profile, checks that limit before it runs: when it is used up, the action fails with `limitExceeded` and loads nothing. A reply by `threadId` is not blocked by it.

## InMail credits

Recruiter decides whether a message costs a paid InMail credit, and the action reads its decision before it types anything:

- **A new InMail is free only when Recruiter marks it free.** Recruiter shows "Free to InMail" in the message window, for example for a 1st-degree connection. Any other InMail costs a credit.
- **A reply in a conversation is free** unless Recruiter shows an InMail credit count in that conversation's message window. Then it costs a credit too.
- **A paid message is refused unless `allowPaidCredit` is `true`**, with `inMailCreditRequired`. The action closes the empty message window; nothing is typed or sent, and no credit is spent.
- **With `allowPaidCredit` set to `true`**, the message is sent and the credit is spent. The result says so: `creditUsed` is `true`.

If Recruiter's credit information cannot be read, the action fails with `unexpectedError` and sends nothing.

## Who can be messaged

- **One InMail starts the conversation.** Once a candidate has a conversation with the seat, Recruiter does not allow a new InMail to them: its Send button is disabled before anything is typed. The action then fails with `inMailNotAvailable`, even with `allowPaidCredit` set to `true`. Reply in the existing conversation with `threadId` instead. The same refusal can mean the seat has no InMail credits left.
- **A reply works once the candidate has answered.** You can reply in a conversation only after the candidate accepted or replied to your InMail. Before that, the reply fails with `messagingNotAllowed`.
- **The conversation must be in Recruiter's Inbox or Awaiting reply.** A `threadId` that is in neither folder fails with `messagingNotAllowed`. This includes a conversation archived in Recruiter.

In all these cases nothing is typed or sent.

## Sending behaviour

- **One click.** The action clicks Send once and never repeats the click.
  - A new InMail counts as sent once Recruiter closes the message window and shows its "message sent" notice for this candidate.
  - A reply counts as sent once your new message appears in the conversation with your text.
- **Check before you send again.** An error that comes back after the Send click does not prove the message was not sent: the click may have landed just before a browser stall, or before LinkedIn moved the tab to a warning page. So from the click on, every failure comes back as `unexpectedError` with a message that asks you to check, listed [below](#result-options). So does a send that was lost because the browser worker stopped or timed out. If LinkedIn moved the tab to a warning page right after the click, that message ends with `Recruiter then showed <type>.`, for example `recruiterMultipleSessionsDetected`. Before you retry an `rc.sendMessage` that failed with `unexpectedError`, check the conversation. Look at the candidate's Messages in the account's cloud browser (**Open Cloud Browser** on the [platform](https://app.linkedapi.io/) Accounts page), never in another browser, which starts a second Recruiter session, or [poll the inbox](/docs/monitoring-inbox#recruiter-lite-inbox) after its next sync if [rc.syncInbox](/docs/action-rc-sync-inbox) is enabled. Otherwise the candidate may get the message twice.
- **The seat's signature.** Recruiter adds the seat's own message signature, a Recruiter setting, to new InMails. The recipient sees it. It does not count toward the 1,900 characters, and the action neither adds nor removes it.
- **The candidate's public profile.** When a new InMail opens a Recruiter profile that links to the candidate's public LinkedIn profile, Linked API remembers that link. [Inbox polling](/docs/monitoring-inbox#recruiter-lite-inbox) by the candidate's public URL can then find their Recruiter conversation.

## Result options

1. **Successful sending:**

```json
{
  "actionType": "rc.sendMessage",
  "label": "inmail1",
  "success": true,
  "data": {
    "creditUsed": false
  }
}
```

| Field | Meaning |
| --- | --- |
| `creditUsed` | `true` if the message spent a paid InMail credit, which happens only with `allowPaidCredit` set to `true`; `false` if it was free. |

`label` is included only if specified in the action parameters.

2. **Failed sending:**

```json
{
  "actionType": "rc.sendMessage",
  "label": "inmail1",
  "success": false,
  "error": {
    "type": "inMailNotAvailable",
    "message": "Recruiter does not allow a new InMail to this person right now. If you already have a conversation with them, reply in it with threadId; otherwise the seat may have no InMail credits left."
  }
}
```

Possible `error.type` values:

- `inMailCreditRequired` – the message costs a paid InMail credit, and `allowPaidCredit` is not `true`. Nothing was sent and no credit was spent. Under [rc.doForPeople](/docs/action-rc-do-for-people), the search goes on with the next candidate.
- `inMailNotAvailable` – Recruiter does not allow a new InMail to this candidate now. If you already have a conversation with them, reply in it with `threadId`; otherwise the seat may have no InMail credits left. Nothing was sent. Under [rc.doForPeople](/docs/action-rc-do-for-people), the search goes on with the next candidate.
- `limitExceeded` – the account reached its `rcMessages` [limit](/docs/recruiter-lite-overview#limits), or, for a new InMail, its `rcPersonProfileViews` limit. Nothing was sent.
- `messagingNotAllowed` – with `threadId` only. The conversation is not in Recruiter's Inbox or Awaiting reply, or the candidate has not accepted or replied to your InMail yet. Nothing was sent.
- `personNotFound` – Recruiter could not open a profile at this URL. Nothing was sent.
- `recruiterSignInRequired`, `recruiterTwoStepVerificationRequired`, `recruiterMultipleSessionsDetected` – the seat needs attention, see [account errors](/docs/recruiter-lite-overview#account-errors). These come before the Send click, so nothing was sent. A warning page that appears right after the click comes back as `unexpectedError` instead.
- `unexpectedError` – the message could not be prepared as given, something failed from the Send click on, or the send itself was lost, for example when the browser worker stopped or timed out. In the last two cases the message may have been sent: the error's `message` says so, and ends with `Recruiter then showed <type>.` when a warning page followed the click. See [Check before you send again](#sending-behaviour).

The `message` of the errors specific to this action:

- `inMailCreditRequired`: `This message requires a paid InMail credit, so nothing was sent. Retry with allowPaidCredit set to true only if the user approves spending a credit on it.`
- `inMailNotAvailable`: `Recruiter does not allow a new InMail to this person right now. If you already have a conversation with them, reply in it with threadId; otherwise the seat may have no InMail credits left.`
- `messagingNotAllowed`, conversation not found: `This Recruiter conversation could not be opened`
- `messagingNotAllowed`, no answer yet: `You can reply in this Recruiter conversation once the candidate accepts or replies to your message.`
- `personNotFound`: `Recruiter profile was not found`
- `unexpectedError` from the Send click on, for a new InMail: `Recruiter message send was not confirmed. Check Messages before resending.`
- `unexpectedError` from the Send click on, for a reply: `Recruiter message was not confirmed, check the thread before resending.`
- `unexpectedError` when the send itself was lost, possibly after the Send click: `Recruiter message may have been sent. Check Messages before resending.`

When LinkedIn moved the tab to a warning page right after the click, either message ends with the page's error type, for example `Recruiter message send was not confirmed. Check Messages before resending. Recruiter then showed recruiterMultipleSessionsDetected.`

## Usage example

**Workflow** – send an InMail to the first 5 candidates of a search, free messages only:

```json tab=HTTP
{
  "actionType": "rc.searchPeople",
  "limit": 5,
  "filter": {
    "jobTitles": ["Data Engineer"],
    "locations": ["Amsterdam, North Holland, Netherlands"],
    "networkRelationships": ["1st"]
  },
  "then": {
    "actionType": "rc.doForPeople",
    "then": {
      "actionType": "rc.sendMessage",
      "subject": "Data Engineer role in Amsterdam",
      "text": "Hi, I'm hiring a Data Engineer for our Amsterdam team. Would you be open to a short call next week?"
    }
  }
}
```

```typescript tab=Node
const workflow = await linkedapi.customWorkflow.execute({
  actionType: "rc.searchPeople",
  limit: 5,
  filter: {
    jobTitles: ["Data Engineer"],
    locations: ["Amsterdam, North Holland, Netherlands"],
    networkRelationships: ["1st"]
  },
  then: {
    actionType: "rc.doForPeople",
    then: {
      actionType: "rc.sendMessage",
      subject: "Data Engineer role in Amsterdam",
      text: "Hi, I'm hiring a Data Engineer for our Amsterdam team. Would you be open to a short call next week?"
    }
  }
});

const { data, errors } = await linkedapi.customWorkflow.result(workflow.workflowId);
```

```python tab=Python
workflow = linkedapi.custom_workflow.execute(
    {
        "actionType": "rc.searchPeople",
        "limit": 5,
        "filter": {
            "jobTitles": ["Data Engineer"],
            "locations": ["Amsterdam, North Holland, Netherlands"],
            "networkRelationships": ["1st"],
        },
        "then": {
            "actionType": "rc.doForPeople",
            "then": {
                "actionType": "rc.sendMessage",
                "subject": "Data Engineer role in Amsterdam",
                "text": "Hi, I'm hiring a Data Engineer for our Amsterdam team. Would you be open to a short call next week?",
            },
        },
    }
)

result = linkedapi.custom_workflow.result(workflow.workflow_id)
```

```bash tab=CLI
linkedin workflow run <<'EOF'
{
  "actionType": "rc.searchPeople",
  "limit": 5,
  "filter": {
    "jobTitles": ["Data Engineer"],
    "locations": ["Amsterdam, North Holland, Netherlands"],
    "networkRelationships": ["1st"]
  },
  "then": {
    "actionType": "rc.doForPeople",
    "then": {
      "actionType": "rc.sendMessage",
      "subject": "Data Engineer role in Amsterdam",
      "text": "Hi, I'm hiring a Data Engineer for our Amsterdam team. Would you be open to a short call next week?"
    }
  }
}
EOF
```

:::surface node,python
[rc.doForPeople](/docs/action-rc-do-for-people) has no SDK method, so this workflow goes to [`customWorkflow`](/sdks/custom-workflow).
:::

Each candidate in the completion carries the result of their `rc.sendMessage` in `then`. A candidate refused with `inMailCreditRequired` or `inMailNotAvailable` gets no message, and the search goes on with the next one. Any other failure stops the search, see [rc.doForPeople](/docs/action-rc-do-for-people#how-it-runs).
