Skip to main content
POST
/
api
/
v1
/
workspaces
/
{workspace_id}
/
sync
/
init-worktree-checkpoint
Init Worktree Checkpoint
curl --request POST \
  --url https://api.example.com/api/v1/workspaces/{workspace_id}/sync/init-worktree-checkpoint \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "worktree_id": "<string>",
  "base_ref_sha": "<string>"
}
'
{
  "checkpoint_id": "<string>",
  "synced": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
string
required

Body

application/json

Request to initialize a worktree's checkpoint state to base ref.

Called when sync is enabled to set the initial checkpoint state, indicating the worktree starts from a clean base ref state.

worktree_id
string
required
base_ref_sha
string
required

Response

Successful Response

Response after initializing worktree checkpoint state.

checkpoint_id
string
required
synced
boolean
required