Skip to main content

Messaging

Sending messages

This page describes two ways of sending messages through LinkedIn: using the standard messaging channel and Sales Navigator. Both options are handled by the same endpoint:

POST https://api.linkedapi.io/account/conversations.sendMessage

The request body is divided into 2 separate arrays, each with its own structure and response options:

  • standard – messages you want to send via the standard channel.
  • salesNavigator – messages you want to send via Sales Navigator.

Important notes:

  1. You can use both standard and salesNavigator sending options in a single API call by including these arrays in the body.
  2. The same person cannot be listed more than once in the standard or salesNavigator arrays within a single API call.
  3. To send multiple messages to the same person through one sending option, make separate API calls.

Sending via standard channel

Body


{
  "standard": [
    {
      "person": "https://www.linkedin.com/in/person1",
      "text": "Hi! I'd love to connect and discuss some ideas."
    },
    {
      "person": "https://www.linkedin.com/in/person2",
      "text": "Good morning! Let’s schedule a time to chat."
    },
    {
      "person": "https://www.linkedin.com/in/person3",
      "text": "Hello! How are you doing?"
    }
  ],
  ...
}
  • standard – array of standard messages, must contain up to 10 items.
    • person – LinkedIn URL of the person you want to send a message to.
    • text – message text, must be up to 1900 characters.

Response

  1. If all standard messages are sent successfully:

{
  "status": "complete",
  "completion": {
    "standard": [
      {
        "person": "https://www.linkedin.com/in/person1",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person2",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person3",
        "result": {
          "success": true
        }
      }
    ],
    ...
  }
}
  1. If some standard messages are not sent:

{
  "status": "complete",
  "completion": {
    "standard": [
      {
        "person": "https://www.linkedin.com/in/person1",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person2",
        "result": {
          "success": false,
          "error": {
            "errorType": "personNotFound"
            "message": "The provided URL is not an existing LinkedIn person."
          }
        }
      },
      {
        "person": "https://www.linkedin.com/in/person3",
        "result": {
          "success": false,
          "error": {
            "errorType": "messagingNotAllowed"
            "message": "Sending a message to the person is not allowed."
          }
        }
      }
    ],
    ...
  }
}
  • errorType – enum with the following possible values:
    • personNotFound – provided URL is not an existing LinkedIn person.
    • messagingNotAllowed – sending a message to the person is not allowed. This could happen for several reasons:
      • You are not connected to the person.
      • LinkedIn has restricted your ability to send messages to the person, for example, due to reaching message limits or the person’s privacy settings.

Sending via Sales Navigator

Body


{
  "salesNavigator": [
    {
      "person": "https://www.linkedin.com/in/person1",
      "text": "I'd love to discuss a potential collaboration.",
      "subject": "Let's Connect!"
    },
    {
      "person": "https://www.linkedin.com/in/person2",
      "text": "Following up on our last conversation.",
      "subject": "Quick Follow-Up"
    },
    {
      "person": "https://www.linkedin.com/in/person3",
      "text": "Hello! How are you doing?",
      "subject": "Saying Hello"
    }
  ],
  ...
}  
  • salesNavigator – array of Sales Navigator messages, must contain up to 10 items.
    • person – LinkedIn URL of the person you want to send a message to.
    • text – message text, must be up to 1900 characters.
    • subject – mandatory subject line, must be up to 80 characters.

Response

  1. If all Sales Navigator messages are sent successfully:

{
  "status": "complete",
  "completion": {
    "salesNavigator": [
      {
        "person": "https://www.linkedin.com/in/person1",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person2",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person3",
        "result": {
          "success": true
        }
      }
    ],
    ...
  }
}
  1. If some Sales Navigator messages are not sent:

{
  "status": "complete",
  "completion": {
    "salesNavigator": [
      {
        "person": "https://www.linkedin.com/in/person1",
        "result": {
          "success": true
        }
      },
      {
        "person": "https://www.linkedin.com/in/person2",
        "result": {
          "success": false,
          "error": {
            "errorType": "personNotFound"
            "message": "The provided URL is not an existing LinkedIn person."
          }
        }
      },
      {
        "person": "https://www.linkedin.com/in/person3",
        "result": {
          "success": false,
          "error": {
            "errorType": "noSalesNavigator"
            "message": "Your account doesn't have access to Sales Navigator."
          }
        }
      }
    ],
    ...
  }
}
  • errorType – enum with the following possible values:
    • personNotFound – provided URL is not an existing LinkedIn person.
    • noSalesNavigator – your account doesn't have access to Sales Navigator.
    • messagingNotAllowed – sending a message to the person is not allowed. This could happen for several reasons:
      • Your monthly Sales Navigator message limit has been reached.
      • LinkedIn has restricted your ability to send messages to the person, for example, due the person’s privacy settings.

Throughout the documentation, for simplicity, only the request body and final response (when status is complete) are shown. Consider possible global errors and result handling options for proper implementation.