---
title: "Update post content"
method: PUT
path: "/api/apps/{app_id}/virality/posts/{post_id}"
---

# Update post content

`PUT /api/apps/{app_id}/virality/posts/{post_id}`

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

Replaces a post's text with the text you supply, and returns the whole updated plan.

This is the plain-edit counterpart to [Refine a post](/api-reference/refine-a-post). It saves the text you send, calls no language model, and costs no credits. Only the post's `content` changes, so its image and every other post stay as they are.

<Note>The text is sanitized before it is stored, so what you read back can differ from what you sent. XML and HTML tags, code fences, and lines starting `system:`, `assistant:`, or `user:` are removed. Read `content` off the response rather than assuming your input was stored verbatim.</Note>

A 409 means repeated write conflicts on the plan did not settle, so retry the request. 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.</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>

## Path parameters

- `post_id` string, required — ID of the post, as returned in the content plan. Must be a UUID.
- `app_id` string, required — ID of the app.

## Request body

- UpdatePostPayload
  - `content` string, required — The post text to save, replacing whatever the post held before. Sanitized before it is stored, so XML or HTML tags, code fences, and lines starting `system:`, `assistant:`, or `user:` are removed.

## Response `200`

Successful Response

- ContentPlanResponse — The app's social content plan after the change.
  - `plan` ContentPlan
    - `id` string, nullable — ID of the content plan.
    - `app_id` string, nullable — ID of the app the plan belongs to.
    - `strategy` ContentStrategy
      - `app_summary` string, nullable — Short summary of what the app does.
      - `marketing_approach` string, nullable — The approach the content takes, extracted from the accepted strategy. Empty if the strategy text was empty when the plan was generated.
      - `platforms` PlatformContentPlan[] — One entry per platform you approved, in the order you sent them.
        - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'reddit' | 'facebook'
        - `mode` 'series' | 'selection'
        - `reasoning` string, nullable — Why the content for this platform takes the shape it does.
        - `posts` SocialPost[] — The generated posts for this platform.
          - `id` string, nullable — ID of the post. Pass it as `post_id` to [Refine a post](/api-reference/refine-a-post), [Update post content](/api-reference/update-post-content), and [Generate a post image](/api-reference/generate-a-post-image).
          - `platform` 'x' | 'instagram' | 'tiktok' | 'linkedin' | 'reddit' | 'facebook'
          - `angle` 'pain_point' | 'feature_demo' | 'social_proof' | 'trending_hook' | 'user_story' | 'before_after'
          - `angle_label` string, nullable — Human-readable label for the angle.
          - `post_number` integer, nullable — Position of this post within its platform's set, starting at 1.
          - `total_posts` integer, nullable — Number of posts generated for this platform.
          - `suggested_day` integer, nullable — Suggested day to publish on, counted from the start of the campaign.
          - `rationale` string, nullable — Why this post works for this platform and angle.
          - `content` string, nullable — The post text, ready to publish. Change it with [Update post content](/api-reference/update-post-content).
          - `image_url` string, nullable — URL of the post image, or `null` if no image was generated yet. Create one with [Generate a post image](/api-reference/generate-a-post-image).
          - `image_prompt` string, nullable — Prompt used to generate the post image, or `null` if the post has none.
          - `hashtags` string[], nullable — Suggested hashtags, without the leading `#`.
          - `post_title` string, nullable — Title for platforms that use one, such as Reddit and LinkedIn, or `null` elsewhere.
          - `suggested_subreddits` string[], nullable — Subreddits to consider for a Reddit post. Empty for other platforms.
          - `launch_comment` string, nullable — First comment to post under the main post, or `null` if none was generated.
          - `option_label` string, nullable — Label for this post when the platform's `mode` is `selection`, so you can tell the alternatives apart, or `null` in `series` mode.
          - `best_for_context` string, nullable — When to prefer this option over the others, or `null` if not applicable.
    - `created_at` string, nullable — Time the plan was created, as an ISO 8601 timestamp.
    - `updated_at` string, nullable — Time the plan last changed, as an ISO 8601 timestamp.

## Other responses

- `400` — The `post_id` is not a UUID.
- `401` — Missing or invalid credentials.
- `403` — You don't have editor access to this app, or you used a workspace API key.
- `404` — App not found, the app has no content plan, the post isn't in it, or the social content feature is not enabled for your account.
- `409` — Repeated write conflicts on this plan did not settle, or a content plan is currently generating. Retry the request.
- `422` — Validation Error
- `429` — Rate limit exceeded (15 requests per minute).
- `500` — Saving the post failed. Retry the request.

---

[API](https://skmtc.dev/adexad/apis/base44-app-management-api.md) · [All operations](https://skmtc.dev/adexad/apis/base44-app-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/adexad/base44-app-management-api/revisions/7f5ce8287501/schema)
