curl "https://api.sendpilot.ai/v1/inbox/conversations/2-OVp-y-UNyFXBYvx0FqmQ/messages?accountId=sender_abc123&limit=50" \
-H "X-API-Key: YOUR_API_KEY"
const conversationId = '2-OVp-y-UNyFXBYvx0FqmQ';
const response = await fetch(
`https://api.sendpilot.ai/v1/inbox/conversations/${conversationId}/messages?accountId=sender_abc123&limit=50`,
{
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY
}
}
);
const data = await response.json();
import requests
conversation_id = '2-OVp-y-UNyFXBYvx0FqmQ'
response = requests.get(
f'https://api.sendpilot.ai/v1/inbox/conversations/{conversation_id}/messages',
params={
'accountId': 'sender_abc123',
'limit': 50
},
headers={'X-API-Key': 'YOUR_API_KEY'}
)
data = response.json()
{
"conversationId": "2-OVp-y-UNyFXBYvx0FqmQ",
"messages": [
{
"id": "msg_abc123",
"content": "Hi John! Thanks for connecting. I wanted to follow up on our conversation about your company's growth plans.",
"sender": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"recipient": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"direction": "sent",
"sentAt": "2024-02-24T14:00:00.000Z",
"readStatus": "read",
"contentType": "TEXT"
},
{
"id": "msg_def456",
"content": "Thanks for reaching out! I'd love to discuss this further. Are you available for a call next week?",
"sender": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"recipient": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"direction": "received",
"sentAt": "2024-02-24T15:30:00.000Z",
"readStatus": "unread",
"contentType": "TEXT"
}
],
"pagination": {
"hasMore": true,
"continuationToken": "eyJjb250aW51YXRpb24iOiIxNzA4Nzg0MjAwMDAwIn0="
}
}
{
"statusCode": 404,
"error": "Not Found",
"code": "SENDER_NOT_FOUND",
"message": "LinkedIn sender with ID 'sender_abc123' not found in this workspace"
}
Inbox
Get Conversation Messages
Retrieve messages from a specific conversation
GET
/
v1
/
inbox
/
conversations
/
{conversationId}
/
messages
curl "https://api.sendpilot.ai/v1/inbox/conversations/2-OVp-y-UNyFXBYvx0FqmQ/messages?accountId=sender_abc123&limit=50" \
-H "X-API-Key: YOUR_API_KEY"
const conversationId = '2-OVp-y-UNyFXBYvx0FqmQ';
const response = await fetch(
`https://api.sendpilot.ai/v1/inbox/conversations/${conversationId}/messages?accountId=sender_abc123&limit=50`,
{
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY
}
}
);
const data = await response.json();
import requests
conversation_id = '2-OVp-y-UNyFXBYvx0FqmQ'
response = requests.get(
f'https://api.sendpilot.ai/v1/inbox/conversations/{conversation_id}/messages',
params={
'accountId': 'sender_abc123',
'limit': 50
},
headers={'X-API-Key': 'YOUR_API_KEY'}
)
data = response.json()
{
"conversationId": "2-OVp-y-UNyFXBYvx0FqmQ",
"messages": [
{
"id": "msg_abc123",
"content": "Hi John! Thanks for connecting. I wanted to follow up on our conversation about your company's growth plans.",
"sender": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"recipient": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"direction": "sent",
"sentAt": "2024-02-24T14:00:00.000Z",
"readStatus": "read",
"contentType": "TEXT"
},
{
"id": "msg_def456",
"content": "Thanks for reaching out! I'd love to discuss this further. Are you available for a call next week?",
"sender": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"recipient": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"direction": "received",
"sentAt": "2024-02-24T15:30:00.000Z",
"readStatus": "unread",
"contentType": "TEXT"
}
],
"pagination": {
"hasMore": true,
"continuationToken": "eyJjb250aW51YXRpb24iOiIxNzA4Nzg0MjAwMDAwIn0="
}
}
{
"statusCode": 404,
"error": "Not Found",
"code": "SENDER_NOT_FOUND",
"message": "LinkedIn sender with ID 'sender_abc123' not found in this workspace"
}
Returns messages for a specific conversation with pagination support using continuation tokens.
Request
string
required
Your API key
string
required
The conversation/chat ID to fetch messages from
string
required
The LinkedIn sender account ID that owns this conversation
integer
default:"50"
Number of messages to return (max: 100)
string
Token for fetching the next page of messages. Returned in the previous response.
Response
string
The conversation ID
array
Array of message objects
Show Message Object
Show Message Object
string
Unique message identifier
string
Message content
object
object
string
Message direction:
sent or receivedstring
ISO 8601 timestamp when the message was sent
string
Read status:
read, unread, or unknownstring
Content type:
TEXT, IMAGE, FILE, etc.object
curl "https://api.sendpilot.ai/v1/inbox/conversations/2-OVp-y-UNyFXBYvx0FqmQ/messages?accountId=sender_abc123&limit=50" \
-H "X-API-Key: YOUR_API_KEY"
const conversationId = '2-OVp-y-UNyFXBYvx0FqmQ';
const response = await fetch(
`https://api.sendpilot.ai/v1/inbox/conversations/${conversationId}/messages?accountId=sender_abc123&limit=50`,
{
headers: {
'X-API-Key': process.env.SENDPILOT_API_KEY
}
}
);
const data = await response.json();
import requests
conversation_id = '2-OVp-y-UNyFXBYvx0FqmQ'
response = requests.get(
f'https://api.sendpilot.ai/v1/inbox/conversations/{conversation_id}/messages',
params={
'accountId': 'sender_abc123',
'limit': 50
},
headers={'X-API-Key': 'YOUR_API_KEY'}
)
data = response.json()
{
"conversationId": "2-OVp-y-UNyFXBYvx0FqmQ",
"messages": [
{
"id": "msg_abc123",
"content": "Hi John! Thanks for connecting. I wanted to follow up on our conversation about your company's growth plans.",
"sender": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"recipient": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"direction": "sent",
"sentAt": "2024-02-24T14:00:00.000Z",
"readStatus": "read",
"contentType": "TEXT"
},
{
"id": "msg_def456",
"content": "Thanks for reaching out! I'd love to discuss this further. Are you available for a call next week?",
"sender": {
"id": "john-doe-67890",
"name": "John Doe",
"profileUrl": "https://www.linkedin.com/in/john-doe"
},
"recipient": {
"id": "jane-smith-12345",
"name": "Jane Smith",
"profileUrl": "https://www.linkedin.com/in/jane-smith"
},
"direction": "received",
"sentAt": "2024-02-24T15:30:00.000Z",
"readStatus": "unread",
"contentType": "TEXT"
}
],
"pagination": {
"hasMore": true,
"continuationToken": "eyJjb250aW51YXRpb24iOiIxNzA4Nzg0MjAwMDAwIn0="
}
}
{
"statusCode": 404,
"error": "Not Found",
"code": "SENDER_NOT_FOUND",
"message": "LinkedIn sender with ID 'sender_abc123' not found in this workspace"
}
The
accountId parameter is required to verify that the conversation belongs to a LinkedIn account in your workspace.Use the
continuationToken from the response to fetch older messages. Pass it as a query parameter in subsequent requests.Authorizations
API key for authentication
Path Parameters
The conversation/chat ID to fetch messages from
Query Parameters
The LinkedIn sender account ID that owns this conversation
Number of messages to return (max 100)
Required range:
1 <= x <= 100Token for fetching the next page of messages. Returned in the previous response.
⌘I