> ## Documentation Index
> Fetch the complete documentation index at: https://docs.macroscope.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get repository defaults

> See the settings a repository starts with when it is added to the workspace

Returns the workspace's repository defaults: the settings a repository starts with when it is added to the workspace. The response includes the configured defaults, the values a repository added now would start with, and the defaults your credential can change. Pass the returned `version` when you [update the defaults](https://docs.macroscope.com/api-reference/endpoint/update-workspace-repo-defaults.md).

Defaults apply only to repositories added later. Read a repository's own settings with [Get repository settings](https://docs.macroscope.com/api-reference/endpoint/get-repo-settings.md). If the workspace has no repository defaults, the request returns `404`.

## Authorization

Use a Read, Write, or Admin key for the workspace. [**V1 read**](https://docs.macroscope.com/api#manage-keys) keys cannot read repository defaults. If you use the [MCP tool](https://docs.macroscope.com/api-reference/mcp.md#permissions), you need read access to the workspace.

**Authorization** `string` *required*

`Bearer <key>`. See [Authentication](https://docs.macroscope.com/api#authentication).

## Path parameters

**workspaceType** `string` *required*

`GITHUB_ORGANIZATION` or `GITHUB_USER`.

**workspaceId** `string` *required*

Numeric GitHub ID of the organization or user.

## Response

**defaults** `WorkspaceRepoDefaults`

**properties**

**version** `string`

Current version, as a decimal string. It increases whenever the defaults are saved through the API or the app, possibly by more than one. Use the returned value when updating the defaults.

**configured** `WorkspaceRepoDefaultValues`

Values stored as defaults. A default is omitted when it is not set.

**effective** `WorkspaceRepoDefaultValues`

Values a repository added now starts with. A limit is omitted when there is no limit. `releaseRefPatterns` is omitted when a new repository uses the patterns Macroscope infers for it.

**editableFields** `string`

Comma-separated names of the defaults you can change with your credential, your workspace permissions, and the features enabled for the workspace. An empty string means you cannot change any defaults. With OAuth sign-in, it is empty unless the client has Admin access and you are a workspace admin.

### WorkspaceRepoDefaultValues

Each default has the same name, values, and meaning as the repository setting in [RepoSettingValues](https://docs.macroscope.com/api-reference/endpoint/get-repo-settings.md#reposettingvalues), applied as the value a new repository starts with. An omitted default has no value, so a default returned as `false` is explicitly off. A default that depends on a feature the workspace does not have, such as Approvability, is omitted from both `configured` and `effective` and cannot be changed. `policyRepoId` is omitted if you cannot read the Policy Repo.

With no default of its own, a new repository uses `COMMENT_SEVERITY_THRESHOLD_OFF` for `commentSeverityThreshold`, `APPROVABILITY_BLOCKING_SEVERITY_MEDIUM` for `approvabilityMinBlockingSeverity`, and `APPROVABILITY_CONCLUSION_NEUTRAL` for `approvabilityConclusion`.

The defaults also include the [pull request filters](https://docs.macroscope.com/api-reference/endpoint/get-repo-settings.md#reposettingvalues) `skipPrAuthorLogins`, `skipPrLabels`, `skipPrTargetBranches`, `alwaysReviewPrLabels`, and `crossRepoPrReviewEnabled`. Each has the same shape, update limits, and matching rules as the repository setting, applied to repositories added later. The four lists are always returned; `{}` means the list is empty.

This example shows selected defaults returned to an Admin key.

```bash cURL theme={null}
curl https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repository-defaults \
  -H "Authorization: Bearer $MACROSCOPE_API_KEY"
```

```python Python theme={null}
import os, requests

r = requests.get(
    "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repository-defaults",
    headers={"Authorization": f"Bearer {os.environ['MACROSCOPE_API_KEY']}"},
)
r.raise_for_status()
print(r.json())
```

```javascript JavaScript theme={null}
const res = await fetch(
  "https://api.macroscope.com/api/v1/workspaces/GITHUB_ORGANIZATION/12345678/repository-defaults",
  { headers: { Authorization: `Bearer ${process.env.MACROSCOPE_API_KEY}` } }
);
if (!res.ok) throw new Error(`GET failed (${res.status})`);
console.log(await res.json());
```

```json 200 theme={null}
{
  "defaults": {
    "version": "7",
    "configured": {
      "correctnessReview": "FEATURE_RUN_MODE_AUTOMATIC",
      "prSummaryEnabled": true,
      "correctnessMaxRunsPerPr": 5,
      "skipPrAuthorLogins": { "logins": ["renovate[bot]"] },
      "skipPrLabels": { "labels": ["no-review"] },
      "skipPrTargetBranches": {},
      "alwaysReviewPrLabels": {},
      "crossRepoPrReviewEnabled": false
    },
    "effective": {
      "correctnessReview": "FEATURE_RUN_MODE_AUTOMATIC",
      "prSummaryEnabled": true,
      "correctnessMaxRunsPerPr": 5,
      "commentSeverityThreshold": "COMMENT_SEVERITY_THRESHOLD_OFF",
      "skipPrAuthorLogins": { "logins": ["renovate[bot]"] },
      "skipPrLabels": { "labels": ["no-review"] },
      "skipPrTargetBranches": {},
      "alwaysReviewPrLabels": {},
      "crossRepoPrReviewEnabled": false
    },
    "editableFields": "correctnessReview,checkRunAgents,githubActionsAgentRunsEnabled,commitSummarizationEnabled,prSummaryEnabled,commentSeverityThreshold,detectionMode,correctnessMaxRunsPerPr,correctnessMaxFileSizeBytes,draftPrReviewEnabled,autoMergeFixPrsEnabled,requestReview,skipDependabot,policyRepoId,releaseRefPatterns,crossRepoPrReviewEnabled,skipPrAuthorLogins,skipPrLabels,skipPrTargetBranches,alwaysReviewPrLabels"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.