Users API
This guide will help you migrate the Users features of your application to API v2.
Methods changes
For each endpoint in the v1 API, here are the corresponding endpoints in the v2 API, along with the necessary modifications to achieve the same results.
Specifying the target accountThe
account_idparam, previously available either in the query params or in the body, is removed from all methods. Theaccount_idmust now be consistently included in the path params.
List all invitations sent
GET /v1/users/invite/sent
This endpoint is removed.
What to use insteadTo get a list of pending relation requests sent by the account owner, use
GET /v2/:account_id/users/me/relation-requestsList all pending Relation / Follow requests, specifyingsentin query paramtype.
List all invitations received
GET /v1/users/invite/received
This endpoint is removed.
What to use insteadTo get a list of pending relation requests received by the account owner, use
GET /v2/:account_id/users/me/relation-requestsList all pending Relation / Follow requests, specifyingreceivedin query paramtype.
Handle a received invitation
GET /v1/users/invite/received/:invitation_id
This endpoint is removed. All the body params are considered deprecated.
What to use insteadHere's how to handle invitations :
- To accept a relation request, use
GET /v2/:account_id/users/me/relation-requests/:request_id/acceptAccept a Relation request with the request ID.- To refuse a relation request, use
GET /v2/:account_id/users/me/relation-requests/:request_id/cancelCancel or Refuse a Relation / Follow request with the request ID.
Retrieve own profile
GET /v1/users/me
- Use
GET /v2/:account_id/users/user_idGet a User Profile withmeasuser_id. But be aware this route returns whole Social Profiles and work only with social providers. If you used Retrieve own profile in v1 to get informations about the owner of the connected account, you should now look at the Account object in Get Accounts Lists or Get an Account. - The response schema has changed (see UserProfile object changes).
Retrieve a profile
GET /v1/users/:user_id
- Use
GET /v2/:account_id/users/:user_idGet a User Profile. - Query param
linkedin_sectionsis renamed towith_sectionsand now makes it possible to gather the sections of all providers in one place. A prefixlinkedin_has been added to all sections specifically targeting LinkedIn. - The response schema has changed (see UserProfile object changes).
Edit own profile
POST /v1/users/me/edit
- Use
PATCH /v2/:account_id/users/:user_idUpdate a User Profile withmeasuser_id. - Body params
pictureandcover_picturehave changed. -
- Param
cover_pictureis renamed tobackground_picture. - Each param now takes an object with
filename,content_typeanddatain base64 encoding.
- Param
- Body param
locationnow expects a string instead of an object. - Body param
typeis removed. All provider specific fields are now located underspecifics[provider_name].
LinkedIn specifics
- Param
summaryis removed. Use parambiofrom the body root instead.- Param
picture_settingsis renamed topicture_options.- Param
cover_picture_settingsis renamed tobackground_picture_options.- Param
experiencehas changed.
- Param
roleis renamed tojob_titleand is now an object composed of the fieldsid(ID of the job) andtext(name of the job).- Param
companyis now an object composed of the fieldsid(ID of the company) andtext(name of the company).- Param
company_idis removed as it is now included in thecompanyobject.- Param
presenceis renamed toworkplace_type.- Param
skillsis now an array of objects composed of the fieldsid(ID of the skill) andtext(name of the skill).- Param
attachmenthas changed.
- For a file, provide an object with
filename,content_typeanddatain base64 encoding.- For a link, provide an object with
urland optionnallythumbnail.- Param
typeis removed.- Param
titleis removed. Useexperience.attachment_titleinstead.- Param
descriptionis removed. Useexperience.attachment_descriptioninstead.- Param
educationhas changed.
- Param
schoolis now an object composed of the fieldsid(ID of the school) andtext(name of the school).- Param
degreeis now an object composed of the fieldsid(ID of the degree) andtext(name of the degree).- Param
field_of_studyis now an object composed of the fieldsid(ID of the field) andtext(name of the field).- Param
skillsis now an array of objects composed of the fieldsid(ID of the skill) andtext(name of the skill).- Param
attachmenthas changed the same way as inexperience.
List all relations
GET /v1/users/relations
- Use
GET /v2/:account_id/users/:user_id/relationsList all User's Relations. - This endpoint can now be used to list any user's relations, not only the account owner's. To target the account owner, set
measuser_id. - The response schema has changed (see UserRelationsList object changes).
List all followed accounts
GET /v1/users/following
- Use
GET /v2/:account_id/users/:user_id/followingList Following of a User. - This endpoint can now be used to list any user's following, not only the account owner's. To target the account owner, set
measuser_id. - Query param
user_idis removed.- Specify the
user_idin the path params.
- Specify the
- Pagination may user either offset or cursor depending on the provider. Read our Integration guides to learn more.
- The response schema has changed (see UserRelationsList object changes).
List all followers
GET /v1/users/followers
- Use
GET /v2/:account_id/users/:user_id/followersList all User Followers. - This endpoint can now be used to list any user's followers, not only the account owner's. To target the account owner, set
measuser_id. - Query param
user_idis removed.- Specify the
user_idin the path params.
- Specify the
- Pagination may user either offset or cursor depending on the provider. Read our Integration guides to learn more.
- The response schema has changed (see UserFollowersList object changes).
Send an invitation
POST /v1/users/invite
- Use
POST /v2/{account_id}/users/me/relation-requestsSend a Relation request - Body param
provider_idis renamed touser_id. - Body param
user_emailis removed as it is not applicable in all cases.
Cancel an invitation
DELETE /v1/users/invite/sent/:invitation_id
- Use
POST /v2/:account_id/users/me/relation-requests/:request_id/cancelCancel or Refuse a Relation / Follow request. - Query param
invitation_idis removed.- Specify the
request_idin the path params.
- Specify the
List all posts
GET /v1/users/:identifier/posts
- Use
GET /v2/:account_id/users/:user_id/postsList all User's Posts. - Query param
account_idis now in the path params.
Response objects changes
InvitationSent/Received
InvitationSent and InvitationReceived objects has been replaced by a single RelationRequest object:
| v1 field | v2 mapping |
|---|---|
invited_user | user.display_name (sent requests only) |
invited_user_id | user.id (sent requests only) |
invited_user_public_id | user.public_identifier (sent requests only) |
invited_user_description | user.description (sent requests only) |
date | created_at |
parsed_datetime | Removed as not relevant. |
invitation_text | message |
inviter.inviter_name | user.display_name (received requests only) |
inviter.inviter_id | user.id (received requests only) |
inviter.inviter_public_identifier | user.public_identifier (received requests only) |
inviter.inviter_description | user.description (received requests only) |
specifics | Removed as no longer relevant. |
InvitationList
The InvitationList object does not exist anymore. List all pending Relation / Follow requests now returns:
- An array of RelationRequest objects as
data. - Property
cursoris renamed tonext_cursor.
UserProfile
| v1 field | v2 mapping |
|---|---|
provider_id | id |
headline | description |
summary | bio |
contact_info.emails | emails |
contact_info.phones | phone_numbers |
contact.adresses | addresses |
contact.socials | social_handles |
birthdate | birth_date |
creator_website | websites |
profile_picture_url | public_picture_url |
profile_picture_url_large | public_picture_url_large |
is_self | Removed as not relevant. |
follower_count | followers_count |
connections_count | relations_count |
shared_connections_count | shared_relations_count |
public_profile_url | profile_url |
Provider specifics changes
Provider-specific fields are now located within the
specificsobject.
LinkedIn
v1 field | v2 field |
|---|---|
|
|
| Removed as deprecated. |
| Replaced by |
|
|
| Removed as deprecated. |
|
|
| Changed to User object. |
|
|
|
|
|
|
| Moved + renamed to |
| Removed as not relevant. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Removed as not relevant. |
UserRelation
| UserRelation fields | User fields |
|---|---|
first_name | user.display_name |
last_name | user.display_name |
headline | user.description |
public_identifier | user.public_identifier |
public_profile_url | user.profile_url |
member_id | Removed. |
member_urn | Removed. |
connection_urn | Removed, use id instead. |
profile_picture_url | user.public_picture_url |
UserRelationsList
The UserRelationsList object does not exist anymore. List all User's Relations now returns:
- An array of UserRelation objects as
data. - Property
cursoris renamed tonext_cursor.
UserFollower object
The UserFollower object does not exist anymore. It is now a User object.
UserFollowersList
The UserFollowersList object does not exist anymore. List all User Followers now returns:
- An array of User objects as
data. - Property
cursoris renamed tonext_cursor.
Updated about 1 month ago