> ## 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.

# Set social calendar automation

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

Updates how the app generates and publishes social posts.

- Automatic mode approves eligible generated posts and schedules publishing.
- Review-first mode replenishes suggestions, but you approve and schedule them.
- Manual mode stops replenishment and cancels posts that haven't started publishing.

When omitting `platforms`, generate a content plan first. Publishing modes require the Builder plan or higher.
Posts already being published can't be cancelled by switching modes.

Authenticate with a personal access token, or with a workspace API key, which acts as the
workspace owner. You need editor access to the app, and 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. Workspace multipliers can raise this limit.



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json put /api/apps/{app_id}/social-calendar/automation
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/automation:
    put:
      summary: Set social calendar automation
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Updates how the app generates and publishes social posts.


        - Automatic mode approves eligible generated posts and schedules
        publishing.

        - Review-first mode replenishes suggestions, but you approve and
        schedule them.

        - Manual mode stops replenishment and cancels posts that haven't started
        publishing.


        When omitting `platforms`, generate a content plan first. Publishing
        modes require the Builder plan or higher.

        Posts already being published can't be cancelled by switching modes.


        Authenticate with a personal access token, or with a workspace API key,
        which acts as the

        workspace owner. You need editor access to the app, and 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. Workspace multipliers
        can raise this limit.
      operationId: set_automation_api_api_apps__app_id__social_calendar_automation_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/AutomationSettingsPayload'
      responses:
        '200':
          description: The app's automation state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutomationChangeResponse'
              example:
                mode: manual
                platforms:
                  - linkedin
                timezone_name: America/New_York
                last_replenished_at: '2026-09-30T08:00:00Z'
                generating: false
                can_publish: true
                auto_approved: 0
                cancelled: 3
          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 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
        '402':
          description: >-
            `social_calendar_plan_limited`. Publishing needs the Builder plan or
            higher.
          content:
            application/json:
              examples:
                social_calendar_plan_limited:
                  summary: social_calendar_plan_limited
                  value:
                    error:
                      code: social_calendar_plan_limited
                      message: >-
                        Publishing scheduled posts requires the Builder plan or
                        higher.
                      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` without editor access to the app.
            `app_marketing_not_allowed` when the app's workspace has the FERPA
            designation, unless you're switching to manual mode to stop
            automation.
          content:
            application/json:
              examples:
                forbidden:
                  summary: forbidden
                  value:
                    error:
                      code: forbidden
                      message: You don't have editor access to this app.
                      details: {}
                app_marketing_not_allowed:
                  summary: app_marketing_not_allowed
                  value:
                    error:
                      code: app_marketing_not_allowed
                      message: >-
                        App advertising and social marketing are not available
                        for this app's workspace.
                      details:
                        capability: app_marketing
              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_no_plan` when there are no usable plan channels, so
            generate a plan or send `platforms`.
            `social_calendar_automation_busy` while another mode change is in
            progress, so read the current state before retrying.
          content:
            application/json:
              examples:
                social_calendar_no_plan:
                  summary: social_calendar_no_plan
                  value:
                    error:
                      code: social_calendar_no_plan
                      message: >-
                        Generate a content plan before choosing how posts go
                        out.
                      details: {}
                social_calendar_automation_busy:
                  summary: social_calendar_automation_busy
                  value:
                    error:
                      code: social_calendar_automation_busy
                      message: >-
                        Another publishing-mode change is in progress. Read the
                        current state before retrying.
                      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`. A required parameter is missing or invalid.'
          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. Retry after the interval in
                        Retry-After.
                      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: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    AutomationSettingsPayload:
      properties:
        mode:
          $ref: '#/components/schemas/SocialCalendarAutomationMode'
          description: >-
            Choose `auto` to approve and publish automatically, `semi_auto` to
            review before scheduling, or `manual` to publish yourself.
          example: manual
        timezone_name:
          type: string
          maxLength: 64
          title: Timezone Name
          description: IANA time zone to use for future publishing schedules.
          example: America/New_York
        platforms:
          anyOf:
            - items:
                $ref: '#/components/schemas/Platform'
              type: array
              maxItems: 6
              minItems: 1
            - type: 'null'
          title: Platforms
          description: >-
            Channels to use. Defaults to the current plan's channels when
            omitted or null. Publishing modes accept `instagram`, `linkedin` and
            `facebook`. Manual mode also accepts `x`, `tiktok` and `reddit`.
          example:
            - linkedin
      additionalProperties: false
      type: object
      required:
        - mode
        - timezone_name
      title: AutomationSettingsPayload
    AutomationChangeResponse:
      properties:
        mode:
          anyOf:
            - $ref: '#/components/schemas/SocialCalendarAutomationMode'
            - type: 'null'
          description: >-
            Publishing mode. Either `auto`, `semi_auto` or `manual`, or `null`
            before a mode is chosen.
          example: manual
        platforms:
          items:
            $ref: '#/components/schemas/Platform'
          type: array
          title: Platforms
          description: >-
            Configured channels. Values are `instagram`, `linkedin`, `facebook`,
            `x`, `tiktok` or `reddit`. Defaults to an empty list before
            configuration.
          example:
            - linkedin
        timezone_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Timezone Name
          description: >-
            IANA time zone used for the publishing schedule, or `null` before
            configuration.
          example: America/New_York
        next_replenishment_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Next Replenishment At
          description: >-
            Next planned generation as a UTC timestamp in ISO 8601 format, or
            `null` in manual mode or before configuration.
          example: '2026-10-01T08:00:00Z'
        last_replenished_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Replenished At
          description: >-
            Last completed generation as a UTC timestamp in ISO 8601 format, or
            `null` if no generation has completed.
          example: '2026-09-30T08:00:00Z'
        last_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error
          description: >-
            Most recent generation failure, or `null` when no failure is stored.
            The value `insufficient_credits` means the workspace needs more
            integration credits.
          example: insufficient_credits
        publish_dry_run:
          type: boolean
          title: Publish Dry Run
          description: >-
            Whether automatically approved posts use simulated publishing in a
            test environment.
          default: false
          example: false
        generating:
          type: boolean
          title: Generating
          description: >-
            Reports `true` while a generation run holds an active claim and
            `false` otherwise. Defaults to `false` before configuration.
          default: false
          example: true
        can_publish:
          type: boolean
          title: Can Publish
          description: >-
            Whether the workspace's plan lets Base44 publish posts. When
            `false`, choosing `auto` or `semi_auto` fails with
            `social_calendar_plan_limited` and scheduled posts stay
            `not_materialized_plan_limit`; `manual` stays available.
          example: true
        auto_approved:
          type: integer
          title: Auto Approved
          description: >-
            Number of proposals approved by this change. Defaults to zero when
            none were approved.
          default: 0
          example: 3
        cancelled:
          type: integer
          title: Cancelled
          description: >-
            Number of pending posts cancelled by this change. Defaults to zero
            when none were cancelled.
          default: 0
          example: 2
        materialization_job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Materialization Job Id
          description: >-
            Scheduling job identifier, or `null` when no scheduling job was
            started. Use it with Get scheduling job.
          example: 6886b8d390dc7e2f4a2c91b3
      type: object
      required:
        - can_publish
      title: AutomationChangeResponse
      description: Automation settings and the effects of changing them.
    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.
    SocialCalendarAutomationMode:
      type: string
      enum:
        - auto
        - semi_auto
        - manual
      title: SocialCalendarAutomationMode
      description: >-
        How much of the calendar the app runs on its own.


        ``AUTO`` generates, approves and publishes unattended; ``SEMI_AUTO``
        generates

        and waits for the user to approve; ``MANUAL`` generates only when asked
        and

        publishes nothing.
    Platform:
      type: string
      enum:
        - x
        - instagram
        - tiktok
        - linkedin
        - reddit
        - facebook
      title: Platform
    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

- [Automations](https://docs.base44.com/developers/backend/resources/backend-functions/automations.md)
- [Get social calendar automation](https://docs.base44.com/api-reference/get-social-calendar-automation.md)
- [Generate more social calendar posts](https://docs.base44.com/api-reference/generate-more-social-calendar-posts.md)
- [Choose the social calendar Facebook Page](https://docs.base44.com/api-reference/choose-the-social-calendar-facebook-page.md)
- [Update scheduled post](https://docs.base44.com/api-reference/update-scheduled-post.md)


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