LinkedIn message API

Give your platform native LinkedIn messaging capabilities. Ideal for AI agents and tools managing multi-step outreach.

< 4
s

Avg Response

+ 50

Endpoints

99.9
%

Uptime

1import requests
2
3response = requests.post(
4    "https://api.linkupapi.com/v2/messages",
5    headers={"x-api-key": "YOUR_API_KEY"},
6    json={
7        "account_id": "YOUR_ACCOUNT_ID",
8        "action": "send",
9        "params": {
10            "profile_url": "https://www.linkedin.com/in/johndoe",
11            "message_text": "Hi John, loved your last post on AI agents. Happy to connect!"
12        }
13    }
14)
15
16print(response.json())
1const response = await fetch("https://api.linkupapi.com/v2/messages", {
2  method: "POST",
3  headers: {
4    "x-api-key": "YOUR_API_KEY",
5    "Content-Type": "application/json"
6  },
7  body: JSON.stringify({
8    account_id: "YOUR_ACCOUNT_ID",
9    action: "send",
10    params: {
11      profile_url: "https://www.linkedin.com/in/johndoe",
12      message_text: "Hi John, loved your last post on AI agents. Happy to connect!"
13    }
14  })
15});
16
17const data = await response.json();
18console.log(data);
1<?php
2$payload = [
3    "account_id" => "YOUR_ACCOUNT_ID",
4    "action" => "send",
5    "params" => [
6        "profile_url" => "https://www.linkedin.com/in/johndoe",
7        "message_text" => "Hi John, loved your last post on AI agents. Happy to connect!"
8    ]
9];
10
11$ch = curl_init("https://api.linkupapi.com/v2/messages");
12curl_setopt($ch, CURLOPT_POST, true);
13curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
14curl_setopt($ch, CURLOPT_HTTPHEADER, [
15    "x-api-key: YOUR_API_KEY",
16    "Content-Type: application/json"
17]);
18curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
19
20$response = curl_exec($ch);
21curl_close($ch);
22echo $response;
1package main
2
3import (
4    "bytes"
5    "fmt"
6    "io"
7    "net/http"
8)
9
10func main() {
11    payload := []byte(`{
12  "account_id": "YOUR_ACCOUNT_ID",
13  "action": "send",
14  "params": {
15    "profile_url": "https://www.linkedin.com/in/johndoe",
16    "message_text": "Hi John, loved your last post on AI agents. Happy to connect!"
17  }
18}`)
19
20    req, _ := http.NewRequest("POST", "https://api.linkupapi.com/v2/messages", bytes.NewBuffer(payload))
21    req.Header.Set("x-api-key", "YOUR_API_KEY")
22    req.Header.Set("Content-Type", "application/json")
23
24    res, err := http.DefaultClient.Do(req)
25    if err != nil {
26        panic(err)
27    }
28    defer res.Body.Close()
29    body, _ := io.ReadAll(res.Body)
30    fmt.Println(string(body))
31}
1import java.net.URI;
2import java.net.http.HttpClient;
3import java.net.http.HttpRequest;
4import java.net.http.HttpResponse;
5
6public class Main {
7    public static void main(String[] args) throws Exception {
8        String payload = "{\"account_id\": \"YOUR_ACCOUNT_ID\", \"action\": \"send\", \"params\": {\"profile_url\": \"https://www.linkedin.com/in/johndoe\", \"message_text\": \"Hi John, loved your last post on AI agents. Happy to connect!\"}}";
9
10        HttpRequest request = HttpRequest.newBuilder()
11            .uri(URI.create("https://api.linkupapi.com/v2/messages"))
12            .header("x-api-key", "YOUR_API_KEY")
13            .header("Content-Type", "application/json")
14            .POST(HttpRequest.BodyPublishers.ofString(payload))
15            .build();
16
17        HttpResponse<String> response = HttpClient.newHttpClient()
18            .send(request, HttpResponse.BodyHandlers.ofString());
19        System.out.println(response.body());
20    }
21}

Send LinkedIn Messages

Send personalized messages to any LinkedIn connection through your platform.

This endpoint handles both new and existing conversations automatically, with support for text and media attachments. Perfect for AI agents and sales platforms managing multi-step outreach sequences, follow-ups, and relationship nurturing at scale.

Automatically detects new or existing conversation threads, eliminating complex conversation management. Send text messages with optional media links to share documents, presentations, or relevant resources.

Ideal for automated prospection campaigns, follow-up sequences, lead nurturing, customer support, and recruitment outreach. Build sophisticated engagement workflows or integrate LinkedIn messaging into your sales automation tools with a single API call.

‍

‍

1{
2  "status": "success",
3  "message": "Message sent successfully"
4}
Example result returned by the LinkupAPI LinkedIn message API

Sarah Moreau

Head of Sales - Europe | SaaS B2B

  • Message sent successfully
  • Message sent successfully

Privacy and security with no compromise.

Your users trust you with their accounts. Here is how we keep them safe.

Passwords never stored

We never keep your users' passwords. Sessions are encrypted, isolated per account and revocable at any time.

EU-hosted, GDPR & CCPA

Data is processed and hosted in the European Union. GDPR and CCPA compliant, with a data processing agreement on request.

Google-verified security

LinkupAPI passed Google's CASA security assessment and is a verified Gmail app. Same review, same standards for every channel.

Plug it into your AI assistant.

Every endpoint is a native tool for Claude, ChatGPT, Gemini, Mistral, Cursor and any other MCP client. Connect the LinkupAPI MCP server once and your assistant runs the calls on your accounts.

Our frequently asked questions.

LinkupAPI V2 - See what’s new

LinkedIn, email and WhatsApp through one API. Unlimited accounts, one fixed price.

50
+

Endpoints

99.9
%

Uptime

< 3
s

Avg Response