Skip to main content

Pin a LinkedIn Page to a Profile

Connecting LinkedIn links a member account, which may administer several company Pages. LinkedIn shows no chooser during the OAuth flow, so by default every upload goes to the personal profile unless target_linkedin_page_id is sent. When a profile should always post as one company Page — the usual case when each of your customers or brands has its own profile — pin that Page to the profile once. From then on every upload from that profile (video, photos, text, documents, scheduled posts and retries) is published as the pinned Page and you can omit target_linkedin_page_id.

The same selection is available in the dashboard (User Management → LinkedIn card) and in the white-label connect page, so end users can pick their Page themselves right after connecting.

Precedence

A pinned Page takes precedence over the target_linkedin_page_id parameter of the upload endpoints, exactly like the Facebook Page pin. To post to the personal profile or another Page from the same profile, clear the pin first (DELETE) or use another profile.

  • Authentication: any of
    • Authorization: Apikey <YOUR_API_KEY> (API key)
    • Authorization: Bearer <user JWT> (dashboard session)
    • the profile-scoped JWT issued for the connect page (see User Profiles API)

Get available Pages and the current pin

  • Method: GET
  • Endpoint: /api/uploadposts/users/linkedin-page
ParameterTypeDescriptionRequired
profile_usernamestringThe profile's username (query parameter).Yes
  • Successful Response (200 OK)
{
"success": true,
"pages": [
{
"id": "urn:li:organization:123456",
"name": "Acme Inc",
"picture": "https://media.licdn.com/...",
"vanityName": "acme-inc",
"followers": 1480,
"account_id": "linkedin-account-key"
}
],
"selected_page_id": "urn:li:organization:123456",
"selected_page_name": "Acme Inc"
}

pages is the same list returned by Get LinkedIn Pages for that profile. selected_page_id / selected_page_name are null when no Page is pinned (posts go to the personal profile). The same two fields are returned for each profile by the User Profiles API and by validate-jwt.

Pin a Page

  • Method: POST
  • Endpoint: /api/uploadposts/users/linkedin-page
  • Body (JSON):
FieldTypeDescriptionRequired
profile_usernamestringThe profile's username.Yes
linkedin_page_idstringPage id from the pages list (urn:li:organization:123456) or just the numeric id (123456). Must be administered by the account connected to this profile.Yes
curl -X POST https://api.upload-post.com/api/uploadposts/users/linkedin-page \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profile_username": "acme", "linkedin_page_id": "urn:li:organization:123456"}'
  • Successful Response (200 OK)
{
"success": true,
"linkedin_page_id": "urn:li:organization:123456",
"linkedin_page_name": "Acme Inc"
}

The Page name is taken from LinkedIn, never from the request. A linkedin_page_id that the connected account does not administer returns 400.

Clear the pin

  • Method: DELETE
  • Endpoint: /api/uploadposts/users/linkedin-page
  • Body (JSON): {"profile_username": "acme"}

After clearing, uploads fall back to the default behaviour: the target_linkedin_page_id parameter, or the personal profile when it is omitted.

Error Responses

StatusMeaning
400Missing profile_username / linkedin_page_id, profile has no LinkedIn connected, token unavailable, or the Page is not administered by that account.
404Profile not found.