> ## Documentation Index
> Fetch the complete documentation index at: https://docs.base44.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Choose the social calendar Facebook Page

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Sets the Facebook Page the app's Facebook posts publish to, and returns the readiness after the change.

Send one of `facebook_pages[].id` from
[Get social calendar publish readiness](/api-reference/get-social-calendar-publish-readiness).
Posts that were waiting for the choice (`needs_reconnect`) are handed back to the publisher, so
run [Start scheduling posts](/api-reference/start-scheduling-posts) again for any that should go out.
Choosing another Page later moves future posts to it; posts already published stay where they are.

Authenticate with a user bearer token or a personal API key. You need editor access to the app.
Social calendar access must be enabled for your account. This API is in developer preview (beta).

Responses include `X-Request-Id`. Once authentication passes, rate-limit responses include
`X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix seconds).
Wait for `Retry-After` before retrying a rate-limited request.

Shares a base limit of 20 requests per minute per requester and app with creating, editing, deleting and approving posts.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json put /api/apps/{app_id}/social-calendar/publish-readiness/facebook-page
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/social-calendar/publish-readiness/facebook-page:
    put:
      summary: Choose the social calendar Facebook Page
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Sets the Facebook Page the app's Facebook posts publish to, and returns
        the readiness after the change.


        Send one of `facebook_pages[].id` from

        [Get social calendar publish
        readiness](/api-reference/get-social-calendar-publish-readiness).

        Posts that were waiting for the choice (`needs_reconnect`) are handed
        back to the publisher, so

        run [Start scheduling posts](/api-reference/start-scheduling-posts)
        again for any that should go out.

        Choosing another Page later moves future posts to it; posts already
        published stay where they are.


        Authenticate with a user bearer token or a personal API key. You need
        editor access to the app.

        Social calendar access must be enabled for your account. This API is in
        developer preview (beta).


        Responses include `X-Request-Id`. Once authentication passes, rate-limit
        responses include

        `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`
        (Unix seconds).

        Wait for `Retry-After` before retrying a rate-limited request.


        Shares a base limit of 20 requests per minute per requester and app with
        creating, editing, deleting and approving posts.
      operationId: >-
        choose_facebook_page_api_api_apps__app_id__social_calendar_publish_readiness_facebook_page_put
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app whose social calendar you want.
            title: App Id
          description: ID of the app whose social calendar you want.
          example: 6820f3a4e7b91d003c45a1f2
        - name: X-Active-Branch-Id
          in: header
          required: false
          schema:
            type: string
            description: >-
              ID of the branch the editor shows. Used when `branch_id` is
              omitted, for users who work on protected-main branches.
            title: X-Active-Branch-Id
          description: >-
            ID of the branch the editor shows. Used when `branch_id` is omitted,
            for users who work on protected-main branches.
          example: 68f1a2b3c4d5e6f708192a3b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FacebookPagePayload'
      responses:
        '200':
          description: The publish readiness with the chosen Page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublishReadinessResponse'
              example:
                facebook_page_missing: false
                facebook_pages:
                  - id: '110494725341826'
                    name: Blue Bottle Coffee
                  - id: '204918334512077'
                    name: Blue Bottle Roasters
                facebook_page_id: '110494725341826'
                facebook_page_needs_choice: false
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '401':
          description: '`unauthenticated`. Missing or invalid user credentials.'
          content:
            application/json:
              examples:
                unauthenticated:
                  summary: unauthenticated
                  value:
                    error:
                      code: unauthenticated
                      message: Authentication required
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '403':
          description: '`forbidden`. You don''t have editor access to the app.'
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    error:
                      code: forbidden
                      message: You don't have editor access to this app.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '404':
          description: >-
            `not_found`. The app doesn't exist, or social calendar access isn't
            enabled.
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    error:
                      code: not_found
                      message: Not found
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '409':
          description: >-
            `social_calendar_facebook_page_unavailable`. The Page isn't shared
            with Base44 anymore; read the readiness and choose again.
          content:
            application/json:
              examples:
                social_calendar_facebook_page_unavailable:
                  summary: social_calendar_facebook_page_unavailable
                  value:
                    error:
                      code: social_calendar_facebook_page_unavailable
                      message: >-
                        That Page isn't shared with Base44 anymore. Reload and
                        choose again.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '422':
          description: '`invalid_request`. `page_id` is missing or isn''t a numeric Page ID.'
          content:
            application/json:
              examples:
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      message: Invalid request
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
        '429':
          description: '`rate_limited`. Wait for the interval in `Retry-After`.'
          content:
            application/json:
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    error:
                      code: rate_limited
                      message: Rate limit exceeded.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
        '503':
          description: >-
            `social_calendar_facebook_unavailable`. Facebook didn't respond. Try
            again in a moment.
          content:
            application/json:
              examples:
                social_calendar_facebook_unavailable:
                  summary: social_calendar_facebook_unavailable
                  value:
                    error:
                      code: social_calendar_facebook_unavailable
                      message: Facebook didn't respond. Try again in a moment.
                      details: {}
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
          headers:
            X-Request-Id:
              description: Request identifier for support.
              schema:
                type: string
            X-RateLimit-Limit:
              description: Effective request limit for this window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in this window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: Window reset time in Unix seconds.
              schema:
                type: integer
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    FacebookPagePayload:
      properties:
        page_id:
          type: string
          pattern: ^[0-9]{1,32}$
          title: Page Id
          description: One of `facebook_pages[].id` from the publish readiness.
          example: '110494725341826'
      additionalProperties: false
      type: object
      required:
        - page_id
      title: FacebookPagePayload
    PublishReadinessResponse:
      properties:
        facebook_page_missing:
          type: boolean
          title: Facebook Page Missing
          description: >-
            Whether Facebook is connected but shares no Page, so Facebook posts
            can't publish until the account is reconnected with a Page chosen.
          example: false
        facebook_pages:
          items:
            $ref: '#/components/schemas/FacebookPageOut'
          type: array
          title: Facebook Pages
          description: >-
            Pages the Facebook connection shares with Base44. Empty when
            Facebook isn't connected.
        facebook_page_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Facebook Page Id
          description: >-
            The Page Facebook posts publish to, or `null` when no Page is
            chosen, the chosen Page is no longer shared, or the Pages couldn't
            be read.
          example: '110494725341826'
        facebook_page_needs_choice:
          type: boolean
          title: Facebook Page Needs Choice
          description: >-
            Whether Facebook posts wait until someone chooses one of
            `facebook_pages`: several are shared and none is chosen, or the
            chosen Page is no longer shared.
          default: false
          example: false
      type: object
      required:
        - facebook_page_missing
      title: PublishReadinessResponse
      description: >-
        Connected accounts Base44 still can't publish to, and the Facebook Page
        posts go to.
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    FacebookPageOut:
      properties:
        id:
          type: string
          title: Id
          description: Facebook Page ID.
          example: '110494725341826'
        name:
          type: string
          title: Name
          description: Page name as Facebook shows it.
          example: Blue Bottle Coffee
      type: object
      required:
        - id
        - name
      title: FacebookPageOut
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

## Related topics

- [Promoting your app on social media](https://docs.base44.com/promoting-your-app/social-content.md)
- [Get social calendar publish readiness](https://docs.base44.com/api-reference/get-social-calendar-publish-readiness.md)
- [Optimizing your app's SEO & GEO](https://docs.base44.com/Performance-and-SEO/checking-your-seo-and-geo.md)
- [Managing login and registration](https://docs.base44.com/Setting-up-your-app/Managing-login-and-registration.md)
- [Getting your app found in search](https://docs.base44.com/Performance-and-SEO/SEO-and-search-visibility.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.