Skip to main content

Engagements

Retrieve conversations

The Linked API allows you to retrieve conversations from LinkedIn programmatically. Below is an example of how to retrieve conversations using a GET request.

Endpoint

GET /v1/conversations

Parameters

  • personUrl (optional, string): The URL of the LinkedIn profile to retrieve conversations with.
  • since (optional, string): A timestamp to fetch conversations from a specific time onward.

Example

curl -X GET https://api.linkedapi.io/v1/conversations \
-H "Content-Type: application/json" \
-H "x-api-token: your-api-token-here" \
-H "account-token: your-account-token-here"

Response

{
  "conversations": [
    {
      "personUrl": "https://www.linkedin.com/in/johndoe/",
      "messages": [
        {
          "messageId": "123456789",
          "sender": "https://www.linkedin.com/in/johndoe/",
          "text": "Hello, how are you?",
          "timestamp": "2024-09-21T12:34:00Z"
        },
        {
          "messageId": "987654321",
          "sender": "https://www.linkedin.com/in/yourprofile/",
          "text": "I'm good, thank you!",
          "timestamp": "2024-09-21T12:35:00Z"
        }
      ]
    }
  ]
}

Errors

  • 400 Bad Request: Invalid or missing parameters.
  • 401 Unauthorized: Missing or invalid authorization token.
  • 404 Not Found: Conversation not found.