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 account

The account_id param, previously available either in the query params or in the body, is removed from all methods. The account_id must now be consistently included in the path params.


List all invitations sent

GET /v1/users/invite/sent

This endpoint is removed.

👍

What to use instead

To get a list of pending relation requests sent by the account owner, use GET /v2/:account_id/users/me/relation-requests List all pending Relation / Follow requests, specifying sent in query param type.


List all invitations received

GET /v1/users/invite/received

This endpoint is removed.

👍

What to use instead

To get a list of pending relation requests received by the account owner, use GET /v2/:account_id/users/me/relation-requests List all pending Relation / Follow requests, specifying received in query param type.


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 instead

Here's how to handle invitations :


Retrieve own profile

GET /v1/users/me

  • Use GET /v2/:account_id/users/user_id Get a User Profile with me as user_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_id Get a User Profile.
  • Query param linkedin_sections is renamed to with_sections and now makes it possible to gather the sections of all providers in one place. A prefix linkedin_ 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_id Update a User Profile with me as user_id.
  • Body params picture and cover_picture have changed.
    • Param cover_picture is renamed to background_picture.
    • Each param now takes an object with filename, content_type and data in base64 encoding.
  • Body param location now expects a string instead of an object.
  • Body param type is removed. All provider specific fields are now located under specifics[provider_name].
📘

LinkedIn specifics

  • Param summary is removed. Use param bio from the body root instead.
  • Param picture_settings is renamed to picture_options.
  • Param cover_picture_settings is renamed to background_picture_options.
  • Param experience has changed.
    • Param role is renamed to job_title and is now an object composed of the fields id (ID of the job) and text (name of the job).
    • Param company is now an object composed of the fields id (ID of the company) and text (name of the company).
    • Param company_id is removed as it is now included in the company object.
    • Param presence is renamed to workplace_type.
    • Param skills is now an array of objects composed of the fields id (ID of the skill) and text (name of the skill).
    • Param attachment has changed.
      • For a file, provide an object with filename, content_type and data in base64 encoding.
      • For a link, provide an object with url and optionnally thumbnail.
      • Param type is removed.
      • Param title is removed. Use experience.attachment_title instead.
      • Param description is removed. Use experience.attachment_description instead.
  • Param education has changed.
    • Param school is now an object composed of the fields id (ID of the school) and text (name of the school).
    • Param degree is now an object composed of the fields id (ID of the degree) and text (name of the degree).
    • Param field_of_study is now an object composed of the fields id (ID of the field) and text (name of the field).
    • Param skills is now an array of objects composed of the fields id (ID of the skill) and text (name of the skill).
    • Param attachment has changed the same way as in experience.

List all relations

GET /v1/users/relations

  • Use GET /v2/:account_id/users/:user_id/relations List 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 me as user_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/following List 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 me as user_id.
  • Query param user_id is removed.
    • Specify the user_id in the path params.
  • 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/followers List 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 me as user_id.
  • Query param user_id is removed.
    • Specify the user_id in the path params.
  • 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-requests Send a Relation request
  • Body param provider_id is renamed to user_id.
  • Body param user_email is removed as it is not applicable in all cases.

Cancel an invitation

DELETE /v1/users/invite/sent/:invitation_id


List all posts

GET /v1/users/:identifier/posts

  • Use GET /v2/:account_id/users/:user_id/posts List all User's Posts.
  • Query param account_id is now in the path params.


Response objects changes

InvitationSent/Received

InvitationSent and InvitationReceived objects has been replaced by a single RelationRequest object:

v1 fieldv2 mapping
invited_useruser.display_name (sent requests only)
invited_user_iduser.id (sent requests only)
invited_user_public_iduser.public_identifier (sent requests only)
invited_user_descriptionuser.description (sent requests only)
datecreated_at
parsed_datetimeRemoved as not relevant.
invitation_textmessage
inviter.inviter_nameuser.display_name (received requests only)
inviter.inviter_iduser.id (received requests only)
inviter.inviter_public_identifieruser.public_identifier (received requests only)
inviter.inviter_descriptionuser.description (received requests only)
specificsRemoved 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 cursor is renamed to next_cursor.


UserProfile

v1 fieldv2 mapping
provider_idid
headlinedescription
summarybio
contact_info.emailsemails
contact_info.phonesphone_numbers
contact.adressesaddresses
contact.socialssocial_handles
birthdatebirth_date
creator_websitewebsites
profile_picture_urlpublic_picture_url
profile_picture_url_largepublic_picture_url_large
is_selfRemoved as not relevant.
follower_countfollowers_count
connections_countrelations_count
shared_connections_countshared_relations_count
public_profile_urlprofile_url

Provider specifics changes

📘

Provider-specific fields are now located within the specifics object.

LinkedIn

v1 field

v2 field

primary_locale

default_locale (changed to POSIX string format : language_COUNTRY, e.g., en_US, fr_FR, etc.)

hashtags

Removed as deprecated.

invitation

Replaced by relation_request which is a Relation Request object.

invitation.status

relation_request_status

hashtags

Removed as deprecated.

notes

recruiting_profile.notes

notes.author

Changed to User object.

tags

recruiting_profile.tags

recruiting_activity

recruiting_profile.events

recruiting_activity.updated_at

recruiting_profile.events.last_updated_at

recruiting_activity.updated_by

Moved + renamed to recruiting_profile.events.last_updated_by and changed to User object.

recruiting_activity.created_at
recruiting_activity.created_by

Removed as not relevant.

work_experience

experience

work_experience.position

experience.title

work_experience.company

experience.company.name

work_experience.company_id

experience.company.id

work_experience.company_url

experience.company.profile_url

work_experience.company_picture_url

experience.company.picture_url

work_experience.industry

experience.company.industries

work_experience.status

experience.employment_type

work_experience.start

experience.started_on

work_experience.end

experience.ended_on

volunteering_experience

volunteer_experience

volunteering_experience.company

volunteer_experience.organization.name

volunteering_experience.start

volunteer_experience.started_on

volunteering_experience.end

volunteer_experience.ended_on

projects.start

projects.started_on

projects.end

projects.ended_on

recommendations.received.actor
recommendations.given.actor

user (changed to User object)

education.school

education.school.name

education.school_id

education.school.id

education.school_url

education.school.profile_url

education.school_picture_url

education.school.picture_url

education.field_of_study

education.fields_of_study (changed to string array)

education.start

education.started_on

education.end

education.ended_on

languages.name

languages.language

certifications.name

certifications.title

certifications.organization

certifications.organization.name

certifications.url

certifications.url

work_experience_total_count
education_total_count
volunteering_experience_total_count
skills_total_count
languages_total_count
certifications_total_count
projects_total_count
recommendations.received_total_count
recommendations.given_total_count

Removed as not relevant.



UserRelation

UserRelation fieldsUser fields
first_nameuser.display_name
last_nameuser.display_name
headlineuser.description
public_identifieruser.public_identifier
public_profile_urluser.profile_url
member_idRemoved.
member_urnRemoved.
connection_urnRemoved, use id instead.
profile_picture_urluser.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 cursor is renamed to next_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 cursor is renamed to next_cursor.