> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.middesk.com/monitor-activity/people/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.middesk.com/_mcp/server. # Monitor people > Learn how to handle changes to people associated with a business. Monitor for changes to the people associated with a business so you can detect officer turnover, ownership shifts, and other personnel changes that may affect your risk decision. Middesk identifies people changes from Secretary of State officer listings and related authoritative sources, so the events reflect the legal record rather than self-reported updates. People changes often signal a material event: a CEO departure, a buyout, a re-incorporation, or simply a routine annual filing that adds new directors. Use these events to re-run review tasks and decide whether the submitted person on the business still matches the current officer set. To handle changes to people on a business, subscribe to the `person.created` and `person.deleted` [events](../monitor-activity/events) in your webhook endpoint: * `person.created` — a new officer was identified for the business. * `person.deleted` — a previously identified officer is no longer associated with the business. **`Ruby`** ```ruby title="Ruby" require 'json' # Sinatra post '/my/monitoring_webhook/url' do payload = request.body.read event = JSON.parse(payload) case event.type when 'person.created' person_event = event['data']['object'] business_id = person_event['business_id'] puts 'Person added! else # Unexpected event type status 400 return end status 200 end ``` **`Python`** ```python title="Python" from flask import Flask, request, jsonify app = Flask(__name__) # Flask @app.route('/my/monitoring_webhook/url', methods=['POST']) def monitoring_webhook(): payload = request.data event = request.get_json() if event['type'] == 'person.created': person_event = event['data']['object'] business_id = person_event['business_id'] puts 'Person added! else: # Unexpected event type return '', 400 return '', 200 if __name__ == '__main__': app.run(debug=True) ``` **`JavaScript`** ```javascript title="JavaScript" const express = require('express'); const app = express(); app.use(express.json()); // Middleware to parse JSON request bodies // Express route app.post('/my/monitoring_webhook/url', (req, res) => { const event = req.body; if (event.type === 'person.created') { const personEvent = event.data.object; const businessId = personEvent.business_id; console.log('Business name changed!'); } else { // Unexpected event type return res.sendStatus(400); } res.sendStatus(200); }); // Start the Express server const PORT = process.env.PORT || 3000; app.listen(PORT, () => { console.log(`Server is running on port ${PORT}`); }); ``` ### Use the event payload Depending on your use case, you can use the name event directly (like storing the new name for review in your application) or use the event as a trigger to reevaluate the approval status of the business using the full business payload. **`person.created.json`** ```json title="person.created.json" { "object": "person", "name": "JOHN DOE", "submitted": false, "business_id": "628821e0-3a16-4d84-8c7b-1e8f5920ac65", "sources": [ { "id": "f7cb73f4-gcaf-4676-92c5-396ec3fa7694", "type": "registration", "metadata": { "state": "MT", "status": "active", "file_number": "F0012345", "jurisdiction": "FOREIGN" } } ], "titles": [ { "object": "person_title", "title": "DIRECTOR" } ], "people_bankruptcies": [] } ``` ### Use the business review tasks Reevaluate the business's review tasks by requesting the full business payload using the [GET /businesses endpoint](/api-reference/business-verification/businesses/retrieve-a-business). Use the [Person Verification Task](/reference/business-review-tasks#people-verification-review-task-outcomes) to evaluate whether the name still matches to the submitted business name. **`Ruby`** ```ruby title="Ruby" require 'net/http' require 'net/https' require 'json' def send_request business_id = "" uri = URI("https://api.middesk.com/v1/businesses/#{business_id}") # Create client http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_PEER # Create Request req = Net::HTTP::Get.new(uri) # Add headers req.add_field "Accept", "application/json" # Add headers req.add_field "Authorization", "Basic " # Fetch Request res = http.request(req) response = JSON.parse(res.body) person_task = response['review']['tasks'].find { |task| task['category'] == 'person_verification' } if person_task['status'] == 'success' puts 'Person match' else puts 'Person match failure' end rescue StandardError => e puts "HTTP Request failed (#{e.message})" end ``` **`Python`** ```python title="Python" import requests from requests.auth import HTTPBasicAuth def send_request(): business_id = "" url = f"https://api.middesk.com/v1/businesses/{business_id}" headers = { "Accept": "application/json", "Authorization": "Basic " } try: # Make the request response = requests.get(url, headers=headers, auth=HTTPBasicAuth('', '')) # Parse the response JSON response_data = response.json() person_task = next((task for task in response_data['review']['tasks'] if task['category'] == 'person_verification'), None) if person_task and person_task['status'] == 'success': print('Person match') else: print('Person match failure') except requests.exceptions.RequestException as e: print(f"HTTP Request failed ({e})") send_request() ``` **`JavaScript`** ```javascript title="JavaScript" const businessId = ""; const url = `https://api.middesk.com/v1/businesses/${businessId}`; const headers = { "Accept": "application/json", "Authorization": "Basic " }; try { // Make the request using fetch const response = await fetch(url, { headers }); // Check if the request was successful if (!response.ok) { throw new Error(`HTTP error! Status: ${response.status}`); } const responseData = await response.json(); const personTask = responseData.review.tasks.find(task => task.category === 'person_verification'); if (personTask && personTask.status === 'success') { console.log('Person match'); } else { console.log('Person match failure'); } catch (error) { console.error(`HTTP Request failed: ${error.message}`); } } sendRequest(); ``` > **Get a demo** > > Contact your account manager or [contact sales](https://www.middesk.com/contact-sales) to inquire about access. > Learn how to handle changes to people associated with a business.