Skip to main content
PATCH
Update Entity by External ID

Overview

This endpoint allows you to update an entity using your own external identifier instead of our internal UUID. This is useful when you don’t store our UUIDs in your system and only track your own external IDs. The functionality is identical to PATCH /entities/:id, but uses externalId as the identifier.

Path Parameters

string
required
Your unique external identifier for the entity

Request Body

string
Entity name (person full name or company name)
string
Tax identification number (SSN, EIN, VAT, RFC, etc.)
string | null
Root-level nationality (ISO 3166-1 alpha-2 when persisted). Omit to leave unchanged; send null to clear. Updating nationality inside entityData in the same request may recalculate the root field.
string
Entity status. Possible values:
  • active: Entity is active and operational
  • inactive: Entity is inactive
  • blocked: Entity is blocked (requires reason)
  • suspended: Entity is suspended (requires reason)
  • rejected: Entity was rejected during onboarding (requires reason)
Note: Changing to blocked, suspended, or rejected requires providing a reason for audit purposes.
string
Required when changing status to blocked, suspended, or rejected. Provides audit trail for the status change.
string (uuid)
Risk matrix ID to assign to this entity. The risk matrix determines which rules will be executed for risk evaluation.
object
Entity-specific data structure. For person entities, use entityData.person. For company entities, use entityData.company.Person fields:
  • firstName: First name
  • lastName: Last name
  • middleName: Middle name
  • dateOfBirth: Date of birth (YYYY-MM-DD)
  • nationality: Nationality (ISO 3166-1 alpha-2)
  • email: Email address
  • phone: Phone number
  • address: Address object (street, city, state, country, postalCode)
Company fields:
  • legalName: Legal company name
  • tradingNames: Array of trading names
  • registrationNumber: Company registration number
  • incorporationDate: Date of incorporation (YYYY-MM-DD)
  • industry: Industry/sector
  • employees: Number of employees
  • website: Company website
  • address: Address object
object
Custom key-value attributes for flexible entity data storage
object
System metadata (usually set by the system, but can be updated)

Immutable Fields

The following fields cannot be changed after entity creation:
  • type: Entity type (person or company)
  • countryCode: Entity country code (ISO 3166-1 alpha-2)

Response

Returns the updated entity object.
object
The updated entity object with all current values
object | null
Evaluation object (currently null - re-evaluation feature temporarily disabled)
object
The entity state before the update (for audit purposes)

Example Request

Example Response

Status Change with Reason

When changing status to blocked, suspended, or rejected, you must provide a reason:

Use Cases

1. Update Customer Information

Update customer data from your CRM or user management system:

2. Assign Risk Matrix

Assign or change the risk matrix for an entity:
After updating the risk matrix, you should trigger a re-analysis using POST /entities/:entityId/analyze to re-evaluate the entity with the new rules.

3. Block Entity After Investigation

Block an entity after compliance investigation:

4. Sync Company Data

Update company information from business registry:

Events and Webhooks

Real-time Events

After a successful update, the following real-time event is emitted via WebSocket:

Webhook Triggers

If you change only the status field (without other field changes), a webhook is triggered: Event: entity.status_changed
Note: If you update status along with other fields, the webhook is NOT triggered (assumes bulk entity edit rather than standalone status change).

Audit Trail

Every entity update creates an ATTRIBUTE_CHANGED event in the entity events log with:
  • Before state (all changed fields)
  • After state (all changed fields)
  • User who made the change
  • Timestamp
  • Source (API, dashboard, etc.)
Query audit trail:

Error Responses

error
Entity with the specified externalId not found in your organization
error
Invalid request data or validation error
error
Attempting to change immutable fields

Best Practices

  1. Always Set External ID on Creation: Set externalId when creating entities via POST /entities to enable updates by external ID.
  2. Use for System Integration: This endpoint is ideal for integrations where you sync data from external systems (CRM, ERP, etc.) using your own IDs.
  3. Provide Reasons for Status Changes: Always include meaningful reasons when blocking, suspending, or rejecting entities for compliance audit trail.
  4. Re-analyze After Risk Matrix Change: After assigning a new risk matrix, trigger POST /entities/:entityId/analyze to re-evaluate with new rules.
  5. Handle 404 Gracefully: If entity not found by external ID, you may need to create it first using POST /entities.
  6. Batch Updates: For updating multiple entities, call this endpoint concurrently with different external IDs for better performance.