---
title: "Set Facebook Page"
method: PATCH
path: "/v2/credentials/{credential_id}/facebook-page"
tags: ["Credentials v2"]
---

# Set Facebook Page

`PATCH /v2/credentials/{credential_id}/facebook-page`

## Request

- Base URL: `https://api.jubjubapp.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jubjubapp.com/v2/credentials/{credential_id}/facebook-page`
- Auth: HTTP bearer

Choose the Page this Facebook connection publishes to.

The Graph API publishes to a Page, never to the account, and an account
may manage several. Until this route existed the callback kept whichever
Page Meta listed first and nothing could change it. The choice is checked
against Meta live: `page_id` must be a Page the account manages NOW, not
one the client remembered.

OWNER ONLY. A team member publishing through a shared credential can read
the list (GET facebook-pages, with ?team_id) but not move the owner's
connection to another Page.

Applies forward to every config created from now on
(platform_config_routes._seed_connection_settings), and fills the Page
into this credential's existing Facebook configs that carry none, which
is what an INCOMPLETE Facebook destination needed to become READY.
Configs that already name a Page are left alone: that was a choice.

## Path parameters

- `credential_id` string, required

## Headers

- `Authorization` string
- `X-JubJub-Service-Key` string
- `X-JubJub-Agent-Key` string
- `X-JubJub-Platform-Key` string
- `Origin` string
- `Referer` string
- `X-JubJub-Trial-Token` string

## Request body

- SetFacebookPageRequest: Choose the Page a Facebook connection publishes to.
  - `page_id` string, required: A page_id from GET /{credential_id}/facebook-pages

## Response `200`

Successful Response

- CredentialResponse: Full credential response (without sensitive token data). Tokens are NEVER exposed - only metadata about the credential.
  - `credential_id` string, required
  - `profile_id` string, required
  - `platform` string, required
  - `account_name` string, required
  - `account_username` string, nullable, required
  - `account_id` string, required
  - `nickname` string, nullable, required
  - `account_label` string, nullable
  - `display_name` string, required: Best display name (nickname > account_name > account_username)
  - `status` string, required
  - `is_active` boolean, required
  - `needs_reauth` boolean, required
  - `token_expires_at` string, date-time, nullable, required
  - `has_refresh_token` boolean, required
  - `token_valid` boolean, nullable: Result of live token validation against the platform API. None if not checked.
  - `last_checked_at` string, date-time, nullable
  - `last_check_source` string, nullable
  - `last_check_outcome` string, nullable: alive | dead | undetermined
  - `last_check_detail` string, nullable
  - `tokenise_destination_set` boolean: True once a destination has been chosen for this channel.
  - `tokenise_team_id` string, nullable: Team the channel's imports tokenise to; null for solo.
  - `tokenise_destination_mode` string, nullable: 'team', 'solo', or null when no destination has been set.
  - `facebook_page_id` string, nullable
  - `facebook_page_name` string, nullable
  - `facebook_pages` FacebookPageSummary[], nullable
    - `page_id` string, required
    - `name` string, required
  - `granted_scopes` string[], nullable
  - `reconnect_required` object, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, nullable, required
  - `last_used_at` string, date-time, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jubjubapp/apis/jubjub-api.md) - [All operations](https://skmtc.dev/jubjubapp/apis/jubjub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jubjubapp/apis/jubjub-api/revisions/353157b296f2?raw)
