Set presence indicator

Learn how to set presence indicators on LinkedIn using Unipile API.

On most instant messaging services, users can choose their level of visibility to others. LinkedIn allows the following indicators :

  • online : The user is available to all.
  • restricted_online: The user is available to his/her relations only.
  • offline: The user is not available.

To set the presence indicator of the current user, use the Set Presence endpoint, specifying the appropriate indicator.

await messagingApi.setPresence({
  path: {
    account_id: "acc_123456789",
  },
  body: {
    presence: "offline",
  },
});
messaging_api.set_presence(
    "acc_123456789",
    {"presence": "offline"},
)
curl --request POST \
     --url https://api.unipile.com/v2/account_id/presence \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"presence":"offline"}'