# Configure compliance settings

You can configure account-level compliance settings to control how incoming transfers are processed. The primary setting is `skipQuarantineFrom`, which allows internal transfers to bypass quarantine screening.

Compliance configuration is account-specific. Each account can have its own `skipQuarantineFrom` setting. For more information about how skip quarantine works, see [Skip quarantine for internal transfers](/products/custody/v1.34/concepts/compliance/transaction-screening#skip-quarantine-for-internal-transfers).

## Prerequisites

| Prerequisite | Additional information |
|  --- | --- |
| The account ID for the account to configure | [List accounts](/products/custody/v1.34/api/reference/openapi/accounts/getaccounts) |
| The `compliance` role | Contact your domain administrator |


## Get compliance configuration

To retrieve the current compliance configuration for an account, call the [Get compliance configuration](/products/custody/v1.34/api/reference/openapi/accounts/getcomplianceconfiguration) operation:


```bash
GET /v1/domains/{domainId}/accounts/{accountId}/compliance-configuration
```

### Response

If the account has a compliance configuration, you receive:


```json
{
  "accountId": "d664a3f3-d5f0-44c1-9588-326b0f00aced",
  "domainId": "b22cfc18-df37-49a1-b7e9-1b6c3f83b32b",
  "skipQuarantineFrom": "Domain",
  "metadata": {
    "description": null,
    "revision": 2,
    "createdAt": "2026-03-23T10:47:06.605Z",
    "createdBy": { "id": "6ac20654-...", "domainId": "b22cfc18-..." },
    "lastModifiedAt": "2026-03-23T10:47:28.842Z",
    "lastModifiedBy": { "id": "6ac20654-...", "domainId": "b22cfc18-..." },
    "customProperties": {}
  }
}
```

If no configuration exists, you receive a `404 EntityNotFoundError`.

## Set compliance configuration

To create or update the compliance configuration for an account, call the [Set compliance configuration](/products/custody/v1.34/api/reference/openapi/accounts/upsertcomplianceconfiguration) operation:


```bash
PUT /v1/domains/{domainId}/accounts/{accountId}/compliance-configuration
```

### Request body


```json
{
  "skipQuarantineFrom": "Domain",
  "revision": 1
}
```

| Field | Description | Required |
|  --- | --- | --- |
| `skipQuarantineFrom` | The scope for skipping quarantine. One of: `None`, `Domain`, `Instance`. | Yes |
| `revision` | Optimistic concurrency control. Must be 1 for new configurations, or current revision + 1 for updates. | Yes |


### skipQuarantineFrom values

| Value | Behavior |
|  --- | --- |
| `None` | All incoming transfers are quarantined normally (default behavior). |
| `Domain` | Skip quarantine for transfers from accounts in the same domain. |
| `Instance` | Skip quarantine for transfers from any account in the same Ripple Custody instance. |


### Revision handling

The `revision` field provides optimistic concurrency control:

- **Creating a new configuration**: Set `revision` to `1`.
- **Updating an existing configuration**: Set `revision` to the current revision + 1.
- **Revision mismatch**: If the provided revision doesn't match expected, you receive a `400 InvalidRequestError` with message `Revision conflict: expected revision {n}`.


Always retrieve the current configuration before updating to get the correct revision number. Concurrent updates can cause revision conflicts.

### Example: Create a new configuration


```json
{
  "skipQuarantineFrom": "Domain",
  "revision": 1
}
```

### Example: Update an existing configuration

First, get the current revision:


```bash
GET /v1/domains/{domainId}/accounts/{accountId}/compliance-configuration
# Response includes: "revision": 2
```

Then update with revision + 1:


```json
{
  "skipQuarantineFrom": "Instance",
  "revision": 3
}
```

## List compliance configurations

To retrieve all compliance configurations in a domain, call the [List compliance configurations](/products/custody/v1.34/api/reference/openapi/accounts/listcomplianceconfigurations) operation:


```bash
GET /v1/domains/{domainId}/compliance-configurations
```

### Response


```json
{
  "items": [
    {
      "accountId": "d664a3f3-d5f0-44c1-9588-326b0f00aced",
      "domainId": "b22cfc18-df37-49a1-b7e9-1b6c3f83b32b",
      "skipQuarantineFrom": "Domain",
      "metadata": { ... }
    }
  ],
  "count": 1,
  "currentStartingAfter": null,
  "nextStartingAfter": "d664a3f3-d5f0-44c1-9588-326b0f00aced"
}
```

Use `nextStartingAfter` for pagination when more results exist.

## Disable skip quarantine

To disable skip quarantine for an account, set `skipQuarantineFrom` to `None`. There is no DELETE operation for compliance configuration.


```json
{
  "skipQuarantineFrom": "None",
  "revision": 3
}
```

## Events

When you change compliance configuration, the system emits a `ComplianceConfigurationUpdated` event. For more information, see [Compliance events](/products/custody/v1.34/system-management/events#compliance-events).