---
title: Compliance Settings
url: https://platform.claude.com/docs/en/api/go/beta/organization/compliance_settings
---

# Compliance Settings

## Get Compliance Settings

`client.Beta.Organization.ComplianceSettings.Get(ctx) (*BetaComplianceSettings, error)`

**GET** `/v1/organizations/compliance_settings`

Retrieve your organization's Compliance Settings.

Compliance Settings is a singleton resource: there is exactly one per
organization, addressed without an identifier. The `state` field reflects
whether the Compliance API is enabled. An organization with a parent
organization reads the state inherited from the parent's configuration.

### Returns

- `type BetaComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State BetaComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type BetaComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type BetaComplianceSettingsStateDisabled`

      - `Type Disabled`

        default: disabled

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceSettings, err := client.Beta.Organization.ComplianceSettings.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceSettings.State)
}
```

#### Response (200)

```json
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}
```

## Update Compliance Settings

`client.Beta.Organization.ComplianceSettings.Update(ctx, body) (*BetaComplianceSettings, error)`

**POST** `/v1/organizations/compliance_settings`

Update your organization's Compliance Settings.

Setting `state` to `enabled` turns on the Compliance API and begins
capturing organization activity events. Setting it to `disabled` turns
both off. `state` reflects whether the Compliance API is enabled.

A request that sets `state` to its current value succeeds and leaves the
resource unchanged. A `disabled` request stays in effect until a later
`enabled` request or the organization's next provisioning action that
enables Access Transparency: enabling Access Transparency also enables
the Compliance API, which serves its activity events, so such
provisioning (including re-runs) re-enables the Compliance API even
after a `disabled` request. Automated provisioning never disables
compliance settings.

### Parameters

- `body BetaOrganizationComplianceSettingUpdateParams`

  - `State BetaComplianceSettingsStateParamUnion`

    Desired state. Accepts the string shorthand "enabled" or "disabled" in place of the object form; the response always returns the canonical object form.

### Returns

- `type BetaComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State BetaComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type BetaComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type BetaComplianceSettingsStateDisabled`

      - `Type Disabled`

        default: disabled

### Example

```go
package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	betaComplianceSettings, err := client.Beta.Organization.ComplianceSettings.Update(context.TODO(), anthropic.BetaOrganizationComplianceSettingUpdateParams{
		State: anthropic.BetaComplianceSettingsStateParamUnion{
			OfEnabled: &anthropic.BetaComplianceSettingsStateEnabledParam{},
		},
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", betaComplianceSettings.State)
}
```

#### Response (200)

```json
{
  "state": {
    "type": "enabled"
  },
  "type": "compliance_settings"
}
```

## Domain types

### Beta Compliance Settings

- `type BetaComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State BetaComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type BetaComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type BetaComplianceSettingsStateDisabled`

      - `Type Disabled`

        default: disabled

### Beta Compliance Settings State

- `type BetaComplianceSettingsStateUnion interface{…}`

  - `type BetaComplianceSettingsStateEnabled`

    - `Type Enabled`

      default: enabled

  - `type BetaComplianceSettingsStateDisabled`

    - `Type Disabled`

      default: disabled

### Beta Compliance Settings State Disabled

- `type BetaComplianceSettingsStateDisabled`

  - `Type Disabled`

    default: disabled

### Beta Compliance Settings State Disabled Param

- `type BetaComplianceSettingsStateDisabledParam`

  - `Type Disabled`

### Beta Compliance Settings State Enabled

- `type BetaComplianceSettingsStateEnabled`

  - `Type Enabled`

    default: enabled

### Beta Compliance Settings State Enabled Param

- `type BetaComplianceSettingsStateEnabledParam`

  - `Type Enabled`

### Beta Compliance Settings State Param

- `type BetaComplianceSettingsStateParamUnion interface{…}`

  - `type BetaComplianceSettingsStateEnabledParam`

    - `Type Enabled`

  - `type BetaComplianceSettingsStateDisabledParam`

    - `Type Disabled`
