> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Identity & Compliance

> Keep your onboarding and compliance state in sync as users and companies move through approval, information requests, and account locks.

Identity and compliance webhooks tell your systems when the identity
verification (KYC) status of a user or the business verification (KYB) status of
a company changes during onboarding and ongoing review. Rain sends these events
whenever an application status is updated, so you can track approvals, requests
for more information, and account locks in real time. Both events are
informational and do not require a response.

The following events are available:

| Event                                 | Description                                                            |
| ------------------------------------- | ---------------------------------------------------------------------- |
| [`user.updated`](#user-updated)       | A user's identity verification (KYC) or application status changes.    |
| [`company.updated`](#company-updated) | A company's business verification (KYB) or application status changes. |

<Info>
  Both events support an optional `eventReceivedAt` timestamp that records when
  Rain first received the status change. This helps with debugging timing
  issues and building audit trails. It is excluded from payloads by default.
  Contact your Rain account manager to enable it for your tenant.
</Info>

The following sequence shows how a compliance decision moves from onboarding to your endpoint.

<div className="wf-diagram">
  <div className="legend">
    <span className="lg"><span className="swatch send" />Webhook Rain sends you</span>
    <span className="lg"><span className="swatch handle" />Your handler (ack 2xx)</span>
    <span className="lg"><span className="swatch action" />Action / API call</span>
    <span className="lg"><span className="swatch ext" />Compliance provider</span>
  </div>

  <div className="diagram-shell">
    <svg id="compliance-flow" role="img" aria-label="How a compliance decision moves from onboarding to your endpoint: the applicant submits details, Rain runs verification with Sumsub, records the decision, and POSTs user.updated to your endpoint" viewBox="0 0 1080 700" width="1080" height="700" style={{width: "100%", height: "auto"}}><defs><marker id="arrow" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" className="marker-fill-default" /></marker><marker id="arrowSend" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" className="marker-fill-send" /></marker></defs><line x1="150" y1="70" x2="150" y2="680" className="lane-line" stroke-width="1.5" stroke-dasharray="2 6" /><line x1="400" y1="70" x2="400" y2="680" className="lane-line" stroke-width="1.5" stroke-dasharray="2 6" /><line x1="650" y1="70" x2="650" y2="680" className="lane-line" stroke-width="1.5" stroke-dasharray="2 6" /><line x1="900" y1="70" x2="900" y2="680" className="lane-line" stroke-width="1.5" stroke-dasharray="2 6" /><path d="M 150 168 C 150 184, 400 184, 400 200" fill="none" className="conn-default" stroke-width="1.7" marker-end="url(#arrow)" opacity="0.92" /><path d="M 400 268 C 400 284, 650 284, 650 300" fill="none" className="conn-default" stroke-width="1.7" marker-end="url(#arrow)" opacity="0.92" /><path d="M 650 368 C 650 384, 400 384, 400 400" fill="none" className="conn-default" stroke-width="1.7" marker-end="url(#arrow)" opacity="0.92" /><path d="M 400 468 L 400 500" fill="none" className="conn-default" stroke-width="1.7" marker-end="url(#arrow)" opacity="0.92" /><path d="M 400 568 C 400 584, 900 584, 900 600" fill="none" className="conn-send" stroke-width="1.7" stroke-dasharray="5 4" marker-end="url(#arrowSend)" opacity="0.92" /><foreignObject x="56" y="16" width="188" height="54"><div className="lane-head"><span className="ico">👤</span><span className="nm">Applicant</span></div></foreignObject><foreignObject x="306" y="16" width="188" height="54"><div className="lane-head rain"><span className="ico">🌧️</span><span className="nm">Rain</span></div></foreignObject><foreignObject x="556" y="16" width="188" height="54"><div className="lane-head"><span className="ico">🛡️</span><span className="nm">Sumsub (KYC / KYB)</span></div></foreignObject><foreignObject x="806" y="16" width="188" height="54"><div className="lane-head"><span className="ico">🖥️</span><span className="nm">Your endpoint</span></div></foreignObject><foreignObject x="56" y="100" width="188" height="68"><div className="card action"><span className="ct"><span className="tag">Applicant</span><span className="lab">Submit onboarding details</span></span></div></foreignObject><foreignObject x="306" y="200" width="188" height="68"><div className="card action"><span className="ct"><span className="tag">Rain</span><span className="lab">Run verification</span></span></div></foreignObject><foreignObject x="556" y="300" width="188" height="68"><div className="card ext"><span className="ct"><span className="tag">Decision</span><span className="lab">Approved / needs info / denied</span></span></div></foreignObject><foreignObject x="306" y="400" width="188" height="68"><div className="card action"><span className="ct"><span className="tag">Only on change</span><span className="lab">Update compliance status</span></span></div></foreignObject><foreignObject x="306" y="500" width="188" height="68"><div className="card send"><span className="ct"><span className="tag">Webhook</span><span className="lab mono">user.updated</span></span></div></foreignObject><foreignObject x="806" y="600" width="188" height="68"><div className="card handle"><span className="ct"><span className="tag">Handle</span><span className="lab">Gate features on applicationStatus</span></span></div></foreignObject></svg>
  </div>
</div>

The `user.updated` payload carries `statusChangeReason` only when a reason is recorded. `company.updated` mirrors this flow for business entities (KYB).

## `user.updated`

This webhook is sent whenever a user's identity verification (KYC) or compliance
status is updated. It applies to **Consumer Programs**. No response is required.

<CodeGroup>
  ```json Approved theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "user",
      "action": "updated",
      "version": "1.0.0",
      "eventReceivedAt": "2026-01-27T15:30:00.000Z",
      "body": {
          "id": "user_abc123",
          "firstName": "John",
          "lastName": "Doe",
          "email": "john.doe@example.com",
          "isActive": true,
          "isTermsOfServiceAccepted": true,
          "companyId": "company_456",
          "applicationStatus": "approved",
          "applicationReason": ""
      }
  }
  ```

  ```json Needs information theme={null}
  {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "resource": "user",
      "action": "updated",
      "version": "1.0.0",
      "eventReceivedAt": "2026-01-27T15:30:00.000Z",
      "body": {
          "id": "user_abc123",
          "firstName": "John",
          "lastName": "Doe",
          "email": "john.doe@example.com",
          "isActive": true,
          "isTermsOfServiceAccepted": true,
          "applicationStatus": "needsInformation",
          "applicationCompletionLink": {
              "url": "https://use-dev.rain.xyz/kyc",
              "params": {
                  "userId": "user_abc123",
                  "signature": "CiQAaHR0cHM6Ly9jbG91ZGttcy5nb29nbGVhcGlzLmNvbS92MRIvAD0rF3pKq2mXbYhV8sNzQwLmT4xR9cGvUu1kZpEo6NwsAaHlDdBrMvXjPk9fWq4="
              }
          },
          "applicationReason": "documentPageMissing, badPhotoQuality"
      }
  }
  ```

  ```json Status changed by Rain theme={null}
  {
      "id": "c3d4e5f6-a7b8-9012-cdef-a12345678902",
      "resource": "user",
      "action": "updated",
      "version": "1.1.0",
      "eventReceivedAt": "2026-01-27T15:30:00.000Z",
      "body": {
          "id": "user_abc123",
          "firstName": "John",
          "lastName": "Doe",
          "email": "john.doe@example.com",
          "isActive": true,
          "isTermsOfServiceAccepted": true,
          "applicationStatus": "locked",
          "applicationReason": "",
          "statusChangeReason": "rain_initiated"
      }
  }
  ```
</CodeGroup>

| Field                                        | Type                | Description                                                                                                                                                                    |
| -------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id`                                         | `string`            | The user ID                                                                                                                                                                    |
| `firstName`                                  | `string`            | User's first name                                                                                                                                                              |
| `lastName`                                   | `string` (optional) | User's last name                                                                                                                                                               |
| `email`                                      | `string`            | User's email                                                                                                                                                                   |
| `isActive`                                   | `boolean`           | Whether the user is active                                                                                                                                                     |
| `isTermsOfServiceAccepted`                   | `boolean`           | Whether the user has accepted the terms of service                                                                                                                             |
| `companyId`                                  | `string` (optional) | Company ID (for corporate users)                                                                                                                                               |
| `applicationStatus`                          | `string`            | Current application or compliance status. See the application status values below.                                                                                             |
| `applicationCompletionLink`                  | `object` (optional) | Link for the user to complete their application                                                                                                                                |
| `applicationCompletionLink.url`              | `string`            | The URL to complete the application                                                                                                                                            |
| `applicationCompletionLink.params.userId`    | `string`            | The user ID parameter                                                                                                                                                          |
| `applicationCompletionLink.params.signature` | `string`            | Rain-issued signature parameter for verification                                                                                                                               |
| `applicationExternalVerificationLink`        | `object` (optional) | Deprecated in favor of `applicationCompletionLink`                                                                                                                             |
| `applicationReason`                          | `string`            | Comma-separated rejection labels from the compliance provider (empty string when no rejections)                                                                                |
| `statusChangeReason`                         | `string` (optional) | Indicates the source of the user status change. Present only when a specific reason is recorded. Requires version `1.1.0` or later. See the status change reason values below. |
| `eventReceivedAt`                            | `string` (optional) | ISO 8601 timestamp of when the event was received by Rain. Present in the envelope when enabled for your tenant.                                                               |

The `applicationStatus` field can be one of these values:

| Status              | Description                                                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `approved`          | Application has been approved                                                                                                                                     |
| `pending`           | Application is pending review                                                                                                                                     |
| `needsInformation`  | Additional information is required from the user                                                                                                                  |
| `needsVerification` | Additional verification is required                                                                                                                               |
| `manualReview`      | Application is under manual review                                                                                                                                |
| `denied`            | Application has been denied                                                                                                                                       |
| `locked`            | User account is locked                                                                                                                                            |
| `canceled`          | Application has been canceled                                                                                                                                     |
| `notStarted`        | Application has not been started                                                                                                                                  |
| `tosNotAccepted`    | Identity verification passed, but the program's terms have not been accepted yet. `applicationCompletionLink` is present so you can send the applicant to accept. |

An application moves through these statuses as it is reviewed, and every transition sends a `user.updated` webhook. For what each status means, which states are terminal, and what to expect next, see [Application states](/docs/application-states).

The `statusChangeReason` field can take these values:

| Value            | Description                             |
| ---------------- | --------------------------------------- |
| `rain_initiated` | The status change was initiated by Rain |

The `applicationReason` field contains comma-separated rejection labels. For a
complete reference of all labels and their meanings, see the [webhook rejection
label reference](/docs/rejection-reasons#webhook-rejection-label-reference).

## `company.updated`

This webhook provides real-time updates on a company's business verification
(KYB) and compliance status, helping you track application progress and
regulatory changes. It applies to **Corporate Programs** only and is
informational, so it does not require a response.

<CodeGroup>
  ```json Approved theme={null}
  {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "resource": "company",
      "action": "updated",
      "version": "1.0.0",
      "eventReceivedAt": "2026-01-27T15:30:00.000Z",
      "body": {
          "id": "company_abc123",
          "name": "Acme Corp",
          "applicationStatus": "approved",
          "applicationReason": ""
      }
  }
  ```

  ```json Needs information theme={null}
  {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "resource": "company",
      "action": "updated",
      "version": "1.0.0",
      "eventReceivedAt": "2026-01-27T15:30:00.000Z",
      "body": {
          "id": "company_abc123",
          "name": "Acme Corp",
          "applicationStatus": "needsInformation",
          "applicationCompletionLink": {
              "url": "https://use-dev.rain.xyz/kyb",
              "params": {
                  "userId": "company_abc123",
                  "signature": "CiQAaHR0cHM6Ly9jbG91ZGttcy5nb29nbGVhcGlzLmNvbS92MRIvAD0rF3pKq2mXbYhV8sNzQwLmT4xR9cGvUu1kZpEo6NwsAaHlDdBrMvXjPk9fWq4="
              }
          },
          "applicationReason": "documentPageMissing, badPhotoQuality"
      }
  }
  ```
</CodeGroup>

| Field                                        | Type                | Description                                                                                                      |
| -------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------- |
| `id`                                         | `string`            | The company ID                                                                                                   |
| `name`                                       | `string`            | Company name                                                                                                     |
| `applicationStatus`                          | `string`            | Current application or compliance status. See the application status values below.                               |
| `applicationCompletionLink`                  | `object` (optional) | Link for the company to complete their application                                                               |
| `applicationCompletionLink.url`              | `string`            | The URL to complete the application                                                                              |
| `applicationCompletionLink.params.userId`    | `string`            | The company ID parameter                                                                                         |
| `applicationCompletionLink.params.signature` | `string`            | Rain-issued signature parameter for verification                                                                 |
| `applicationExternalVerificationLink`        | `object` (optional) | Deprecated in favor of `applicationCompletionLink`                                                               |
| `applicationReason`                          | `string`            | Comma-separated rejection labels from the compliance provider (empty string when no rejections)                  |
| `eventReceivedAt`                            | `string` (optional) | ISO 8601 timestamp of when the event was received by Rain. Present in the envelope when enabled for your tenant. |

The `applicationStatus` field can be one of these values:

| Status              | Description                                                                                                                                                       |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `approved`          | Application has been approved                                                                                                                                     |
| `pending`           | Application is pending review                                                                                                                                     |
| `needsInformation`  | Additional information is required                                                                                                                                |
| `needsVerification` | Additional verification is required                                                                                                                               |
| `manualReview`      | Application is under manual review                                                                                                                                |
| `denied`            | Application has been denied                                                                                                                                       |
| `locked`            | Company account is locked                                                                                                                                         |
| `canceled`          | Application has been canceled                                                                                                                                     |
| `notStarted`        | Application has not been started                                                                                                                                  |
| `tosNotAccepted`    | Identity verification passed, but the program's terms have not been accepted yet. `applicationCompletionLink` is present so you can send the applicant to accept. |

For what each status means, which states are terminal, and what to expect next, see [Application states](/docs/application-states).
