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

# Compliance Settings

## Get Compliance Settings

`client.organization.complianceSettings.retrieve(options?): OrganizationComplianceSettings`

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

- `interface OrganizationComplianceSettings`

  - `type: "compliance_settings"`

    default: compliance_settings

  - `state: ComplianceSettingsState`

    Whether the Compliance API is enabled for this organization.

    - `interface ComplianceSettingsStateEnabled`

      - `type: "enabled"`

        default: enabled

    - `interface ComplianceSettingsStateDisabled`

      - `type: "disabled"`

        default: disabled

### Example

```typescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const organizationComplianceSettings = await client.organization.complianceSettings.retrieve();

console.log(organizationComplianceSettings.state);
```

#### Response (200)

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

## Update Compliance Settings

`client.organization.complianceSettings.update(body, options?): OrganizationComplianceSettings`

**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: ComplianceSettingUpdateParams`

  - `state: ComplianceSettingsStateParam`

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

    - `interface ComplianceSettingsStateEnabledParam`

      - `type: "enabled"`

    - `interface ComplianceSettingsStateDisabledParam`

      - `type: "disabled"`

### Returns

- `interface OrganizationComplianceSettings`

  - `type: "compliance_settings"`

    default: compliance_settings

  - `state: ComplianceSettingsState`

    Whether the Compliance API is enabled for this organization.

    - `interface ComplianceSettingsStateEnabled`

      - `type: "enabled"`

        default: enabled

    - `interface ComplianceSettingsStateDisabled`

      - `type: "disabled"`

        default: disabled

### Example

```typescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const organizationComplianceSettings = await client.organization.complianceSettings.update({
  state: { type: "enabled" }
});

console.log(organizationComplianceSettings.state);
```

#### Response (200)

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

## Domain types

### Compliance Settings State

- `type ComplianceSettingsState = ComplianceSettingsStateEnabled | ComplianceSettingsStateDisabled`

  - `interface ComplianceSettingsStateEnabled`

    - `type: "enabled"`

      default: enabled

  - `interface ComplianceSettingsStateDisabled`

    - `type: "disabled"`

      default: disabled

### Compliance Settings State Disabled

- `interface ComplianceSettingsStateDisabled`

  - `type: "disabled"`

    default: disabled

### Compliance Settings State Disabled Param

- `interface ComplianceSettingsStateDisabledParam`

  - `type: "disabled"`

### Compliance Settings State Enabled

- `interface ComplianceSettingsStateEnabled`

  - `type: "enabled"`

    default: enabled

### Compliance Settings State Enabled Param

- `interface ComplianceSettingsStateEnabledParam`

  - `type: "enabled"`

### Compliance Settings State Param

- `type ComplianceSettingsStateParam = ComplianceSettingsStateEnabledParam | ComplianceSettingsStateDisabledParam`

  - `interface ComplianceSettingsStateEnabledParam`

    - `type: "enabled"`

  - `interface ComplianceSettingsStateDisabledParam`

    - `type: "disabled"`

### Organization Compliance Settings

- `interface OrganizationComplianceSettings`

  - `type: "compliance_settings"`

    default: compliance_settings

  - `state: ComplianceSettingsState`

    Whether the Compliance API is enabled for this organization.

    - `interface ComplianceSettingsStateEnabled`

      - `type: "enabled"`

        default: enabled

    - `interface ComplianceSettingsStateDisabled`

      - `type: "disabled"`

        default: disabled
