Skip to main content
PATCH
/
api
/
v1
/
workspaces
/
{workspace_id}
/
config
Update Workspace Config
curl --request PATCH \
  --url https://api.example.com/api/v1/workspaces/{workspace_id}/config \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "git": {
    "remote": "origin",
    "base_ref": "main"
  },
  "sync": {
    "enabled": false
  },
  "remote_env": {
    "env": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ]
  },
  "setup": {
    "script": "<string>"
  }
}
'
{
  "id": "<string>",
  "user_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "git_host": "<string>",
  "git_path": "<string>",
  "workspace_metadata": {},
  "workspace_config": {
    "git": {
      "remote": "origin",
      "base_ref": "main"
    },
    "sync": {
      "enabled": false
    },
    "remote_env": {
      "env": [
        {
          "key": "<string>",
          "value": "<string>"
        }
      ]
    },
    "setup": {
      "script": "<string>"
    }
  },
  "user_machine_paths": [
    {
      "user_machine_id": "<string>",
      "local_path": "<string>"
    }
  ]
}

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 body for updating workspace configuration.

git
GitSettings · object

Git settings (remote and base_ref) for the workspace

sync
SyncSettings · object

Sync settings for automatic checkpoint uploads

remote_env
RemoteEnvSettings · object

Remote environment settings for spinning up remote environments

setup
SetupSettings · object

Setup script settings for automatic worktree initialization

Response

Successful Response

Serialized workspace row returned to API clients.

id
string
required

Unique workspace identifier

user_id
string
required

Owner user identifier

created_at
string<date-time>
required

Timestamp when the workspace was created

updated_at
string<date-time>
required

Timestamp when the workspace was last updated

git_host
string | null

Canonical git host (e.g., github.com)

git_path
string | null

Canonical git repository path (e.g., org/repo)

workspace_metadata
Workspace Metadata · object

Arbitrary workspace metadata (labels, annotations)

workspace_config
WorkspaceConfig · object

Workspace configuration including git, sync, and remote environment settings

user_machine_paths
UserMachinePathDescriptor · object[]

Machines linked to this workspace with their local paths