v4
latestOpenAPI 3.0.22026-07-3188146256.6 KBupdateEntity
Updates an Entity
Activity
If no activity_id query parameter is provided, implicitly creates Activity of type EntityUpdated
Relations
To create a relation, store a property that defines a $relation array.
Example:
{
"contacts": {
"$relation": [
{ "entity_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
]
}
}
The items in $relation support two properties:
- entity_id - The ID of the entity to link
- _tags - Tags or labels for the relation (optional)
Path parameters
URL-friendly identifier for the entity schema
Entity Type
Entity id
Query parameters
Activity to include in event feed
Update the diff and entity for the custom activity included in the query. Pending state on activity is automatically ended when activity is filled.
Don't wait for updated entity to become available in Search API. Useful for large migrations
When true, enables entity validation against the entity schema.
When true, bypasses changeset interception: attribute values in the payload are written directly to the entity regardless of each attribute's edit_mode. The write always lands, independently of any auto-clear outcome below.
After the direct write, for each attribute in the payload that also has a pending changeset:
- edit_mode: external — the incoming value is checked against the changeset's match_strategy (and fuzzy_config when fuzzy). On match, _changesets[attr] is cleared. On no-match, the write still stands and the changeset stays pending (signalling the ERP/trusted source applied a different correction than originally proposed; resolve via a later matching direct write, or via the :apply / :dismiss endpoints).
- edit_mode: approval — never auto-cleared. The write lands but the pending changeset remains until explicitly resolved via :apply or :dismiss.
Intended for trusted integrations (e.g. ERP inbound sync). ERP middleware must always use ?direct=true — without it, an inbound sync on an external attribute would create a new changeset instead of confirming the pending one.
Defaults to false — no breaking change for existing callers.
Request body
Example request
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_org": "123",
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_schema": "contact",
"_tags": [
"example",
"mock"
],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_acl": {
"view": [
"org:456",
"org:789"
],
"edit": [
"org:456"
],
"delete": [
"org:456"
]
},
"_manifest": [
"123e4567-e89b-12d3-a456-426614174000"
]
}Response
Success
Example response
{
"_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"_org": "123",
"_owners": [
{
"org_id": "123",
"user_id": "123"
}
],
"_schema": "contact",
"_tags": [
"example",
"mock"
],
"_created_at": "2021-02-09T12:41:43.662Z",
"_updated_at": "2021-02-09T12:41:43.662Z",
"_acl": {
"view": [
"org:456",
"org:789"
],
"edit": [
"org:456"
],
"delete": [
"org:456"
]
},
"_manifest": [
"123e4567-e89b-12d3-a456-426614174000"
]
}