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

# Compliance Settings

## Get Compliance Settings

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

  - `JsonValue type = "compliance_settings"`

  - `ComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class ComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class ComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`

### Example

```java
package com.anthropic.example;

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

public final class Main {
    private Main() {}

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

        OrganizationComplianceSettings organizationComplianceSettings = client.organization().complianceSettings().retrieve();
    }
}
```

#### Response (200)

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

## Update Compliance Settings

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

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

  - `JsonValue type = "compliance_settings"`

  - `ComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class ComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class ComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`

### Example

```java
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.organization.compliancesettings.ComplianceSettingUpdateParams;
import com.anthropic.models.organization.compliancesettings.ComplianceSettingsStateEnabledParam;
import com.anthropic.models.organization.compliancesettings.OrganizationComplianceSettings;

public final class Main {
    private Main() {}

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

        ComplianceSettingUpdateParams params = ComplianceSettingUpdateParams.builder()
            .state(ComplianceSettingsStateEnabledParam.builder().build())
            .build();
        OrganizationComplianceSettings organizationComplianceSettings = client.organization().complianceSettings().update(params);
    }
}
```

#### Response (200)

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

## Domain types

### Compliance Settings State

- `class ComplianceSettingsState: union`

  - `class ComplianceSettingsStateEnabled`

    - `JsonValue type = "enabled"`

  - `class ComplianceSettingsStateDisabled`

    - `JsonValue type = "disabled"`

### Compliance Settings State Disabled

- `class ComplianceSettingsStateDisabled`

  - `JsonValue type = "disabled"`

### Compliance Settings State Disabled Param

- `class ComplianceSettingsStateDisabledParam`

  - `JsonValue type = "disabled"`

### Compliance Settings State Enabled

- `class ComplianceSettingsStateEnabled`

  - `JsonValue type = "enabled"`

### Compliance Settings State Enabled Param

- `class ComplianceSettingsStateEnabledParam`

  - `JsonValue type = "enabled"`

### Compliance Settings State Param

- `class ComplianceSettingsStateParam: union`

  - `class ComplianceSettingsStateEnabledParam`

    - `JsonValue type = "enabled"`

  - `class ComplianceSettingsStateDisabledParam`

    - `JsonValue type = "disabled"`

### Organization Compliance Settings

- `class OrganizationComplianceSettings`

  - `JsonValue type = "compliance_settings"`

  - `ComplianceSettingsState state`

    Whether the Compliance API is enabled for this organization.

    - `class ComplianceSettingsStateEnabled`

      - `JsonValue type = "enabled"`

    - `class ComplianceSettingsStateDisabled`

      - `JsonValue type = "disabled"`
