Update Entity by External ID
API Reference
Update a company by external ID
Update a company entity in gu1 using your own external identifier instead of the internal UUID, useful when migrating from legacy CRM or core systems.
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 toPATCH /entities/:id, but uses externalId as the identifier.
Path Parameters
Your unique external identifier for the entity
Request Body
Entity name (person full name or company name)
Tax identification number (SSN, EIN, VAT, RFC, etc.)
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.Entity status. Possible values:
active: Entity is active and operationalinactive: Entity is inactiveblocked: Entity is blocked (requiresreason)suspended: Entity is suspended (requiresreason)rejected: Entity was rejected during onboarding (requiresreason)
blocked, suspended, or rejected requires providing a reason for audit purposes.Required when changing status to
blocked, suspended, or rejected. Provides audit trail for the status change.Risk matrix ID to assign to this entity. The risk matrix determines which rules will be executed for risk evaluation.
Entity-specific data structure. For person entities, use
entityData.person. For company entities, use entityData.company.Person fields:firstName: First namelastName: Last namemiddleName: Middle namedateOfBirth: Date of birth (YYYY-MM-DD)nationality: Nationality (ISO 3166-1 alpha-2)email: Email addressphone: Phone numberaddress: Address object (street, city, state, country, postalCode)
legalName: Legal company nametradingNames: Array of trading namesregistrationNumber: Company registration numberincorporationDate: Date of incorporation (YYYY-MM-DD)industry: Industry/sectoremployees: Number of employeeswebsite: Company websiteaddress: Address object
Custom key-value attributes for flexible entity data storage
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.The updated entity object with all current values
Evaluation object (currently null - re-evaluation feature temporarily disabled)
The entity state before the update (for audit purposes)
Example Request
Example Response
Status Change with Reason
When changing status toblocked, 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: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 thestatus field (without other field changes), a webhook is triggered:
Event: entity.status_changed
Audit Trail
Every entity update creates anATTRIBUTE_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.)
Error Responses
Entity with the specified
externalId not found in your organizationInvalid request data or validation error
Attempting to change immutable fields
Best Practices
-
Always Set External ID on Creation: Set
externalIdwhen creating entities viaPOST /entitiesto enable updates by external ID. - Use for System Integration: This endpoint is ideal for integrations where you sync data from external systems (CRM, ERP, etc.) using your own IDs.
- Provide Reasons for Status Changes: Always include meaningful reasons when blocking, suspending, or rejecting entities for compliance audit trail.
-
Re-analyze After Risk Matrix Change: After assigning a new risk matrix, trigger
POST /entities/:entityId/analyzeto re-evaluate with new rules. -
Handle 404 Gracefully: If entity not found by external ID, you may need to create it first using
POST /entities. - Batch Updates: For updating multiple entities, call this endpoint concurrently with different external IDs for better performance.
Related Endpoints
- Create Entity - Create new entity
- Update Entity by UUID - Update using internal UUID
- Get Entity - Retrieve entity details
- Analyze Entity - Trigger risk analysis