Brain Docs

Reference

TypeScript SDKInstallationHTTP clientWire client
createEntitygetEntityresolveEntitylistEntitiesupdateEntityrenameEntitymergeEntitiesunmergeEntitytombstoneEntity
ErrorsRetriesPagination
Brain/Docs
✦ ASKBrain on GitHubDashboard
TypeScript SDKEntitiesmergeEntities

mergeEntities

Fold one entity into another, with an audit id and a grace period you must read.

PURPOSE

Fold one entity into another. The merged entity's statements and relations re-point to the survivor; its id keeps resolving, with mergedInto set.

POST/v1/entities/:survivor/mergeBearer API keystable
mergeEntities(survivorId: string, input: MergeEntitiesInput): Promise<MergeEntitiesResult>
Handshake credentialstable
mergeEntities(request: EntityMergeRequest): Promise<EntityMergeResponse>

Parameters

ParameterTypeRequired
survivorIdstringrequired

The entity that remains. Positional on the HTTP tier; the wire field is survivor.

mergedstringrequired

The entity to fold in.

confidencefloatoptional

Confidence in the merge.

reasonstringoptional

Why — recorded in the audit entry.

Returns

FieldTypePresence
auditIdstringalways

The audit record for this merge.

gracePeriodSecondsintegeralways

How long unmergeEntity will still work. After it elapses the merge is permanent — read this value rather than assuming a default.

On the wire

Ids are fixed-width UUID bytes rather than strings, attributes is an opaque attributesBlob, and every request carries a requestId plus an optional actAs. See Wire client.

See also
unmergeEntitygetEntity

Was this page helpful?

renameEntity

Change an entity's canonical name, optionally keeping the old one as an alias.

unmergeEntity

Reverse a merge inside its grace period — addressed by the merged id, not the survivor's.

On this page

ParametersReturnsOn the wire
Suggest an editOpen in Playground