Profile Edit API
Note
The use of this API is restricted to those developers approved by LinkedIn and subject to applicable data restrictions in their agreements.
Profile Edit API allows you to include functionality in your application to modify LinkedIn profiles (including changing existing fields as well as adding and deleting data from the profile sections). In order for your application to modify any member's profile, the member's authorization (via OAuth) is required.
Permissions
Permissions | Description |
---|---|
w_compliance | Required to manage and delete data for compliance. This is a private permission and access is granted to select developers. |
How to Perform a Profile Edit
You must use an access token to make an authenticated call on behalf of that specific user. Only existing profiles can be edited using this API, a new profile can be created by a user using https://www.linkedin.com/. The Profile Edit API uses the response headers documented in the Request and Response Headers section. A successful profile edit will return the response code 200 OK
.
All basic profile fields will follow the sample request below. Keep in mind when you update a field, the entire value will update. For example if you are adding a firstName
in another language, you will need to include the original values or else it will be deleted. If you want to delete the entire field, then you will pass in a empty string or array depending on the specified object type. Alternatively, you can also use the delete field method described below.
The complex fields will require calling the corresponding sub-resources. For more information, please click on the complex field you want to perform an action on.
Note
In order to make the sample calls below succeed, you must include X-RestLi-Protocol-Version:2.0.0
in your request header.
POST https://api.linkedin.com/v2/people/(id:{person ID})
Sample JSON request body to change all the values in the field:
{
"patch": {
"$set": {
"FIELD": {
"VALUE1": "value1",
"VALUE2": "value2",
"VALUE3": "value3"
}
}
}
}
Sample Json to delete one or more profile Basic Fields. To delete entries within Complex Fields, please refer the specific Field page for more information. If you attempt to delete a field that is mandatory, the API will return a 422 Error Response.
{
"patch": {
"$delete": [
"field1",
"field2"
]
}
}
Requirements
You must adhere to the following requirements when editing LinkedIn member profiles:
- The user must request the change to their profile
- The users change must be posted unaltered to the profile
Supported Fields
Basic Fields
address | associations | backgroundPicture | birthDate | certificationsOrder | contactInstructions | coursesOrder | educationsOrder | firstName | geoLocation | headline | honorsOrder | ims | imsOrder | industryId | interests | languagesOrder | lastName | legacyHonors | location | maidenName | memberRichContents | organizationsOrder | patentsOrder | phoneNumbers | phoneticFirstName | phoneticLastName | positionsOrder | profilePicture | projectsOrder | publicationsOrder | selectedContactInterests | skillsOrder | specialties | summary | supportedLocales | testScoresOrder | vanityName | volunteeringExperiencesOrder | volunteeringInterests | websites
Complex Fields
certifications | courses | educations | honors | languages | organizations | patents | positions | projects | publications | skills | testScores | volunteeringExperiences
MultiLocaleString Fields
The following fields are the object type MultiLocaleString
, which represents a textual fields with values for multiple locales. See here for more description on this object type.
Field Name | Description |
---|---|
address | Localizable address that a member wants to display on the profile. |
associations | Localizable description of organizations and associations. Deprecated on favor of "organizations" and only used for DELETE. |
contactInstructions | DEPRECATED. Use "phoneNumbers" and "websites" instead. Localizable notes on how to contact the member. |
firstName | Localizable first name of a member. |
headline | Localizable headline of choosing to be put on the profile. |
interests | DEPRECATED. Use "selectedContactInterests" instead. Localizable write-up of interests that a member wants to display on the profile. |
lastName | Localizable last name of a member. |
maidenName | Localizable maiden name of a member. |
phoneticFirstName | Localizable phonetic representation of firstName. Only applicable for Japanese profiles. |
phoneticLastName | Localizable phonetic representation of lastName. Only applicable for Japanese profiles. |
specialties | Localizable description of specialties. Deprecated in favor of "skills" and only used for DELETE. |
Sample JSON request body to edit address
:
{
"patch": {
"$set": {
"address": {
"localized": {
"en_US": "2029 Stierlin Ct, Mountain View, CA 94043"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
}
}
}
}
MultiLocaleRichText Fields
The following fields are the object type MultiLocaleRichText
, which represents a textual fields with values for multiple locales. See here for more description on this object type.
Field Name | Description |
---|---|
legacyHonors | Localizable description of honors and awards. Deprecated in favor of "honors" and only used for DELETE. |
summary | Localizable summary of the profile. |
Sample JSON request body to edit summary
:
{
"patch": {
"$set": {
"summary": {
"localized": {
"en_US": {
"rawText": "Awesome summary of me."
}
},
"preferredLocale": {
"country": "US",
"language": "en"
}
}
}
}
}
Complex Objects Order
The following fields are long arrays that determine the intra-section order of complex fields. Each long value represents an id
of the complex object. If an id
is placed before another id
, the former will show up before the latter on linkedin.com. If you input an id
that does not map to a complex object in its field, then the API will return an error.
Field Name | Description |
---|---|
certificationsOrder | Certifications intra-section order. |
coursesOrder | Courses intra-section order. |
educationsOrder | Educations intra-section order. |
honorsOrder | Honors intra-section order. |
imsOrder | IMs intra-section order. |
languagesOrder. | Languages intra-section order. |
organizationsOrder | Organizations intra-section order. |
patentsOrder | Patents intra-section order. |
positionsOrder | Positions intra-section order. |
projectsOrder | Projects intra-section order. |
publicationsOrder | Publications intra-section order. |
testScoresOrder | TestScores intra-section order. |
volunteeringExperiencesOrder | Volunteering experiences intra-section order. |
Sample JSON request body to edit educationOrder
:
{
"patch": {
"$set": {
"educationsOrder": [
2601123,
2663456
]
}
}
}
Note
The education ids listed above should be retrieved from the educations
field of the Profile API.
Background Picture
Edit the background picture for a member. You will first need to register, then upload the background picture image to LinkedIn and then update the member's profile with the image asset. We will walk through the following steps to update the background picture:
- Register the background picture image to be uploaded.
- Upload the background picture image to LinkedIn.
- Update the member's profile.
Note
Background Picture and Profile Picture edit requires the w_compliance
permission
Register the Background Picture Image
Send a POST request to the assets
API, with the action query parameter to registerUpload
. This will need to be done twice, once for the originalImage and once for the displayImage. You can use the same image for both fields. The only difference is in the "recipes" value.
POST https://api.linkedin.com/v2/assets?action=registerUpload
We will need to provide the member's Person URN. Additional recipes
and serviceRelationships
define the type of content we're publishing. See the request body below for reference.
Register the Background Picture Original Image
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-originalbackground-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
A successful response will contain an uploadUrl
and asset
that you will need to save for the next steps.
{
"value": {
"uploadMechanism": {
"com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest": {
"headers": {},
"uploadUrl": "https://api.linkedin.com/mediaUpload/C5604AQEMWf4Nl_mf2g/profile-original-uploadedBackgroundImage/0?ca=vector_profile&cn=uploads&m=AQKUInFL-Ndi6QAAAWhdlc4iYOO-4OMcrxikL9KS3DLPqXFLtoDF11AGYQ&app=5480656&sync=0&v=beta&ut=0Y9HvZ5fS4DoA1"
}
},
"mediaArtifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5604AQEMWf4Nl_mf2g,urn:li:digitalmediaMediaArtifactClass:profile-original-uploadedBackgroundImage)",
"asset": "urn:li:digitalmediaAsset:C5604AQEMWf4Nl_mf2g"
}
}
Register the Background Picture Display Image
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-displaybackground-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
A successful response will contain an uploadUrl
and asset
that you will need to save for the next steps.
{
"value": {
"uploadMechanism": {
"com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest": {
"headers": {},
"uploadUrl": "https://api.linkedin.com/mediaUpload/C5616AQEoeGkp7U5GEA/profile-uploadedBackgroundImage/0?ca=vector_profile&cn=uploads&m=AQIdKBw1WIgAWwAAAWhdlwvlhH13JEO0ZxBHb2VRuyAILbzD_VgJ-4UyLg&app=5480656&sync=0&v=beta&ut=1SpRkaq8G5DoA1"
}
},
"mediaArtifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5616AQEoeGkp7U5GEA,urn:li:digitalmediaMediaArtifactClass:profile-uploadedBackgroundImage)",
"asset": "urn:li:digitalmediaAsset:C5616AQEoeGkp7U5GEA"
}
}
Upload Image Binary File
Using the uploadUrl
returned from Step 1, upload your image to LinkedIn. To upload your image, send a POST
request to the uploadUrl
with your image included as a binary file. The example below uses cURL to upload the image file.
Do this for both the originalImage and displayImage uploads. You can use the same image file for both fields, but use the upload url returned in the respective registerUpload response.
Sample Request
curl -i --upload-file /Users/peter/Desktop/superneatimage.png --header "Authorization: Bearer redacted" 'https://api.linkedin.com/mediaUpload/C5616AQEoeGkp7U5GEA/profile-uploadedBackgroundImage/0?ca=vector_profile&cn=uploads&m=AQIdKBw1WIgAWwAAAWhdlwvlhH13JEO0ZxBHb2VRuyAILbzD_VgJ-4UyLg&app=5480656&sync=0&v=beta&ut=1SpRkaq8G5DoA1'
Update the profile with the Background Picture
After the image file has successfully uploaded from Step 2, we will use the asset
from Step 1 to update the profile with the new background picture.
Note
It is necessary and recommended to specify both the originalImage
and displayImage
fields in the profile update API call with the corresponding asset URNs. This is to avoid mismatches between the original and display images.
Sample Request Body
{
"patch": {
"backgroundPicture": {
"$set": {
"originalImage": "urn:li:digitalmediaAsset:C5604AQEMWf4Nl_mf2g",
"displayImage": "urn:li:digitalmediaAsset:C5616AQEoeGkp7U5GEA"
}
}
}
}
Birth Date
Edit the member's birth date: day, month and year. See here for more description on this object type.
Sample JSON request body to edit birthDate
:
{
"patch": {
"$set": {
"birthDate": {
"day": 1,
"month": 1,
"year": 1974
}
}
}
}
IMs
Edit the member's ims. See Im Fields for a description of the fields available within this object.
Sample request body to create an im
:
{
"patch": {
"$set": {
"ims": {
"bobsmith-linkedin": {
"id": "bobsmith-linkedin",
"provider": "GTalk"
}
}
}
}
}
To create, update or delete an im
, you will need to include all the other ims
as this API edits the whole ims
field instead of individual im
.
You will need to make sure the value of the top value on an im object matches the id
value in the same object. In addition, the provider
needs to be one of the following enums in the Im Fields above. Lastly, you can have up to 3 ims at one time.
Industry ID
Edit the member's industry. Requires a standardized referenced industry URN.
Sample JSON request body to edit industryId
:
{
"patch": {
"$set": {
"industryId": "urn:li:industry:47"
}
}
}
Location
New Location
Edit the member's current location. See geoLocation field for a description of the fields available within this object.
Sample JSON request body to edit geoLocation
:
{
"patch": {
"$set": {
"geoLocation": {
"geo": "urn:li:geo:123456789"
}
}
}
}
Legacy Location
Edit the member's current location. See location field for a description of the fields available within this object.
Sample JSON request body to edit location
:
{
"patch": {
"$set": {
"location": {
"countryCode": "us",
"postalCode": "94101",
"standardizedLocationUrn": "urn:li:standardizedLocationKey:(us,94101)"
}
}
}
}
Member Rich Contents
Edit the member's rich content summary. This field is an array of MemberRichContentUrn.
Sample JSON request body to edit memberRichContents
:
{
"patch": {
"$set": {
"memberRichContents": [
"urn:li:memberRichContent:(urn:li:person:yrZCpj2ZYQ,1586981719813)",
"urn:li:memberRichContent:(urn:li:person:yrZCpj2ZYQ,1586981706752)",
]
}
}
}
Phone Numbers
Edit the member's phone numbers. See Phone Number Fields for a description of the fields available within this object.
Sample JSON request body to edit phoneNumbers
:
{
"patch": {
"$set": {
"phoneNumbers": [
{
"number": "123-444-5555",
"type": "WORK"
},
{
"number": "(222) 333-4444",
"type": "HOME"
}
]
}
}
}
Profile Picture
Edit the member's profile photo. You will first need to register, then upload the profile picture image to LinkedIn and then update the member's profile with the image asset. We will walk through the following steps to update the profile picture:
- Register the profile picture image to be uploaded.
- Upload the profile picture image to LinkedIn.
- Update the member's profile.
Note
Background Picture and Profile Picture edit requires the w_compliance
permission
Register the Profile Picture Image
Send a POST request to the assets
API, with the action query parameter to registerUpload
. This will need to be done twice, once for the originalImage and once for the displayImage. You can use the same image for both fields. The only difference is in the "recipes" value.
POST https://api.linkedin.com/v2/assets?action=registerUpload
We will need to provide the member's Person URN. Additional recipes
and serviceRelationships
define the type of content we're publishing. See the request body below for reference.
Register the Profile Picture Original Image
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-originalphoto-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
A successful response will contain an uploadUrl
and asset
that you will need to save for the next steps.
{
"value": {
"uploadMechanism": {
"com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest": {
"headers": {},
"uploadUrl": "https://api.linkedin.com/mediaUpload/C5604AQETz3tP1vbVrA/profile-original-uploadedImage/0?ca=vector_profile&cn=uploads&m=AQIMP2H3hPHVQgAAAWhdrSbB12VmhiQ0V0e5P2gkANXgOa512YhoXwQHCA&app=5480656&sync=0&v=beta&ut=0VMl1rOvOtDoA1"
}
},
"mediaArtifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5604AQETz3tP1vbVrA,urn:li:digitalmediaMediaArtifactClass:profile-original-uploadedImage)",
"asset": "urn:li:digitalmediaAsset:C5604AQETz3tP1vbVrA"
}
}
Register the Profile Picture Display Image
{
"registerUploadRequest": {
"recipes": [
"urn:li:digitalmediaRecipe:profile-displayphoto-image"
],
"owner": "urn:li:person:ABCDEF",
"serviceRelationships": []
}
}
A successful response will contain an uploadUrl
and asset
that you will need to save for the next steps.
{
"value": {
"uploadMechanism": {
"com.linkedin.digitalmedia.uploading.MediaUploadHttpRequest": {
"headers": {},
"uploadUrl": "https://api.linkedin.com/mediaUpload/C5603AQEZ69UT8-eyQg/profile-uploadedImage/0?ca=vector_profile&cn=uploads&m=AQL93-s4C9ABlAAAAWhdsCVA1e4g-pLr25mZkiJf_Oj8yalEZyrBe7wBZg&app=5480656&sync=0&v=beta&ut=2zm8ziQVmwDoA1"
}
},
"mediaArtifact": "urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:C5603AQEZ69UT8-eyQg,urn:li:digitalmediaMediaArtifactClass:profile-uploadedImage)",
"asset": "urn:li:digitalmediaAsset:C5603AQEZ69UT8-eyQg"
}
}
Upload Image Binary File
Using the uploadUrl
returned from Step 1, upload your image to LinkedIn. To upload your image, send a PUT
request to the uploadUrl
with your image included as a binary file. The example below uses cURL to upload the image file.
Do this for both the originalImage and displayImage uploads. You can use the same image file for both fields, but use the upload url returned in the respective registerUpload response.
Sample Request
curl -i --upload-file /Users/peter/Desktop/superneatimage.png --header "Authorization: Bearer redacted" 'https://api.linkedin.com/mediaUpload/C5603AQEZ69UT8-eyQg/profile-uploadedImage/0?ca=vector_profile&cn=uploads&m=AQL93-s4C9ABlAAAAWhdsCVA1e4g-pLr25mZkiJf_Oj8yalEZyrBe7wBZg&app=5480656&sync=0&v=beta&ut=2zm8ziQVmwDoA1'
Update the profile with the Profile Picture
After the image file has successfully uploaded from Step 2, we will use the asset
from Step 1 to update the profile with the new profile picture.
Note
It is necessary and recommended to specify both the originalImage
and displayImage
fields in the profile update API call with the corresponding asset URNs. This is to avoid mismatches between the original and display images.
Sample Request Body
{
"patch": {
"profilePicture": {
"$set": {
"originalImage": "urn:li:digitalmediaAsset:C5604AQETz3tP1vbVrA",
"displayImage": "urn:li:digitalmediaAsset:C5603AQEZ69UT8-eyQg"
}
}
}
}
Selected Contact Interests
Edit the member's rich media summary. This field is an array of ContactInterests.
Sample JSON request body to edit selectedContactInterests
:
{
"patch": {
"$set": {
"selectedContactInterests": [
{
"predefinedInterest": "GRABBING_COFFEE"
},
{
"predefinedInterest": "INVESTING"
}
]
}
}
}
Supported Locales
Edit the member's supported locales. These locales determine the translations of the profile the member chose to create. This field is an array of Locale.
Sample JSON request body to edit supportedLocales
:
{
"patch": {
"$set": {
"supportedLocales": [
{
"country": "US",
"language": "en"
}
]
}
}
}
Vanity Name
Edit the member's vanity name. Vanity name is represented as a string and is used for the public profile URL (www.linkedin.com/in/{vanityName}
).
Note
Your custom URL must contain 3-100 letters or numbers. Please do not use spaces, symbols, or special characters.
Sample JSON request body to edit vanityName
:
{
"patch": {
"$set": {
"vanityName": "bobsmith"
}
}
}
Volunteering Interests
Edit the member's volunteering interests. See Volunteering Interest Fields for a description of the fields available within this object.
Sample JSON request body to edit volunteeringInterests
:
{
"patch": {
"$set": {
"volunteeringInterests": {
"supportedPredefinedCauses": [
"humanitarianRelief",
"politics",
"socialServices"
]
}
}
}
}
Websites
Edit the member's websites. This field is an array of Website.
Sample JSON request body to edit websites
:
{
"patch": {
"$set": {
"websites": [
{
"category": "OTHER",
"label": {
"localized": {
"en_US": "MY OTHER WEBSITE"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"url": {
"localized": {
"en_US": "http://www.linkedin-other.com"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
}
},
{
"category": "PERSONAL",
"url": {
"localized": {
"en_US": "http://www.linkedin-personal.com"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
}
}
]
}
}
}