Edit and resend

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

Replaces an earlier user message and rebuilds from there. Base44 rolls the app back to just before that message, then runs your new one in its place.

Use it to reword a request that took the AI in the wrong direction, instead of piling a correction on top. Everything the AI did from message_id onwards is undone first, so those changes are gone. To keep them, send a new message with Send chat message instead.

The request stays open until the new turn settles, so it can take several minutes. It consumes credits like any other turn.

Set an X-Request-ID header before you send. A network retry carrying the same value is ignored rather than run a second time and charged again.

A 200 response does not mean the turn succeeded. Two cases come back as a 200.

  • The turn ran and finished. status.state is ready and the app is idle again.
  • The turn ran and failed. status.state is error, and status.error_source says where it failed. A value of paywall means the app's workspace has no credits left.

<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}/chat/edit-and-resend

Path parameters

app_idstring required

ID of the app whose AI chat this request acts on.

ID of the app whose AI chat this request acts on.

Request body

message_idstring required

ID of the message you are replacing. Everything from this message onwards is undone before the new one is sent.

contentstring required

What to send instead. Up to 100,000 characters.

file_urlsstring[]

Publicly reachable URLs of files to attach to the new message. Base44 downloads each file, so a URL has to resolve without credentials.

Example request

{
  "message_id": "7f3a1c88-52d4-4a0e-9b31-2c6f0d8e4a19",
  "content": "Add a contact form to the home page, with a phone field",
  "file_urls": [
    "https://example.com/mockup.png"
  ]
}

Response

Successful Response

idstring nullable

ID of the app.

namestring nullable

Display name of the app.

Example response

{
  "id": "6820f3a4e7b91d003c45a1f2",
  "name": "My CRM",
  "status": {
    "state": "ready",
    "details": "Publishing app",
    "request_id": "a1b2c3d4e5f67890abcdef12",
    "last_updated_date": "2026-08-02T14:30:00Z",
    "error_source": "build",
    "paywall_context": {
      "billing_organization_id": "67e0b12c4d8a3f005b21c9e4",
      "user_id": "6706af53b9c1e2004a37d85f",
      "evaluated_at": "2026-08-02T14:30:00Z"
    }
  },
  "conversation": {
    "id": "1f0c2b7a-9d51-4c3e-8a62-7b4d5e6f8a90",
    "messages": [
      {
        "id": "7f3a1c88-52d4-4a0e-9b31-2c6f0d8e4a19",
        "role": "assistant",
        "content": "I added a contact form to the home page.",
        "file_urls": [
          "https://example.com/mockup.png"
        ],
        "checkpoint_id": "6886b8d390dc7e2f4a2c91b3",
        "tool_calls": [
          {
            "id": "toolu_01A9FJd3kP2mNqRs7VwXyZ4b",
            "name": "create_file",
            "status": "waiting_for_user_input",
            "requires_user_input": true
          }
        ],
        "usage": {
          "prompt_tokens": 18432,
          "completion_tokens": 742,
          "credits_charged": 1.5
        },
        "metadata": {
          "created_date": "2026-08-02T14:30:00",
          "created_by_email": "developer@example.com"
        }
      }
    ]
  }
}

Changes

Changed in 2 of the 11 revisions of this API.12

  • 394136a6cdd411See the full diff
    • removed the media type application/json for the response with the status 422

      response-media-type-removed

    • added the non-success response with the status 503

      response-non-success-status-added

    • endpoint added

      endpoint-added