Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The identity of the resourceName is messages. This captures all inbound and outbound messages for direct connection, InMail, Recruiter and Sales Navigator of the regulated members. The method available is CREATE.
You can determine whether a Messages event is an inbound or outbound message based on the actor field of each event. If the event is an outbound one (e.g. regulated member sends a message), the actor field will correspond to the regulated member's personUrn and equal to the value of the owner field. If the event is inbound, then the field will be of another member's personUrn.
All message events' activity and processedActivity fields will contain owner, author, and thread fields. These fields will help you figure out the identities of the mailbox and more. The owner and author field will correspond to the sender's mailbox, which can be personal, Recruiter, or Sales Navigator. The thread field contains the membership array field that have the identity of all the participants in the message thread. For more information on the schema, please refer here.
Below are response examples of inbound and outbound Message events:
- Outbound message with attachment from personal mailbox
- Outbound message from Sales Navigator mailbox
- Inbound message to personal mailbox
- Inbound message to Sales Navigator mailbox
- Outbound GIF message from Recruiter mailbox
- Compliance Event when a regulated member edits a sent message
- Compliance Event when a regulated member deletes a sent message
Contextual Decoration of entities shared on messages
LinkedIn has added a feature to provide more context on certain linkedin entities shared on via messages. Currently it supports member mentions, audio messages and video messages shared on messages. The contentUrn field within the activity field is populated with the URNs of the entity shared. The contentUrns are further decorated and populated in the contentUrn~ field within processedActivity to provide additional context regarding the entities shared.
- Sample response of outbound audio message from personal mailbox
- Sample response of outbound video message from personal mailbox
- Sample response of outbound message with member mention sent from personal mailbox
Sample response of outbound message activity with attachment from personal mailbox
{
"owner": "urn:li:person:2qXA98-mVk",
"resourceId": "0-UzY2MDM0NDMwMzU5NDA0OTUzNjFfNTAw",
"configVersion": 1,
"method": "CREATE",
"activity": {
"owner": "urn:li:person:2qXA98-mVk",
"createdAt": 1574383506267,
"author": "urn:li:person:2qXA98-mVk",
"id": "0-UzY2MDM0NDMwMzU5NDA0OTUzNjFfNTAw",
"thread": "urn:li:messagingThread:0-NjU5OTczMTMyOTE1ODQzODkxMg==",
"readAt": 1574383506000,
"content": {
"format": "TEXT",
"fallback": "Hello from personal message",
"formatVersion": 1,
"content": {
"string": "Hello from personal message"
},
"attachments": [
"urn:li:digitalmediaAsset:C5606AQF245TuEXNVXA"
]
},
"deliveredAt": 1574383506267
},
"resourceName": "messages",
"resourceUri": "/messages/0-UzY2MDM0NDMwMzU5NDA0OTUzNjFfNTAw",
"actor": "urn:li:person:2qXA98-mVk",
"activityId": "b000859e-1239-4d77-b3d3-b8c27ee13409",
"processedAt": 1574383536887,
"capturedAt": 1574383506487,
"processedActivity": {
"owner": "urn:li:person:2qXA98-mVk",
"owner~": {...},
"createdAt": 1574383506267,
"deliveredAt": 1574383506267,
"author": "urn:li:person:2qXA98-mVk",
"author~": {...},
"thread~": {
"owner": "urn:li:person:2qXA98-mVk",
"membership": [
{
"createdAt": 1573498565823,
"identity~": {...},
"identity": "urn:li:person:kAq_1ptj-v"
},
{
"createdAt": 1573498565823,
"identity~": {...},
"identity": "urn:li:person:2qXA98-mVk"
}
]
},
"thread": "urn:li:messagingThread:0-NjU5OTczMTMyOTE1ODQzODkxMg==",
"id": "0-UzY2MDM0NDMwMzU5NDA0OTUzNjFfNTAw",
"readAt": 1574383506000,
"content": {
"format": "TEXT",
"fallback": "Hello from personal message",
"formatVersion": 1,
"content": {
"string": "Hello from personal message"
}
},
"attachments~": {...}
},
"id": 977493340
}
To download the media attachment, you will need to include the OAuth2 access token in the Authorization header with the identifier URL value in identifiers of attachments~. See below for an example.
Sample request of media download
GET https://api.linkedin.com/mediaDownload/C4E06AQGlz2sDB72DQw/messaging-attachmentFile/0?app=4355721&m=AQL6O71XM7RYCwAAAWcuIskYd_5WgTBEDPP1vu9mgwr17pkmTwAJepazDA&e=1543963290&v=beta&t=12345
-H "Authorization: Bearer <redacted access token>"
Sample response of outbound message activity from Sales Navigator mailbox
{
"owner": "urn:li:person:2qXA98-mVk",
"resourceId": "0-UzY2MDM0NDI5OTQyNjU4MTI5OTJfMTAwMA==",
"configVersion": 1,
"method": "CREATE",
"activity": {
"owner": "urn:li:person:2qXA98-mVk",
"createdAt": 1574383495992,
"attachments": [],
"author": "urn:li:salesIdentity:334326",
"id": "0-UzY2MDM0NDI5OTQyNjU4MTI5OTJfMTAwMA==",
"thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==",
"readAt": 1574383496000,
"content": {
"format": "TEXT",
"fallback": "Hello from Sales Navigator",
"formatVersion": 1,
"content": {
"string": "Hello from Sales Navigator"
}
},
"deliveredAt": 1574383495992
},
"resourceName": "messages",
"resourceUri": "/messages/0-UzY2MDM0NDI5OTQyNjU4MTI5OTJfMTAwMA==",
"actor": "urn:li:person:2qXA98-mVk",
"activityId": "6d43fcff-b56e-4e0f-993b-5a398c89fb5d",
"processedAt": 1574383527451,
"capturedAt": 1574383496347,
"processedActivity": {
"owner": "urn:li:person:2qXA98-mVk",
"owner~": {...},
"createdAt": 1574383495992,
"deliveredAt": 1574383495992,
"attachments": [],
"thread~": {
"owner": "urn:li:salesIdentity:334326",
"membership": [
{
"createdAt": 1573498467712,
"identity~": {
"member": "urn:li:person:2qXA98-mVk",
"member~": {...},
"id": 334326
},
"identity": "urn:li:salesIdentity:334326"
},
{
"createdAt": 1573498467712,
"identity~": {...},
"identity": "urn:li:person:kAq_1ptj-v"
}
]
},
"author": "urn:li:salesIdentity:334326",
"thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==",
"id": "0-UzY2MDM0NDI5OTQyNjU4MTI5OTJfMTAwMA==",
"readAt": 1574383496000,
"content": {
"format": "TEXT",
"fallback": "Hello from Sales Navigator",
"formatVersion": 1,
"content": {
"string": "Hello from Sales Navigator"
}
}
},
"id": 977493324
}
Sample response of inbound message activity to personal mailbox
{
"owner": "urn:li:person:2qXA98-mVk",
"resourceId": "0-UzY2MDM0NDgxMzA5MzM1MzA2MjRfNTAw",
"configVersion": 1,
"method": "CREATE",
"activity": {
"owner": "urn:li:person:kAq_1ptj-v",
"createdAt": 1574384720910,
"clientExperience": {
"clientGeneratedToken": "41453ff9-a796-4259-8b80-e4a5da9f8230"
},
"author": "urn:li:person:kAq_1ptj-v",
"id": "0-UzY2MDM0NDgxMzA5MzM1MzA2MjRfNTAw",
"thread": "urn:li:messagingThread:0-NjU5OTczMTMyOTE1ODQzODkxMg==",
"readAt": 1574384721000,
"content": {
"format": "TEXT",
"fallback": "Hello back to personal inbox",
"formatVersion": 1,
"content": {
"string": "Hello back to personal inbox"
}
},
"deliveredAt": 1574384720910
},
"resourceName": "messages",
"resourceUri": "/messages/0-UzY2MDM0NDgxMzA5MzM1MzA2MjRfNTAw",
"actor": "urn:li:person:kAq_1ptj-v",
"activityId": "1f9e70cc-925f-4738-a336-718832c9db46",
"processedAt": 1574384751790,
"capturedAt": 1574384721128,
"processedActivity": {
"owner": "urn:li:person:kAq_1ptj-v",
"owner~": {...},
"createdAt": 1574384720910,
"deliveredAt": 1574384720910,
"author~": {...},
"thread~": {
"owner": "urn:li:person:2qXA98-mVk",
"membership": [
{
"createdAt": 1573498565823,
"identity~": {...},
"identity": "urn:li:person:kAq_1ptj-v"
},
{
"createdAt": 1573498565823,
"identity~": {...},
"identity": "urn:li:person:2qXA98-mVk"
}
]
},
"author": "urn:li:person:kAq_1ptj-v",
"thread": "urn:li:messagingThread:0-NjU5OTczMTMyOTE1ODQzODkxMg==",
"id": "0-UzY2MDM0NDgxMzA5MzM1MzA2MjRfNTAw",
"readAt": 1574384721000,
"content": {
"format": "TEXT",
"fallback": "Hello back to personal inbox",
"formatVersion": 1,
"content": {
"string": "Hello back to personal inbox"
}
}
},
"id": 977493572
}
Compliance Event when a regulated member edits a sent message
When a regulated member edits a sent message:
- The value of
methodfield would beUPDATE. - The
processedActivitycontains the edited content of the message. - The
resourceIdwould be same as the original message sent / received by the regulated member.
{
"owner": "urn:li:person:demo-123",
"resourceId": "2-demoResourceId123==",
"activity": {...},
"method": "UPDATE",
"configVersion": 4,
"parentSiblingActivities": [],
"resourceName": "messages",
"resourceUri": "/messages/2-demoResourceId123==",
"actor": "urn:li:person:demo-123",
"activityId": "bf2c8e04-99fe-4c9c-be16-4b000b9fd387",
"processedAt": 1686212247420,
"activityStatus": "SUCCESS",
"capturedAt": 1686212247039,
"processedActivity": {
"createdAt": 1686212246941,
"attachments": [],
"thread~": {
"owner": "urn:li:person:demo-123",
"membership": [
{
"identity~": { ... },
"createdAt": 1625024160780,
"identity": "urn:li:person:demo-123"
},
{
"identity~": {...},
"createdAt": 1625024160780,
"identity": "urn:li:person:demo-456"
}
]
},
"author~": {...},
"author": "urn:li:person:demo-123",
"thread": "urn:li:messagingThread:2-demoResourceId123==",
"content": {
"format": "TEXT",
"fallback": "This Sent message has been edited",
"formatVersion": 1
}
},
"siblingActivities": [],
"id": 1823218385
}
Compliance Event when a regulated member deletes a sent message
When a regulated member deletes a sent message:
- The value of
methodfield would beDELETE. - The
processedActivity.contentandactivity.contentfields would not be present. - The
resourceIdwould be same as the original message sent / received by the regulated member.
{
"owner": "urn:li:person:demo-user1",
"resourceId": "2-demoResourceID==",
"activity": { ... },
"method": "DELETE",
"configVersion": 4,
"parentSiblingActivities": [],
"resourceName": "messages",
"resourceUri": "/messages/2-demoResourceID==",
"actor": "urn:li:person:demo-user1",
"activityId": "194b0d56-5b05-487f-8b84-da6cbe9e5c31",
"processedAt": 1686213030032,
"activityStatus": "SUCCESS",
"capturedAt": 1686213029729,
"processedActivity": {
"createdAt": 1686213029706,
"attachments": [],
"thread~": {
"owner": "urn:li:person:demo-user1",
"membership": [
{
"identity~": { ... },
"createdAt": 1625024160780,
"identity": "urn:li:person:demo-user1"
},
{
"identity~": { ... },
"createdAt": 1625024160780,
"identity": "urn:li:person:demo-user2"
}
]
},
"author~": { ... },
"author": "urn:li:person:demo-user1",
"thread": "urn:li:messagingThread:2-demoThreadId==",
"extensionContent": {
"contentRecordMap": {}
}
},
"siblingActivities": [],
"id": 1823218409
}
Sample response of inbound message activity to Sales Navigator mailbox
{
"owner": "urn:li:person:2qXA98-mVk",
"resourceId": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw",
"configVersion": 1,
"method": "CREATE",
"activity": {
"owner": "urn:li:person:kAq_1ptj-v",
"createdAt": 1574449632116,
"clientExperience": {
"clientGeneratedToken": "11daeca1-34af-47c2-b22e-d02a947c33a2"
},
"author": "urn:li:person:kAq_1ptj-v",
"id": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw",
"thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==",
"readAt": 1574449632000,
"content": {
"format": "TEXT",
"fallback": "Hello back to Sales Navigator inbox",
"formatVersion": 1,
"content": {
"string": "Hello back to Sales Navigator inbox"
}
},
"deliveredAt": 1574449632116
},
"resourceName": "messages",
"resourceUri": "/messages/0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw",
"actor": "urn:li:person:kAq_1ptj-v",
"activityId": "c86c3c71-7844-4ed1-b1fc-66deeac14192",
"processedAt": 1574449662997,
"capturedAt": 1574449632331,
"processedActivity": {
"owner": "urn:li:person:kAq_1ptj-v",
"owner~": {...},
"createdAt": 1574449632116,
"deliveredAt": 1574449632116,
"author~": {...},
"thread~": {
"owner": "urn:li:salesIdentity:334326",
"membership": [
{
"createdAt": 1573498467712,
"identity~": {
"member": "urn:li:person:2qXA98-mVk",
"member~": {...},
"id": 334326
},
"identity": "urn:li:salesIdentity:334326"
},
{
"createdAt": 1573498467712,
"identity~": {...},
"identity": "urn:li:person:kAq_1ptj-v"
}
]
},
"author": "urn:li:person:kAq_1ptj-v",
"thread": "urn:li:messagingThread:0-NjU5OTczMDkxNTAzODAyNzc3Ng==",
"id": "0-UzY2MDM3MjAzODc4OTk1OTI3MDRfNTAw",
"readAt": 1574449632000,
"content": {
"format": "TEXT",
"fallback": "Hello back to Sales Navigator inbox",
"formatVersion": 1,
"content": {
"string": "Hello back to Sales Navigator inbox"
}
}
},
"id": 978988628
}
Sample response of outbound GIF message activity from Recruiter mailbox
{
"owner": "urn:li:person:2qXA98-mVk",
"resourceId": "0-UzY123456789",
"configVersion": 1,
"method": "CREATE",
"activity": {
"owner": "urn:li:person:2qXA98-mVk",
"createdAt": 1580345063392,
"attachments": [],
"author": "urn:li:hireMailbox:00000123456789",
"id": "0-UzY123456789",
"thread": "urn:li:messagingThread:0-NjA123456789",
"readAt": 1580345063000,
"content": {
"format": "TEXT",
"fallback": "",
"formatVersion": 1,
"content": {
"string": ""
}
},
"deliveredAt": 1580345063392,
"extensionContent": {
"contentRecordMap": {
"ThirdPartyMedia": {
"contentRecord": {
"com.linkedin.messaging.plugin.content.ThirdPartyMedia": {
"id": "16144203",
"media": {
"gif": {
"width": 498,
"url": "https://snap.licdn.com/tr/images/09db7a56a494eab4477cfc43ce8ae4db/tenor.gif",
"height": 373
},
"nanogif": {
"width": 120,
"url": "https://snap.licdn.com/tr/images/70076b56d82a7cf30d364513ea732998/tenor.gif",
"height": 90
},
"previewgif": {
"width": 220,
"url": "https://snap.licdn.com/tr/images/f977153e1c03d21380e3fbd50690190c/tenor.gif",
"height": 165
}
},
"title": "",
"type": "TENOR_GIF"
}
},
"key": "ThirdPartyMedia"
}
}
}
},
"resourceName": "messages",
"resourceUri": "/messages/0-UzY123456789",
"actor": "urn:li:person:2qXA98-mVk",
"activityId": "0f9bc010-4cff-4aa9-8b34-862e0c6a0634",
"processedAt": 1580345094317,
"activityStatus": "SUCCESS",
"capturedAt": 1580345063639,
"processedActivity": {
"owner": "urn:li:person:2qXA98-mVk",
"owner~": {...},
"createdAt": 1580345063392,
"deliveredAt": 1580345063392,
"attachments": [],
"thread~": {
"owner": "urn:li:hireMailbox:00000123456789",
"membership": [
{
"createdAt": 1455240523597,
"identity~": {...},
"identity": "urn:li:person:iwXLgvQLRf"
},
{
"createdAt": 1455240523597,
"identity": "urn:li:hireMailbox:00000123456789"
}
],
"title": ""
},
"author": "urn:li:hireMailbox:00000123456789",
"thread": "urn:li:messagingThread:0-NjA123456789",
"id": "0-UzY123456789",
"readAt": 1580345063000,
"content": {
"format": "TEXT",
"fallback": "",
"formatVersion": 1,
"content": {
"string": ""
}
},
"extensionContent": {
"contentRecordMap": {
"ThirdPartyMedia": {
"contentRecord": {
"com.linkedin.messaging.plugin.content.ThirdPartyMedia": {
"id": "16144203",
"media": {
"gif": {
"width": 498,
"url": "https://snap.licdn.com/tr/images/09db7a56a494eab4477cfc43ce8ae4db/tenor.gif",
"height": 373
},
"nanogif": {
"width": 120,
"url": "https://snap.licdn.com/tr/images/70076b56d82a7cf30d364513ea732998/tenor.gif",
"height": 90
},
"previewgif": {
"width": 220,
"url": "https://snap.licdn.com/tr/images/f977153e1c03d21380e3fbd50690190c/tenor.gif",
"height": 165
}
},
"title": "",
"type": "TENOR_GIF"
}
},
"key": "ThirdPartyMedia"
}
}
}
},
"id": 1106033436
}
Sample response of outbound audio message from personal mailbox
{
"owner": "urn:li:person:KhoHfOWYNQ",
"resourceId": "2-MTYyOTE0MDAzODE2M2I0MTgyMS0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"activity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"attachments": [],
"clientExperience": {...},
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629140038306,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "",
"content": {
"string": "{audio|urn:li:digitalmediaAsset:C4E20AQGnXq\\_XPHmP3w}"
}
},
"deliveredAt": 1629140038306,
"createdAt": 1629140038163,
"contentFilterReasons": [],
"contentUrns": [
"urn:li:digitalmediaAsset:C4E20AQGnXq_XPHmP3w"
],
"id": "2-MTYyOTE0MDAzODE2M2I0MTgyMS0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"$URN": "urn:li:messagingMessage:2-MTYyOTE0MDAzODE2M2I0MTgyMS0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"method": "CREATE",
"configVersion": 13,
"resourceName": "messages",
"resourceUri": "/messages/2-MTYyOTE0MDAzODE2M2I0MTgyMS0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"actor": "urn:li:person:KhoHfOWYNQ",
"activityId": "a93b1b86-708b-4874-b312-cebcc8b52560",
"processedAt": 1629140038885,
"activityStatus": "SUCCESS",
"capturedAt": 1629140038731,
"processedActivity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"owner~": {...},
"attachments": [],
"author~": {...},
"contentUrns~": [
{
"paging": {
"count": 10,
"start": 0,
"links": []
},
"elements": [
{
"artifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C4E20AQGnXq_XPHmP3w,urn:li:digitalmediaMediaArtifactClass:voicemessaging-audio-analyzed)",
"pluggableServiceFactory": "com.linkedin.vector.assetmanager.logic.pluggableservice.uploaddownloadservice.UploadDownloadServiceFactory",
"authorizationMethod": "PRIVATE",
"data": {
"com.linkedin.digitalmedia.mediaartifact.Audio": {
"rawMetadataTags": [],
"durationInMicroseconds": 10752000,
"audioStreams": []
}
},
"identifiers": [
{
"identifier": "https://api.linkedin.com/mediaDownload/C4E20AQGnXq_XPHmP3w/voicemessaging-audio-analyzed/0/1629140038155?app=70365316&m=AQLLb_u3SlMNagAAAXtQUDTTaNAjjMrzkg_PHbo84cVIzaLRK4rlEoFNOw&e=1631559238&v=beta&t=Da9Tv9RiqnBIJ4hBiFNOZp7_ij5lwnQiJtwKE3ObsU4",
"filename": "4973B2E2-9772-4E83-BF8F-70F3811955CD.m4a",
"file": "urn:li:digitalmediaFile:(urn:li:digitalmediaAsset:C4E20AQGnXq_XPHmP3w,urn:li:digitalmediaMediaArtifactClass:voicemessaging-audio-analyzed,0)",
"size": 66492,
"index": 0,
"mediaType": "application/octet-stream",
"identifierType": "EXTERNAL_URL",
"identifierExpiresInSeconds": 1631559238
}
]
}
]
}
],
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629140038306,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "",
"content": {
"string": "{audio|urn:li:digitalmediaAsset:C4E20AQGnXq\\_XPHmP3w}"
}
},
"deliveredAt": 1629140038306,
"createdAt": 1629140038163,
"thread~": {...},
"contentUrns": [
"urn:li:digitalmediaAsset:C4E20AQGnXq_XPHmP3w"
],
"id": "2-MTYyOTE0MDAzODE2M2I0MTgyMS0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"siblingActivities": [],
"id": 1969381378
}
Sample response of Outbound video message from personal mailbox
{
"owner": "urn:li:person:KhoHfOWYNQ",
"resourceId": "2-MTYyOTE0MDAyMDM4M2IxMDUxMC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"activity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"attachments": [],
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629140020509,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "",
"content": {
"string": "{video|urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w}"
}
},
"deliveredAt": 1629140020509,
"createdAt": 1629140020383,
"contentFilterReasons": [],
"contentUrns": [
"urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w"
],
"messageContexts": [],
"id": "2-MTYyOTE0MDAyMDM4M2IxMDUxMC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"$URN": "urn:li:messagingMessage:2-MTYyOTE0MDAyMDM4M2IxMDUxMC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"method": "CREATE",
"resourceName": "messages",
"resourceUri": "/messages/2-MTYyOTE0MDAyMDM4M2IxMDUxMC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"actor": "urn:li:person:KhoHfOWYNQ",
"activityId": "8cd045c2-7cdf-4a6e-b629-3b3a413c7fca",
"processedAt": 1629140020853,
"activityStatus": "SUCCESS",
"capturedAt": 1629140020699,
"processedActivity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"owner~": {...},
"author~": {...},
"contentUrns~": [
{
"paging": {
"count": 10,
"start": 0,
"links": []
},
"elements": [
{
"artifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w,urn:li:digitalmediaMediaArtifactClass:videomessaging-mp4_mid)",
"pluggableServiceFactory": "com.linkedin.vector.assetmanager.logic.pluggableservice.uploaddownloadservice.UploadDownloadServiceFactory",
"authorizationMethod": "PRIVATE",
"data": {
"com.linkedin.digitalmedia.mediaartifact.Video": {
"rawMetadataTags": [],
"videoStreams": [
{
"index": 0,
"bitRate": {
"type": "CBR",
"maximum": 2097152
},
"durationInMicroseconds": 7401000,
"displayAspectRatio": {
"widthAspect": 0.5625,
"heightAspect": 1.0,
"formatted": "0.562500:1.000000"
},
"storageSize": {
"width": 720,
"height": 1280
}
}
],
"audioStreams": []
}
},
"identifiers": [
{
"identifier": "https://api.linkedin.com/mediaDownload/C4E23AQEiWpnWqOxC8w/videomessaging-mp4_mid/0/1629140020374?app=70365316&m=AQLrOE6H9yL_mQAAAXtQT-5hMWmcGNsLeglY8V0zyw1d55e2UNW0KzZxPQ&e=1631559220&v=beta&t=bR27huusjrKRvkjYn1b1MXqCJtbDSlIxU7SkKbg9V8c",
"filename": "9504AA7B-2D25-4D54-A6DD-AB3310C08D71.mp4",
"file": "urn:li:digitalmediaFile:(urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w,urn:li:digitalmediaArtifactClass:videomessaging-mp4_mid,0)",
"size": 2585873,
"index": 0,
"mediaType": "video/quicktime",
"identifierType": "EXTERNAL_URL",
"identifierExpiresInSeconds": 1631559220
}
]
},
{
"artifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w,urn:li:digitalmediaMediaArtifactClass:videomessaging-thumbnail)",
"pluggableServiceFactory": "com.linkedin.vector.assetmanager.logic.pluggableservice.uploaddownloadservice.UploadDownloadServiceFactory",
"authorizationMethod": "PRIVATE",
"data": {...},
"identifiers": [
{
"identifier": "https://api.linkedin.com/mediaDownload/C4E23AQEiWpnWqOxC8w/videomessaging-thumbnail/0/1629140020373?app=70365316&m=AQJjk_oEIHREAQAAAXtQT-5hSChETOgwv4xvUsIeytDblQbQqd-rzQk_nw&e=1631559220&v=beta&t=IB75pjxnwWleO-a6BCVj5PVj3UQCERZIDGdncwndQcI",
"file": "urn:li:digitalmediaFile:(urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w,urn:li:digitalmediaArtifactClass:videomessaging-thumbnail,0)",
"size": 452256,
"index": 0,
"mediaType": "image/jpeg",
"identifierType": "EXTERNAL_URL",
"identifierExpiresInSeconds": 1631559220
}
]
}
]
}
],
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629140020509,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "",
"content": {
"string": "{video|urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w}"
}
},
"deliveredAt": 1629140020509,
"createdAt": 1629140020383,
"thread~": {...},
"contentUrns": [
"urn:li:digitalmediaAsset:C4E23AQEiWpnWqOxC8w"
],
"id": "2-MTYyOTE0MDAyMDM4M2IxMDUxMC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"id": 1969381370
}
Sample response of Outbound message with member mention sent from personal mailbox
{
"owner": "urn:li:person:KhoHfOWYNQ",
"resourceId": "2-MTYyOTEzOTk3NjQ4N2I4OTg1OC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"activity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629139976649,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "This is a test @Siddartha Test",
"content": {
"string": "This is a test @[Siddartha Test](urn:li:person:A3iH9CIw-n)"
}
},
"deliveredAt": 1629139976649,
"createdAt": 1629139976487,
"contentFilterReasons": [],
"contentUrns": [
"urn:li:person:A3iH9CIw-n"
],
"messageContexts": [],
"id": "2-MTYyOTEzOTk3NjQ4N2I4OTg1OC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"$URN": "urn:li:messagingMessage:2-MTYyOTEzOTk3NjQ4N2I4OTg1OC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"method": "CREATE",
"resourceName": "messages",
"resourceUri": "/messages/2-MTYyOTEzOTk3NjQ4N2I4OTg1OC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"actor": "urn:li:person:KhoHfOWYNQ",
"activityId": "663bfb24-492e-4198-9821-6255719a9143",
"processedAt": 1629139977514,
"activityStatus": "SUCCESS",
"capturedAt": 1629139977339,
"processedActivity": {
"owner": "urn:li:person:KhoHfOWYNQ",
"owner~": {...},
"attachments": [],
"author~": {...},
"contentUrns~": [
{
"localizedLastName": "Test",
"firstName": {
"localized": {
"en_US": "Siddartha"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"profilePicture": {
"displayImage": "urn:li:digitalmediaAsset:C4E03AQFEHQg35srlUg",
"displayImage~": {...}
},
"lastName": {
"localized": {
"en_US": "Test"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"vanityName": "sidaddarth34rfa7s07",
"headline": {...},
"localizedFirstName": "Siddartha"
}
],
"author": "urn:li:person:KhoHfOWYNQ",
"thread": "urn:li:messagingThread:2-NjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg==",
"readAt": 1629139976649,
"content": {
"format": "LITTLE",
"formatVersion": 1,
"fallback": "This is a test @Siddartha Test",
"content": {
"string": "This is a test @[Siddartha Test](urn:li:person:A3iH9CIw-n)"
}
},
"deliveredAt": 1629139976649,
"createdAt": 1629139976487,
"thread~": {...},
"contentUrns": [
"urn:li:person:A3iH9CIw-n"
],
"id": "2-MTYyOTEzOTk3NjQ4N2I4OTg1OC0wMDMmNjI2ZGZkZWEtZGFkZS00N2FkLTk2YmEtMDY5MWEyNmEyOThhXzAxMg=="
},
"siblingActivities": [],
"id": 1969381330
}
Support for Company Pages Messaging (BETA)
LinkedIn allows users to message LinkedIn Company Pages. Archiving messages sent and received between a regulated member and a LinkedIn Company page are now supported via the complianceEvents API.
The following use cases are supported:
A regulated member messages a company page: In this case, all the messages sent are received by the regulated member are archived as compliance events for the regulated member.
A member messages a company page managed by a regulated member: In this case, if a regulated member is the ADMIN of a company page, then all the messages sent and received by the company page are archived as compliance events for all the regulated admins. The developer is expected to onboard atleast one admin for compliance regulation to be able to archive information on messages sent and received by the company page.
For messages sent to a LinkedIn Company Page, the identity field under the processedActivity.thread~.membership would be a Page MailBox URN (urn:li:pageMailbox:<id>) signifying a Company Page.
Details of the company page are provided under the identity~ field with the following schema:
| Field | Data Type | Description |
|---|---|---|
| ownerOrganization.organization | Organization URN | Organization URN of the Company Page |
| ownerOrganization.organization~.name | MultiLocale String | Name of the Company Page |
| ownerOrganization.organization~.vanityName | String | Vanity name of the Company Page |
| ownerOrganization.organization~.localizedName | String | Localized name of the Company Page in their preferred locale |
| ownerOrganization.organization~.id | Long | Id of the organization |
Compliance Event of an outbound message sent to a LinkedIn Company Page
Sample Compliance Event:
{
"owner": "urn:li:person:demo-123",
"resourceId": "2-demoResourceId123==",
"activity": {...},
"method": "CREATE",
"parentSiblingActivities": [],
"resourceName": "messages",
"resourceUri": "/messages/2-demoResourceId123==",
"actor": "urn:li:person:demo-123",
"processedAt": 1686198033638,
"activityStatus": "SUCCESS",
"processedActivity": {
"owner": "urn:li:person:gpq-OMQ48G",
"createdAt": 1686198032462,
"owner~": {...},
"attachments": [],
"author~": { ... },
"thread~": {
"owner": "urn:li:person:demo-123",
"membership": [
{
"identity~": {...},
"createdAt": 1685541512879,
"identity": "urn:li:person:demo-123"
},
{
"identity~": {
"messagingEnabled": true,
"ownerOrganization": {
"organization~": {
"name": {
"localized": {
"zh_TW": "DemoCompany"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"vanityName": "DemoCompany123",
"localizedName": "demoCompany",
"id": 123
},
"organization": "urn:li:organization:123"
}
},
"createdAt": 1685541512879,
"identity": "urn:li:pageMailbox:6411"
}
]
},
"author": "urn:li:person:demo-123",
"thread": "urn:li:messagingThread:2-demoResourceId123==",
"id": "2-demoResourceId123==",
"content": {
"format": "TEXT",
"fallback": "Sending a message to the Company Page",
"formatVersion": 1
},
"deliveredAt": 1686198033358
},
"siblingActivities": []
.
.
.
}
Compliance Event of an inbound message sent by a LinkedIn Company Page
For messages sent by a LinkedIn Company Page to a regulated member, the following fields within processedActivity would be populated with a page mailbox URN (urn:li:pageMailBox:<id>) signifying the message was sent by a LinkedIn Company Page.
processedActivity.ownerprocessedActivity.authoridentityfield under theprocessedActivity.thread~.membership
Sample Compliance Event:
{
"owner": "urn:li:person:demo-123",
"resourceId": "2-demoResourceId123==",
"activity": { ... },
"method": "CREATE",
"resourceName": "messages",
"resourceUri": "/messages/2-demoResourceId123==",
"actor": "urn:li:person:demo-123",
"activityId": "104d1d4e-d40f-4f1f-a7e6-demoID",
"processedAt": 1686198051220,
"activityStatus": "SUCCESS",
"capturedAt": 1686198050946,
"processedActivity": {
"owner": "urn:li:pageMailbox:123",
"createdAt": 1686198050222,
"owner~": { ... },
"attachments": [],
"author~": {
"ownerOrganization": {
"organization~": {
"name": {
"localized": {
"zh_TW": "demoCompany"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"vanityName": "demoCompany123",
"localizedName": "demoCompany",
"id": 123
},
"organization": "urn:li:organization:123"
}
},
"thread~": {
"owner": "urn:li:person:demo-123",
"membership": [
{
"identity~": { ... },
"createdAt": 1685541512879,
"identity": "urn:li:person:demo-123"
},
{
"identity~": {
"messagingEnabled": true,
"ownerOrganization": {
"organization~": {
"name": {
"localized": {
"zh_TW": "demoCompany"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"vanityName": "demoCompany123",
"localizedName": "demoCompany",
"id": 123
},
"organization": "urn:li:organization:123"
}
},
"createdAt": 1685541512879,
"identity": "urn:li:pageMailbox:123"
}
]
},
"author": "urn:li:pageMailbox:641143",
"thread": "urn:li:messagingThread:2-demoResourceId123==",
"id": "2-demoResourceId123==",
"content": {
"format": "TEXT",
"fallback": "A company page replying back",
"formatVersion": 1
},
"deliveredAt": 1686198050921
},
"id": 1823011081
}
Inbound message sent to a LinkedIn Company Page by any user
Sample Compliance Event:
{
"owner": "urn:li:person:KhoHfOWYNQ",
"resourceId": "2-MTcyMTg5ODAyMDIyMmI3NjAzNS0wMDQmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"activity": {...},
"method": "CREATE",
"configVersion": 19,
"parentSiblingActivities": [],
"resourceName": "messages",
"resourceUri": "/messages/2-MTcyMTg5ODAyMDIyMmI3NjAzNS0wMDQmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"actor": "urn:li:person:A3iH9CIw-n",
"activityId": "f2c9c64c-39cc-40b4-a531-37f1d1ca3112",
"processedAt": 1721898021625,
"activityStatus": "SUCCESS",
"capturedAt": 1721898020677,
"processedActivity": {
"owner": "urn:li:person:A3iH9CIw-n",
"createdAt": 1721898020222,
"owner~": {...},
"attachments": [],
"author~": {...},
"author": "urn:li:person:A3iH9CIw-n",
"thread!": {
"message": "Content_is_no_longer_available"
},
"thread": "urn:li:messagingThread:2-MGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"id": "2-MTcyMTg5ODAyMDIyMmI3NjAzNS0wMDQmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"content": {
"format": "TEXT",
"fallback": "Test Message",
"formatVersion": 1
},
"deliveredAt": 1721898020533
},
"siblingActivities": [],
"id": 2059635257
}
Outbound message sent by a LinkedIn Company Page to any user
Sample Compliance Event
{
"owner": "urn:li:person:KhoHfOWYNQ",
"resourceId": "2-MTcyMTg5ODA3MzAxNGIxMjY3Mi0wMDEmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"activity": {
"owner": "urn:li:pageMailbox:3966458",
"attachments": [],
"clientExperience": {
"clientGeneratedToken": "1e47db9a-8dd8-4a02-9920-90db2498fb9b"
},
"author": "urn:li:pageMailbox:3966458",
"thread": "urn:li:messagingThread:2-MGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"contentClassification": {
"classification": "SAFE"
},
"content": {
"format": "TEXT",
"fallback": "Test Reply",
"formatVersion": 1
},
"deliveredAt": 1721898073138,
"actor": "urn:li:messagingActor:urn:li:person:KhoHfOWYNQ",
"createdAt": 1721898073014,
"mailbox": "urn:li:messagingMailbox:urn:li:pageMailbox:3966458",
"messageContexts": [],
"id": "2-MTcyMTg5ODA3MzAxNGIxMjY3Mi0wMDEmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"$URN": "urn:li:messagingMessage:2-MTcyMTg5ODA3MzAxNGIxMjY3Mi0wMDEmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw=="
},
"method": "CREATE",
"configVersion": 19,
"parentSiblingActivities": [],
"resourceName": "messages",
"resourceUri": "/messages/2-MTcyMTg5ODA3MzAxNGIxMjY3Mi0wMDEmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"actor": "urn:li:person:KhoHfOWYNQ",
"activityId": "f9902cc5-e483-4dd1-92c0-c3afc5127bf8",
"processedAt": 1721898073956,
"activityStatus": "SUCCESS",
"capturedAt": 1721898073238,
"processedActivity": {
"owner": "urn:li:pageMailbox:3966458",
"createdAt": 1721898073014,
"owner~": {...},
"attachments": [],
"author~": {...},
"author": "urn:li:pageMailbox:3966458",
"thread!": {
"message": "Content_is_no_longer_available"
},
"thread": "urn:li:messagingThread:2-MGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"id": "2-MTcyMTg5ODA3MzAxNGIxMjY3Mi0wMDEmMGUxZTAwYzItYjM3Yi00OGY3LWFiOGEtMzBmMGNiOTk4MWU5XzAxMw==",
"content": {
"format": "TEXT",
"fallback": "Test Reply",
"formatVersion": 1
},
"deliveredAt": 1721898073138
},
"siblingActivities": [],
"id": 5797969900
}
Note
This is currently in BETA, for compliance events archived for the regulated company page admins, the thread decoration currently returns thread!: "Content_is_no_longer_available" We are working on this.