> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Ongoing Monitoring

> Learn how to use the FrankieOne API to enable continuous AML monitoring and automatically receive alerts on changes to a customer's risk profile.

## What is Ongoing Monitoring?

Meeting your Anti-Money Laundering (AML) obligations doesn't end after a customer's initial onboarding. Regulators require businesses to perform ongoing due diligence to ensure that a customer's risk profile has not changed over time.

FrankieOne's Ongoing Monitoring feature automates this entire process. Once enabled for an individual, our platform will continuously screen them against global watchlists and automatically alert you if any changes are detected, such as:

* A customer being added to a **Sanctions list**
* A customer becoming a **Politically Exposed Person (PEP)**
* New **Adverse Media** being published about the customer

***

## How Ongoing Monitoring Works

Our solution is designed as a simple "set and forget" lifecycle that is managed via the API and integrated directly into your workflow system.

<Steps>
  <Step title="1. Enable Monitoring">
    After a successful onboarding, you make a single API call to enable ongoing monitoring for an individual. This creates a "subscription" for that entity in our system for one or more monitoring types (e.g., `AML`).
  </Step>

  <Step title="2. Continuous Screening">
    Our platform takes over and perpetually monitors the entity against our global data sources. There is no further action required from you.
  </Step>

  <Step title="3. Real-Time Alerts">
    If a change is detected (e.g., a new PEP match is found), FrankieOne will automatically trigger a pre-configured "monitoring workflow".
  </Step>

  <Step title="4. Action & Review">
    The monitoring workflow runs, generating a new `workflowResult` with a `HIT`. This result can be sent to you via a webhook, allowing you to create a case in your system for your compliance team to review and action the new alert.
  </Step>
</Steps>

<Callout icon="thumbtack" color="#1A6CFF" iconType="regular">
  ##### Onboarding vs. Monitoring Workflows

  Workflows in FrankieOne have a `lifecyclePhase`.<br />

  * Workflows used for initial checks are **`ONBOARDING`** workflows.<br />
  * Workflows triggered automatically by our monitoring service have a `lifecyclePhase` of **`MONITORING`**.<br />
    This allows you to create distinct logic and case management flows for handling new alerts versus initial onboarding results. \[cite: 3192-3197]
</Callout>

***

## API Integration: Managing Monitoring

You can manage an entity's monitoring status using a dedicated set of API endpoints.

### Enable or Disable Monitoring

To turn monitoring on or off for an individual, use the `PATCH` endpoint. This is a single endpoint that accepts query parameters to set the desired state.

**Endpoint:**
`PATCH /v2/individuals/{entityId}/monitor`

**Query Parameters:**

| Parameter         | Type           | Required | Description                                                           |
| :---------------- | :------------- | :------- | :-------------------------------------------------------------------- |
| `enabled`         | boolean        | Yes      | Set to `true` to enable monitoring or `false` to disable it.          |
| `monitoringTypes` | array\[string] | Yes      | Specifies which type(s) of monitoring to control. For AML, use `AML`. |

#### Example: Enabling AML Monitoring

```bash theme={null}
    curl --location --request PATCH '[https://api.frankie.one/v2/individuals/](https://api.frankie.one/v2/individuals/){{entityId}}/monitor?enabled=true&monitoringTypes=AML' \
    --header 'api_key: {{your_api_key}}' \
    --header 'X-Frankie-CustomerID: {{your_customer_id}}'
```

<Callout icon="star" color="#3DD892" iconType="regular">
  ##### Alternative Method: Enable via Workflow

  You can also enable or disable ongoing monitoring as a step within your workflows. This allows you to automatically enroll customers into monitoring at the end of a successful onboarding workflow.
</Callout>

### Checking Monitoring Status

To check the current monitoring subscriptions for an entity, use the `GET` endpoint.

**Endpoint:**
`GET /v2/individuals/{entityId}/monitor`

A successful request will return a `200 OK` response containing a `monitoring` object that details the status of each subscription type.

#### Example Response for `GET /monitor`

```json theme={null}
{
    "requestId": "req_01J...",
    "monitoring": {
        "AML": {
            "subscriptions": [
                {
                    "serviceName": "DEFAULT",
                    "serviceProfileId": "sp_01J...",
                    "status": "ENABLED",
                    "enabledAt": "2024-08-26T05:30:00Z",
                    "enabledBy": "user@example.com",
                    "workflows": [
                        {
                            "workflowName": "AML Ongoing Monitoring",
                            "workflowId": "wf_01J...",
                            "lifecyclePhase": "MONITORING"
                        }
                    ]
                }
            ],
            "providers": [
                "complyadvantage"
            ],
            "status": "ENABLED"
        }
    }
}
```

This response shows that the entity is actively being monitored for `AML` by the `complyadvantage` provider, and any new hits will trigger the "AML Ongoing Monitoring" workflow.

***

## Automatic Disabling of Monitoring

To ensure you are only monitoring active customers and to prevent unnecessary costs, the FrankieOne platform will automatically disable ongoing monitoring for an entity if their status changes to inactive. This happens in the following scenarios:

* The entity is deleted.
* All of the entity's active Service Profiles are archived, deleted, or blocklisted.
