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

# Virality and social content

> Generate social content that promotes an app, then schedule and publish it

<Note>
  The Apps API is in beta. Its endpoints and responses may change.
</Note>

These endpoints cover two halves of one pipeline. The virality endpoints generate social content that promotes an app: Base44 reads the app, asks you a few questions about how you want to promote it, turns your answers into a content strategy, and writes a set of posts and images for each platform you approve. The social calendar endpoints then hold those posts, along with any you write yourself, and hand the ones you approve to the publisher.

## Prerequisites

* A personal API key. See [Authentication](/developers/references/apps-api/get-started/authentication) to get one.
* An app you can edit, and workspace credit quota for the endpoints that charge.

## App ID

Endpoints that act on a specific app include the app's ID in the URL path as `app_id`.

**To get your app ID:**

1. Go to [app.base44.com](https://app.base44.com/).
2. Open your app in the app editor.
3. Copy the app ID from the editor URL: `"https://app.base44.com/apps/<app_id>/editor"`.

## The flow

The endpoints run in order, and most of them fail with a 409 when the app has not reached the stage they need.

1. [Start social content flow](/api-reference/start-social-content-flow) analyzes the app and returns 2 or 3 questions.
2. [Submit answers](/api-reference/submit-answers) turns your answers into a content strategy.
3. [Refine content strategy](/api-reference/refine-content-strategy) rewrites that strategy from your feedback, as many times as you need.
4. [Generate content plan](/api-reference/generate-content-plan) writes the posts for every platform you approved.
5. [Refine a post](/api-reference/refine-a-post) and [Update post content](/api-reference/update-post-content) change a single post, and [Generate a post image](/api-reference/generate-a-post-image) makes its image.

[Get social content state](/api-reference/get-social-content-state) returns where the app is at any point. An app that never started the flow reports a `stage` of `idle` rather than a 404. [Reset social content flow](/api-reference/reset-social-content-flow) clears everything so you can start over.

<Warning>
  Refining the strategy discards the app's existing content plan, including every post and every generated image. Refine before you generate a plan, not after.
</Warning>

## From the calendar to a published post

[List scheduled posts](/api-reference/list-scheduled-posts) returns the whole calendar, so the posts a generated content plan produced sit alongside the ones you add with [Create scheduled post](/api-reference/create-scheduled-post).

A post moves through the calendar in three steps:

1. It starts as a `proposal`, which puts it on the calendar without publishing anything.
2. [Approve scheduled posts](/api-reference/approve-scheduled-posts) moves the ones you pick to `scheduled`. Approving is a selection rather than a publish, so one unusable ID never discards the rest.
3. [Start scheduling posts](/api-reference/start-scheduling-posts) hands the approved posts to the publisher, and each one goes out at its own scheduled time.

Scheduling runs in the background. The start call answers 202 with a `job_id`, and [Get scheduling job](/api-reference/get-scheduling-job) reports how it went. Poll it until `status` is `completed` or `failed`. Starting a second time for the same app fails with a 409 while the first is still starting.

<Note>
  Base44 can publish to Instagram and LinkedIn only. Posts generated for other platforms stay on the calendar for you to use elsewhere.
</Note>

## Generation is slow, and images finish later

[Generate content plan](/api-reference/generate-content-plan) runs the whole generation inline, one language model call per platform plus the first platform's images, so it can take **several minutes** with 3 platforms. Use a long client timeout.

Only the first platform's images are generated inline. Poll [Get social content state](/api-reference/get-social-content-state) after the call returns to pick up the remaining `image_url` values as they finish.

## Credits

Generating a content plan typically costs \~10 credits. Refining a post and generating an image cost \~1 credit each. Reading state, updating a post's text, starting the flow, and working on the strategy cost nothing. An endpoint that charges fails with a 402 when the workspace is out of quota, and a reset does not refund credits already spent.

## Rate limits

The social content endpoints share a limit of 15 requests per minute per app.
