Switch the caller's worktree to another branch (or create one)
POST /api/workspaces/{workspaceId}/apps-v2/{id}/checkout
POST
/api/workspaces/{workspaceId}/apps-v2/{id}/checkout
The same thing git checkout (or git checkout -b with create) in the terminal does, offered as a button — and it goes through the sandbox, so both agree afterwards. Refuses with uncommitted work rather than choosing between carrying it across and discarding it.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” workspaceId
required
string
id
required
string
Request Body required
Section titled “Request Body required ”object
branch
required
string
create
boolean
Responses
Section titled “ Responses ”Successful response
object
success
Whether the request succeeded.
boolean
data
Endpoint-specific response payload.
message
string
Example
Operation completed error
string
Example
Error messageInvalid request
object
success
boolean
error
string
Example
Error messageInternal server error
object
success
boolean
error
string
Example
Error message