Skip to main content
POST
Create branch

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>. Each operation lists the permission it needs: read_only or full_access. A full-access token can call every operation. A read-only token can call only the operations that list read_only; anything else returns 403 read_only_credential_route_not_allowed.

Scopes

full_access
PersonalAccessTokenAuth
full_access
WorkspaceApiKeyAuth
full_access
WorkspaceApiKeyBearerAuth

Path Parameters

app_id
string
required

ID of the app to create the branch in.

Query Parameters

branch_id
string

ID of the branch to work on, as returned by List branches. Omit it to work on the app's main branch.

Body

application/json

The new branch's name, or text to name it from.

branch_name
string | null

Name of the branch. It starts with a letter or digit and contains only letters, digits, ., _, / and -. It can't contain .. or //, end with / or ., start with b44/, or be main, and no part between slashes can start with . or end with .lock. Leave it out to have Base44 name the branch from prompt.

Required string length: 1 - 100
Example:

"add-contact-form"

prompt
string | null

Text to name the branch from when you leave out branch_name. Base44 generates a short name from it. An empty string names the branch after your first name and today's date.

Example:

"Add a contact form to the home page"

from_message_id
string | null

ID of a message in main's conversation, from Read conversation messages. The branch starts from the app as it was when that message was sent, instead of from main's latest state. Without branch_name, the branch is named after the last user message before that one, and prompt is ignored.

Maximum string length: 64
Example:

"7f3a1c88-52d4-4a0e-9b31-2c6f0d8e4a19"

is_private
boolean
default:false

Make the branch visible only to you. Other collaborators can't list, open or join it. Once merged, its changes appear on main as usual. Not available for apps imported from GitHub.

Example:

true

Response

The new branch.

A branch of an app.

id
string
required

ID of the branch.

Example:

"68f1a2b3c4d5e6f708192a3b"

app_id
string
required

ID of the app the branch belongs to.

Example:

"6820f3a4e7b91d003c45a1f2"

branch_name
string
required

Name of the branch.

Example:

"add-contact-form"

status
enum<string>
required

active while the branch can still be worked on, merged once it was merged into main, and deleted once it was deleted.

Available options:
active,
merged,
deleted
Example:

"active"

run_state
BranchRunState · object | null
required

State of the AI's work on the branch, or null if no turn has run on it yet.

code_state
enum<string>
required

unchanged when the branch has no code changes of its own to merge into main. changed otherwise, including when Base44 can't tell yet.

Available options:
unchanged,
changed
Example:

"changed"

base_checkpoint_id
string | null
required

ID of the main checkpoint the branch started from, or null if the app had no checkpoint yet.

Example:

"6886b8d390dc7e2f4a2c91b3"

session_id
string | null
required

ID of the session this branch belongs to, or null for a branch Base44 hasn't put in a session yet.

Example:

"6820f3a4e7b91d003c45a1f9"

created_by_id
string
required

ID of the user who created the branch.

Example:

"68a0c1d2e3f4a5b6c7d8e9f0"

created_by_name
string | null
required

Display name of the user who created the branch, or the part of their email before the @ when they have no name. null when Base44 can't name them, for example when their account no longer exists.

Example:

"Jane Doe"

created_date
string<date-time>
required

When the branch was created, as a UTC timestamp in ISO 8601 format.

Example:

"2026-09-28T10:15:00"

merged_at
string<date-time> | null
required

When the branch was merged into main, as a UTC timestamp in ISO 8601 format, or null if it wasn't.

Example:

"2026-09-29T08:02:11"

merged_by_id
string | null
required

ID of the user who merged the branch, or null if it wasn't merged or Base44 doesn't know who did, as for a branch whose pull request was merged on GitHub.

Example:

"68a0c1d2e3f4a5b6c7d8e9f0"

static_preview_url
string
required

URL of the branch's preview. It shows the branch only while it's active and once it has been built.

Example:

"https://preview--6820f3a4e7b91d003c45a1f2--b-d8c647b.base44.app"