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

# Status changed

> Triggered server side after the register status of a real document changes.

This event is triggered after the register status of a real document changes, for example when it is reported stolen at an office or suspended through the [Set status](/jaksam-identity/server/register/set-status) export.

<CodeGroup>
  ```lua Event theme={null}
  AddEventHandler("jksm_identity:statusChanged", function(serial, status, previous)

  end)
  ```

  ```lua Example theme={null}
  AddEventHandler("jksm_identity:statusChanged", function(serial, status, previous)
      if status == "stolen" then
          -- flag it in your MDT
          exports["my_mdt"]:AddFlag(serial, "Reported stolen")
      end
  end)
  ```
</CodeGroup>

### Parameters

| Name | Data Type | Description |
| - | - | - |
| `serial` | string | The document number |
| `status` | string | The new status: `valid`, `lost`, `stolen`, `seized`, `suspended`, `replaced` or `revoked` |
| `previous` | string | The status before |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.