Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.

Headers

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Path Parameters

session_id
string
required

Body

application/json

Public operation request.

It deliberately has no credential or repository field: the credential is the caller's stored connection, and the repository is the session's clone binding. checkout_path names where the repository root sits inside the workspace (empty = the workspace root), because the caller — the agent working in the checkout — knows the layout and the server must not guess it.

assignment_generation
integer
required
Required range: x >= 1
branch
string
required
Required string length: 1 - 255
checkout_path
string
default:""
Maximum string length: 512
force
boolean
default:false

Response

Successful Response

session_id
string
required
assignment_generation
integer
required
repository_id
integer
required
owner
string
required
repository
string
required
branch
string
required
remote_head_sha
string
required
no_changes
boolean
required