Skip to main content

Pin a Facebook Page to a Profile

Connecting Facebook links a Meta account, which may manage several Pages. When a profile should always publish to one specific 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, scheduled posts and retries) goes to the pinned Page and you can omit facebook_page_id.

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

Precedence

A pinned Page takes precedence over the facebook_page_id parameter of the upload endpoints. To post to a different Page from the same profile, clear the pin first (DELETE) or use another profile. The daily Facebook cap (25 posts per rolling 24 hours) is applied per Page, so each Page has its own allowance no matter how many profiles or requests target it.

  • 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/facebook-page
ParameterTypeDescriptionRequired
profile_usernamestringThe profile's username (query parameter).Yes
  • Successful Response (200 OK)
{
"success": true,
"pages": [
{ "id": "109876543210987", "name": "My Business Page", "picture": "https://..." },
{ "id": "208765432109876", "name": "Travel Blog", "picture": "https://..." }
],
"selected_page_id": "109876543210987",
"selected_page_name": "My Business Page"
}

selected_page_id / selected_page_name are null when no Page is pinned. The same two fields are returned for each profile by User Profiles API and by validate-jwt.

Pin a Page

  • Method: POST
  • Endpoint: /api/uploadposts/users/facebook-page
  • Body (JSON):
FieldTypeDescriptionRequired
profile_usernamestringThe profile's username.Yes
facebook_page_idstringPage id from the pages list. Must belong to the account connected to this profile.Yes
curl -X POST https://api.upload-post.com/api/uploadposts/users/facebook-page \
-H "Authorization: Apikey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profile_username": "acme", "facebook_page_id": "109876543210987"}'
  • Successful Response (200 OK)
{
"success": true,
"facebook_page_id": "109876543210987",
"facebook_page_name": "My Business Page"
}

The Page name is taken from Facebook, never from the request. A facebook_page_id that the connected account cannot manage returns 400.

Clear the pin

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

After clearing, uploads fall back to the default behaviour: the facebook_page_id parameter, or auto-selection when the account manages exactly one Page.

Error Responses

StatusMeaning
400Missing profile_username / facebook_page_id, profile has no Facebook connected, or the Page is not accessible to that account.
404Profile not found.
502Facebook did not return the Page list (token expired — reconnect Facebook).