Create branch
Changed on<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>
Creates a branch of the app from its main branch. The branch has its own copy of the app's code, so its changes don't reach main until you merge the branch.
Set branch_name to name the branch, or send prompt and Base44 generates a short name from it. prompt only names the branch. It isn't sent to the AI. When a generated name is taken, Base44 adds a number to it. A branch_name you choose must not belong to another active or merged branch.
The branch starts from main's latest saved state. If the AI is working on main at the time, the branch starts from main as it was before that change. Set from_message_id to start from an earlier point instead. Send at least one of branch_name, prompt, and from_message_id.
Branches are created from main only. Sending a branch_id returns a 409 with extra_data.reason set to create_branch_requires_main_scope.
In this response, created_by_name is always null. Get branch returns it.
This endpoint is limited to 30 requests per minute, shared with Create branch, Delete branch and Merge branch.
<Note>A branch gets changes of its own from chat messages sent to it: pass the branch's id as branch_id to Send chat message. Until it has some, Merge branch refuses it with a 409.</Note>
<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app. A read-only key is refused, and workspace API keys are not accepted.</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>
Request
- Base URLhttps://app.base44.com
- URLhttps://app.base44.com/api/apps/{app_id}/branches
- AuthHTTP bearer
Path parameters
ID of the app to create the branch in.
Query parameters
ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.
Request body
Example request
{
"branch_name": "add-contact-form",
"prompt": "Add a contact form to the home page",
"from_message_id": "7f3a1c88-52d4-4a0e-9b31-2c6f0d8e4a19"
}Response
The new branch.
Example response
{
"id": "68f1a2b3c4d5e6f708192a3b",
"app_id": "6820f3a4e7b91d003c45a1f2",
"branch_name": "add-contact-form",
"status": "active",
"run_state": {
"state": "ready",
"details": "Restoring checkpoint",
"last_updated_date": "2026-09-28T10:18:40"
},
"code_state": "changed",
"base_checkpoint_id": "6886b8d390dc7e2f4a2c91b3",
"session_id": "6820f3a4e7b91d003c45a1f9",
"created_by_id": "68a0c1d2e3f4a5b6c7d8e9f0",
"created_by_name": "Jane Doe",
"created_date": "2026-09-28T10:15:00",
"merged_at": "2026-09-29T08:02:11",
"merged_by_id": "68a0c1d2e3f4a5b6c7d8e9f0",
"static_preview_url": "https://preview--6820f3a4e7b91d003c45a1f2--b-d8c647b.base44.app"
}Changes
- info
added the required property
to the response with the status
- info
- info
added the new optional
queryrequest parameterbranch_id
- info