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

# Compliance Settings

## Get Compliance Settings

`BetaComplianceSettings beta().organization().complianceSettings().retrieve(params = ComplianceSettingRetrieveParams.none(), requestOptions = RequestOptions.none())`

**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.

### Parameters

- `ComplianceSettingRetrieveParams params`

### Returns

- `class BetaComplianceSettings`

  - `JsonValue type = "compliance_settings"`

  - `BetaComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class BetaComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class BetaComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`

### Example

```java
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.compliancesettings.BetaComplianceSettings;
import com.anthropic.models.beta.organization.compliancesettings.ComplianceSettingRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        BetaComplianceSettings betaComplianceSettings = client.beta().organization().complianceSettings().retrieve();
    }
}
```

#### Response (200)

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

## Update Compliance Settings

`BetaComplianceSettings beta().organization().complianceSettings().update(params, requestOptions = RequestOptions.none())`

**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

- `ComplianceSettingUpdateParams params`

  - `BetaComplianceSettingsStateParam state`

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

### Returns

- `class BetaComplianceSettings`

  - `JsonValue type = "compliance_settings"`

  - `BetaComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class BetaComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class BetaComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`

### Example

```java
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.beta.organization.compliancesettings.BetaComplianceSettings;
import com.anthropic.models.beta.organization.compliancesettings.BetaComplianceSettingsStateEnabledParam;
import com.anthropic.models.beta.organization.compliancesettings.ComplianceSettingUpdateParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        ComplianceSettingUpdateParams params = ComplianceSettingUpdateParams.builder()
            .state(BetaComplianceSettingsStateEnabledParam.builder().build())
            .build();
        BetaComplianceSettings betaComplianceSettings = client.beta().organization().complianceSettings().update(params);
    }
}
```

#### Response (200)

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

## Domain types

### Beta Compliance Settings

- `class BetaComplianceSettings`

  - `JsonValue type = "compliance_settings"`

  - `BetaComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class BetaComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class BetaComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`

### Beta Compliance Settings State

- `class BetaComplianceSettingsState: union`

  - `class BetaComplianceSettingsStateEnabled`

    - `JsonValue type = "enabled"`

  - `class BetaComplianceSettingsStateDisabled`

    - `JsonValue type = "disabled"`

### Beta Compliance Settings State Disabled

- `class BetaComplianceSettingsStateDisabled`

  - `JsonValue type = "disabled"`

### Beta Compliance Settings State Disabled Param

- `class BetaComplianceSettingsStateDisabledParam`

  - `JsonValue type = "disabled"`

### Beta Compliance Settings State Enabled

- `class BetaComplianceSettingsStateEnabled`

  - `JsonValue type = "enabled"`

### Beta Compliance Settings State Enabled Param

- `class BetaComplianceSettingsStateEnabledParam`

  - `JsonValue type = "enabled"`

### Beta Compliance Settings State Param

- `class BetaComplianceSettingsStateParam: union`

  - `class BetaComplianceSettingsStateEnabledParam`

    - `JsonValue type = "enabled"`

  - `class BetaComplianceSettingsStateDisabledParam`

    - `JsonValue type = "disabled"`
