Reading from a Member's Mailbox

Reading from the Mailbox

This API resource allows you to access the user's mailbox folder, filtered by type, and also retrieve a specific message from a folder. 

GET
https://api.linkedin.com/v1/people/~/mailbox

Parameters

Parameter Required Possible Values Notes
folder Yes [inbox | sent | archived] default: inbox mailbox folder> Message can be moved between inbox and archive folders.  Note that there is no way to access the trash.
message-type Yes
message-connections mebc 1-1 messages
group-message grop 1-1 messages with group members
news news news sharing
message-group-sharing ashr group sharing
job-super-viral-forward jsvf Job super viral forward
sponsored-inmail coml commercial sponsored inmail
profile-forward prff profile forward
reply-profile-forward prfn reply to a profile forward
profile-forward-OON prfo profile forward to out of network recipient
reply-profile-forward-oon prno reply to profile forward to out of network recipient
public-answer puba public answer to a question
private-answer pvta private answer to a question
forward-public-question pubq forward of public question
forward-private-question pvtq forward of a private question
reply-answer aynn reply to someone who's answered a question
invitation-request invt invitation request
invitation-reply invn reply to invitation
group-invitation grpi group invitation
group-applicant aapl group applicant
recommendation recm recommendation message
recommendation-request recr recommendation request
inmail-direct-connection dcnt regular inmail
inmail-openlink olnk openlink
introduction intr introduction
sharing shar sharing message
prospect-tracking-system-message prospect-tracking-system-message sales navigator message
message-welcome wlcm (deprecated) new user welcome
invitation-acceptance inva (deprecated) invitation acceptance notification
inmail-group-direct-connection gdct (deprecated) group direct connection
job-forward jobf (deprecated) job forward
message type is the type of message. Multiple message types can be specified by separating the types with commas. The number of messages per message type is not given, only the overall total.  The abbreviation can be used in place of the full name (mebc, news).  Clients need to handle deprecated types, but no new messages of this type will be created.
start No >=0 Starting position in collection. Start with 0, default 0
count No >0 Number of item returned per request, default=25, max=50
item-read No [true | false] Optional. If not specified both.
action-status No [no-action | pending | actioned]

pending - awaiting action to be taken (e.g. pending invitation).

actioned - action has been taken.

no-action - e.g. message

Messages Types

Message Type Description
message-connections messages between first degree connections
invitation-request invitation
invitation-reply reply on invitation
inmail-direct-connection inmail sent to a LinkedIn member

Message Fields

Remember that you can use Field Selectors to expand the people using the Profile Fields.

Field Returned Field Type Description
id id string Unique identifier for the specific message
folder folder string Mailbox for the message (archive, inbox, sent)
from from person Sender
recipients recipients person Recipients
subject subject string Message subject
short-body shortBody string A snippet of the message (useful for previewing a list of messages)
body body string The full message body
last-modified lastModified timestamp Last modified date
timestamp timestamp timestamp Time originally sent

Get the 1:1 messages in the Inbox:

GET
https://api.linkedin.com/v1/people/~/mailbox?folder=inbox&message-type=message-connections

Get the 1:1 messages and Invitations in the Inbox:

GET
https://api.linkedin.com/v1/people/~/mailbox?folder=inbox&message-type=message-connections,invitation-request

Get a single message by ID (e.g.: I1061_2) with body from the mailbox:

GET
https://api.linkedin.com/v1/people/~/mailbox/I1061_2

Get the whole mailbox, suitable for displaying as a list with message previews and user pictures:

GET
https://api.linkedin.com/v1/people/~/mailbox:(id,folder,from:(person:(id,first-name,last-name,picture-url,headline)),recipients:(person:(id,first-name,last-name,picture-url,headline)),subject,short-body,last-modified,timestamp,mailbox-item-actions)?message-type=message-connections

Get Mailbox counts:

GET
https://api.linkedin.com/v1/people/~/mailbox-summary
Sample Response
{ 
    "blockedInvitationsCount": 0, 
    "unreadCount": 4, 
    "pendingInvitationsCount": 1 
}