Skip to content
Select themeSelect language

`PUT /api/workspace/repo_sync` — insert-or-update the repo binding.

PUT
/api/workspace/repo_sync
curl --request PUT \
--url https://example.com/api/workspace/repo_sync \
--header 'Content-Type: application/json' \
--data '{ "auto_push": true, "branch": "example", "credential_resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "repo_url": "example", "sync_mode": "example" }'
Media typeapplication/json
object
auto_push
boolean
branch
string | null
credential_resource_id
string | null format: uuid
repo_url
required
string
sync_mode

ADR 0023 §3 – direction gate; defaults to bidirectional (today’s behavior) when the client omits it.

string | null
Examplegenerated
{
"auto_push": true,
"branch": "example",
"credential_resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"repo_url": "example",
"sync_mode": "example"
}
Media typeapplication/json

Wire-shape view of the workspace’s repo-sync row.

object
auto_push
required
boolean
branch
required
string
credential_resource_id
string | null format: uuid
last_sync_at
string | null format: date-time
last_sync_sha
string | null
repo_url
required
string
sync_mode
required

ADR 0023 §3 – direction gate: bidirectional / repo-only / ui-only.

string
workspace_id
required
string format: uuid
Examplegenerated
{
"auto_push": true,
"branch": "example",
"credential_resource_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"last_sync_at": "2026-04-15T12:00:00Z",
"last_sync_sha": "example",
"repo_url": "example",
"sync_mode": "example",
"workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}