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

# Compliance Settings

## Get Compliance Settings

`client.Organization.ComplianceSettings.Get(ctx) (*OrganizationComplianceSettings, 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 OrganizationComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State ComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type ComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type ComplianceSettingsStateDisabled`

      - `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"),
	)
	organizationComplianceSettings, err := client.Organization.ComplianceSettings.Get(context.TODO())
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", organizationComplianceSettings.State)
}
```

#### Response (200)

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

## Update Compliance Settings

`client.Organization.ComplianceSettings.Update(ctx, body) (*OrganizationComplianceSettings, 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 OrganizationComplianceSettingUpdateParams`

  - `State ComplianceSettingsStateParamUnion`

    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 OrganizationComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State ComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type ComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type ComplianceSettingsStateDisabled`

      - `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"),
	)
	organizationComplianceSettings, err := client.Organization.ComplianceSettings.Update(context.TODO(), anthropic.OrganizationComplianceSettingUpdateParams{
		State: anthropic.ComplianceSettingsStateParamUnion{
			OfEnabled: &anthropic.ComplianceSettingsStateEnabledParam{},
		},
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", organizationComplianceSettings.State)
}
```

#### Response (200)

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

## Domain types

### Compliance Settings State

- `type ComplianceSettingsStateUnion interface{…}`

  - `type ComplianceSettingsStateEnabled`

    - `Type Enabled`

      default: enabled

  - `type ComplianceSettingsStateDisabled`

    - `Type Disabled`

      default: disabled

### Compliance Settings State Disabled

- `type ComplianceSettingsStateDisabled`

  - `Type Disabled`

    default: disabled

### Compliance Settings State Disabled Param

- `type ComplianceSettingsStateDisabledParam`

  - `Type Disabled`

### Compliance Settings State Enabled

- `type ComplianceSettingsStateEnabled`

  - `Type Enabled`

    default: enabled

### Compliance Settings State Enabled Param

- `type ComplianceSettingsStateEnabledParam`

  - `Type Enabled`

### Compliance Settings State Param

- `type ComplianceSettingsStateParamUnion interface{…}`

  - `type ComplianceSettingsStateEnabledParam`

    - `Type Enabled`

  - `type ComplianceSettingsStateDisabledParam`

    - `Type Disabled`

### Organization Compliance Settings

- `type OrganizationComplianceSettings`

  - `Type ComplianceSettings`

    default: compliance_settings

  - `State ComplianceSettingsStateUnion`

    Whether the Compliance API is enabled for this organization.

    - `type ComplianceSettingsStateEnabled`

      - `Type Enabled`

        default: enabled

    - `type ComplianceSettingsStateDisabled`

      - `Type Disabled`

        default: disabled
