Change person external ID
API Reference
Change person external ID
Assign a new external identifier to a person entity in gu1 with a mandatory audit reason; denormalized transaction and user event references are updated.
POST
Change person external ID
Overview
Use this endpoint when you need to change an entityβs external ID. It is not possible to changeexternalId via PATCH /entities/:id, PATCH /entities/by-external-id/:externalId, or PATCH /entities/by-tax-id/:taxId β those routes ignore any externalId in the body.
The operation:
- Validates that the new external ID is unique within your organization.
- Updates the entity row.
- When the previous external ID was non-empty and differs from the new value, rewrites denormalized references on transactions (
origin_external_id/destination_external_id) and user events (entity_external_id/ rows matched byentity_id), inside the same database transaction.
externalIdChangeReason and source: change_external_id_endpoint).
Endpoint
Authentication
Request Body
Provide exactly one lookup field to identify the entity, plus the new value and reason.string (uuid)
Internal gu1 entity ID. Use this when you already store our UUID.
string
Lookup only: the entityβs current external ID (not the new value). Use when you identify entities by your own ID in daily operations.
string
Lookup only: tax ID of an entity that already has a non-empty tax ID stored. Matching uses the same alphanumeric normalization as elsewhere (ignores punctuation). If more than one entity matches, the API returns
409 with code AMBIGUOUS_TAX_ID_LOOKUP β use entityId or externalId instead.string
required
The new external identifier (trimmed on the server). Must not be in use by another entity in the organization.
string
required
Audit reason, at least 5 characters (after trim), max 4000.
Response
boolean
true when the request completed successfully.boolean
false if newExternalId equals the current value (no-op); true if the entity was updated.object
Current entity snapshot after the operation.