> For the complete documentation index, see [llms.txt](https://docs.groundcover.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/tenant-settings-api.md).

# Workspace Settings API

Manage default access, AI opt-out, and defaults for newly available connectors.

Manage default access, AI opt-out, and defaults for newly available connectors.

## Authentication

Admin permissions are required for writes and for reading AI settings. Reading default access and connector settings requires authenticated access. Set `GC_API_KEY` to an API key with the required permissions and `GC_BACKEND_ID` to the backend ID. Every example sends both headers. For self-hosted deployments, replace `https://api.groundcover.com` with your API URL.

## Default access

**GET / PUT** `/api/rbac/v2/tenant/settings`

GET requires authenticated access. PUT requires **Admin** permissions.

GET returns the current `defaultRole` and `defaultPolicyUUID`. PUT requires at least one. A nonempty `defaultPolicyUUID` takes precedence over `defaultRole` and must reference an existing policy. Valid role names are `read`, `write`, and `admin`.

```bash
curl --request GET \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID"
```

```bash
curl --request PUT \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID" \
  --header "Content-Type: application/json" \
  --data '{
  "defaultPolicyUUID": "<POLICY_UUID>"
}'
```

A successful update returns HTTP `200` with the stored settings record. Re-read with GET for the effective default access configuration.

## AI settings

**GET / PUT** `/api/rbac/v2/tenant/ai-settings`

Both operations require Admin permissions and an explicit backend ID. PUT accepts the required boolean `customerAIFeaturesOptOut`. Setting it to `true` opts the backend out; setting it to `false` removes the customer opt-out but does not override deployment-level availability.

```bash
curl --request GET \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/ai-settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID"
```

```bash
curl --request PUT \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/ai-settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID" \
  --header "Content-Type: application/json" \
  --data '{
  "customerAIFeaturesOptOut": true
}'
```

Both return HTTP `200` with `backendName`, `customerAIFeaturesOptOut`, `allowAIFeatures`, and `effectiveAIFeaturesEnabled`. The effective field reflects all applicable gates. A missing backend ID or missing boolean returns `400`.

## Defaults for new connectors

**GET / PUT** `/api/rbac/v2/tenant/connector-settings`

GET requires authenticated access. PUT requires **Admin** permissions.

```bash
curl --request GET \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/connector-settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID"
```

```bash
curl --request PUT \
  --url "https://api.groundcover.com/api/rbac/v2/tenant/connector-settings" \
  --header "Authorization: Bearer $GC_API_KEY" \
  --header "X-Backend-Id: $GC_BACKEND_ID" \
  --header "Content-Type: application/json" \
  --data '{
  "newConnectorsEnabledByDefault": false
}'
```

PUT requires the boolean `newConnectorsEnabledByDefault`. The response is HTTP `200` with that field. This setting applies when connectors first appear on a backend; it does not enable or disable existing connectors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.groundcover.com/reference/remote-access-and-apis/api-examples/tenant-settings-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
