Skip to main content
Updates the workspace settings named in updateMask. For example, you can turn on web search, move the weekly reporting boundary or replace the list of excluded commit authors. The update is all or nothing: if any named setting is invalid or you cannot change it, the request fails and nothing is changed.
Changes apply to the whole workspace and are recorded in the workspace audit log. Saving productOverview starts workspace onboarding, which processes the workspace’s history and uses credits. Productivity visibility, external contributors, web search and Slack thread follow-up decide who can see or do what in the workspace, and changes to them normally apply to access right away.
Read the current settings before updating. If any setting the etag covers changes in the meantime, including in the Macroscope app, the update returns 409 Conflict. Read the settings again, check that your change still applies, and retry with the new etag.

Effects of each setting

inferenceResidency is read-only through the API. This operation does not change team enablement, digest subscriptions, the administrative contact, the log export or delegated admins; see Endpoints for the operations that do.

Permissions

Check editableFields in the Get workspace settings response to see which settings you can change. Connections already approved at Write or Admin need no new approval. An Admin key changes these settings as the key, not as the person who created it. It does not make the key a workspace admin: workspace administration this API does not offer, such as creating API keys or managing billing, still requires a workspace admin.

Authorization

string
required
Bearer <key>. See Authentication.
string
How your client identifies the source of the request in the workspace audit log. Use human or agent. Macroscope records the client’s value without verifying it. Other values are treated as unspecified.

Path parameters

string
required
GITHUB_ORGANIZATION or GITHUB_USER.
string
required
Numeric GitHub ID of the organization or user.

Body

Send a JSON body of up to 256 KiB. A larger body returns 413.
string
required
The etag returned by Get workspace settings. 1 to 128 characters.
string
required
Comma-separated names of the settings to change, as they appear in settings, for example "webSearchEnabled,timezone". Between 1 and 13 names, each at most once. Naming inferenceResidency, or a setting you cannot change, returns 403.
WorkspaceSettingValues
New values for the fields in updateMask. Give a value for each named setting, except productivityVisibilityTeamId, which is removed when named without a value. productOverview must not be blank. excludedCommitAuthors takes the complete new list, up to 1,000 authors, each at most once; a name is 1 to 256 bytes and not blank, and an empty list removes every exclusion. A value for a setting not named in updateMask returns 400. timezone must be an IANA timezone name. customAgentInstructions is at most 20,000 bytes, reportingBoundaryWeekday is 0 to 6 and reportingBoundaryHour is 0 to 23. See WorkspaceSettingValues for field values.

Response

WorkspaceSettings
The workspace’s settings and new etag after the update, in the same form as Get workspace settings.

Audit log

Each successful change is recorded in the workspace audit log with the API key or person that made it, the client’s User-Agent, and any reported X-Macroscope-Initiation. For signed-in clients, the entry names the person and the connected app. Custom Agent Instructions are recorded by length, not content. Refused, invalid and stale updates can also appear there. Requests rejected before admission, such as malformed requests, invalid credentials, workspace mismatches and rate-limited requests, may have no audit entry.

Errors

HTTPMeaning
400Invalid body: an unknown or repeated name in updateMask, a value without its name, a missing value for a named setting, an unknown timezone, or a value out of range
403Your credential or your permissions do not allow one of the named settings, the setting is read-only, the feature it belongs to is unavailable, or productOverview was named without an active subscription. Nothing was changed
404The workspace is unknown or inactive
409A setting changed after etag was read. Nothing was changed
413Body larger than 256 KiB
These examples turn on web search with an Admin key.