Skip to main content
POST
/
api
/
network
/
messages
Import network messages
curl --request POST \
  --url https://app.puffle.ai/api/network/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "messages": [
    {
      "conversationId": "<string>",
      "fromName": "<string>",
      "fromLinkedinUrl": "<string>",
      "toName": "<string>",
      "toLinkedinUrl": "<string>",
      "date": "<string>",
      "content": "<string>",
      "folder": "<string>",
      "isMessageDraft": true,
      "isConversationDraft": true,
      "conversationTitle": "<string>",
      "subject": "<string>",
      "attachments": "<string>"
    }
  ],
  "userLinkedinUrl": "<string>",
  "clearExisting": true
}
'
{ "message": "Messages imported successfully", "imported": 1200, "skipped": 0, "linked": 842, "total": 1200 }

Overview

Bulk-insert LinkedIn messages parsed from the caller’s data export. Links each message to a network_connections row by normalized LinkedIn URL (lowercase, trailing slash stripped, query params stripped). Messages whose counterpart URL doesn’t match any imported connection land with connection_id: null — they still count toward imported, just not linked. Optionally clears the caller’s existing messages first via clearExisting: true.
This operation shares the URL path /api/network/messages with other verbs. See the sibling page for related operations on the same resource.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Bulk import payload parsed from LinkedIn Messages.csv.

messages
object[]
required

Rows to import. Batched in groups of 500 server-side.

userLinkedinUrl
string
required

Caller's LinkedIn profile URL. Used to decide is_from_me and which participant is 'the other person' for connection linkage.

clearExisting
boolean

If true, delete every existing message row for this user before inserting. Destructive.

Response

Import attempted. Per-batch failures roll into skipped rather than failing the whole request.

message
enum<string>
required
Available options:
Messages imported successfully
imported
integer
required
Required range: 0 <= x <= 9007199254740991
skipped
integer
required
Required range: 0 <= x <= 9007199254740991
linked
integer
required

Count of imported messages that successfully matched an existing network_connections.linkedin_url.

Required range: 0 <= x <= 9007199254740991
total
integer
required
Required range: 0 <= x <= 9007199254740991