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

Rewrites a single post in the content plan according to your request, and returns the whole updated plan.

Take post_id from a post in the plan. Only that post changes. Every other post is returned unchanged. To replace a post's text yourself instead of having it rewritten, use Update post content.

For a generated calendar post, pass its source_post_id as post_id and its id as scheduled_post_id. This also supports replenished posts absent from the original plan. The response still contains the original plan; reload List scheduled posts to read the edited row. A 404 (social_calendar_post_not_found) means the row does not match this app and source post. A 409 (social_calendar_post_not_editable or social_calendar_post_changed) means the row cannot be edited or changed during generation; reload it before retrying.

This request costs 1 credit and fails with a 402 when the workspace is out of quota. It calls a language model, so expect it to take a few seconds.

<Warning>Editing the same post while a refinement is in flight discards the refinement, and the request fails with a 409. Retrying is the right response, but check the post's current content first, because your edit is the version that survived. The same 409 also covers repeated write conflicts on the plan that did not settle.</Warning>

This endpoint shares a limit of 15 requests per minute with the other social content endpoints.

<Note>This endpoint accepts a personal API key. Workspace API keys are not authorized for it and are rejected with a 403. New social content generation and edits also return 403 with code app_marketing_not_allowed when the app's owning workspace has the FERPA designation. Historical reads and resetting the plan remain available.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>

post/api/apps/{app_id}/virality/posts/{post_id}/refine

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/apps/{app_id}/virality/posts/{post_id}/refine
  • Auth: HTTP bearer

Path parameters

post_idstring required

ID of the post, as returned in the content plan. Must be a UUID.

app_idstring required

ID of the app.

Request body

scheduled_post_idstring nullable

Optional calendar post ID from List scheduled posts. Its source_post_id must match the post_id in the URL. Updates the calendar row rather than the original plan; requires Social Calendar V2. Only proposal and scheduled posts can be edited.

requeststring required

What to change about the post, in your own words. Can't be empty.

Example request

{
  "scheduled_post_id": "6820f3a4e7b91d003c45a1f2",
  "request": "Make it shorter and drop the emoji."
}

Response

Successful Response

Example response

{
  "plan": {
    "id": "8c1f9a2e-3b7d-4c5e-9f01-2a3b4c5d6e7f",
    "app_id": "6820f3a4e7b91d003c45a1f2",
    "strategy": {
      "app_summary": "A CRM for freelancers who want to track leads without a spreadsheet.",
      "marketing_approach": "Lead with the spreadsheet pain, then show the app solving it.",
      "platforms": [
        {
          "reasoning": "Instagram rewards a consistent series, so these build on each other.",
          "posts": [
            {
              "id": "3f2504e0-4f89-11d3-9a0c-0305e82c3301",
              "angle_label": "Pain point",
              "post_number": 1,
              "total_posts": 5,
              "suggested_day": 1,
              "rationale": "Opens on the spreadsheet frustration the audience already has.",
              "content": "Still tracking leads in a spreadsheet? I built the thing I wanted instead.",
              "image_url": "https://storage.base44.com/virality/3f2504e0.png",
              "image_prompt": "A freelancer closing a laptop at a tidy desk, warm morning light",
              "hashtags": [
                "freelance",
                "buildinpublic"
              ],
              "post_title": "I built a CRM because spreadsheets kept losing my leads",
              "suggested_subreddits": [
                "r/freelance",
                "r/SideProject"
              ],
              "launch_comment": "Happy to answer questions about how it works.",
              "option_label": "Direct and personal",
              "best_for_context": "Best if your audience already knows you"
            }
          ]
        }
      ]
    },
    "created_at": "2026-08-24T09:15:00+00:00",
    "updated_at": "2026-08-24T10:02:00+00:00"
  }
}

Changes