Create and update standalone records in one transaction, up to the host's step limit (100 by default).
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/entity-composite-mutations"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"OperationKey\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\", \"Steps\": [ { \"StepId\": \"example\", \"Create\": { \"EntityDefinitionKey\": \"example\", \"ExpectedDefinitionRowVersion\": \"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0\", \"Values\": { \"additionalProperty\": \"example\" }, \"ResponsibilityCandidates\": [ { \"ResponsibilityKey\": \"example\", \"Subjects\": [ { \"SubjectType\": \"example\", \"SubjectId\": \"example\", \"EffectiveFrom\": \"2026-04-15T12:00:00Z\", \"EffectiveTo\": \"2026-04-15T12:00:00Z\" } ] } ], \"StepReferences\": { \"additionalProperty\": \"example\" } } } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/entity-composite-mutations';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"OperationKey":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","Steps":[{"StepId":"example","Create":{"EntityDefinitionKey":"example","ExpectedDefinitionRowVersion":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","Values":{"additionalProperty":"example"},"ResponsibilityCandidates":[{"ResponsibilityKey":"example","Subjects":[{"SubjectType":"example","SubjectId":"example","EffectiveFrom":"2026-04-15T12:00:00Z","EffectiveTo":"2026-04-15T12:00:00Z"}]}],"StepReferences":{"additionalProperty":"example"}}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/entity-composite-mutations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "OperationKey": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Steps": [ { "StepId": "example", "Create": { "EntityDefinitionKey": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Values": { "additionalProperty": "example" }, "ResponsibilityCandidates": [ { "ResponsibilityKey": "example", "Subjects": [ { "SubjectType": "example", "SubjectId": "example", "EffectiveFrom": "2026-04-15T12:00:00Z", "EffectiveTo": "2026-04-15T12:00:00Z" } ] } ], "StepReferences": { "additionalProperty": "example" } } } ] }'Every step is a Create or an Update of one standalone record and is checked with the caller’s
own Entity Security, exactly like the single-record request would be. All steps commit together or none does.
StepReferences fill a Reference field with the record an earlier Create step creates.
An error answer has Data: null, names the failing step, when there is one, in Field and
Metadata.StepId, and means that this request saved nothing, read with its code: moltaro.instances.composite.outcomeUnknown
says that it is not known whether it saved; moltaro.instances.replay.resultNotViewable and
moltaro.security.idempotency.replayInvalid say that an earlier identical request with the same
OperationKey did save; moltaro.security.idempotency.keyReuse says that another request saved with
this OperationKey. An answer without this envelope, such as HTTP 500, does not show whether anything was
saved; repeat the identical request to find out.
Send one caller-generated OperationKey per logical save and reuse it only for an exact retry of the same
body: a committed request answers its stored result with IsIdempotentReplay: true for seven days
without writing again. A success, first or replayed, is always 200 OK. Each step answers
RecordIdentity with the row version the whole operation committed, or, for an Update whose record the
caller can no longer read, RecordReceipt without values or row version. Field values are not returned;
read the records afterwards when needed.
The body is limited to the host’s request size, 1,048,576 bytes by default (413). File and InverseReference
values, read-only or calculated fields and the X-Moltaro-Markdown-* headers are refused; use the single-record
requests for them.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Bodyrequired
Section titled “Request Bodyrequired”The operation key and the ordered steps.
Creates and updates several standalone Entity records in one transaction: every step commits or none does.
object
Caller-generated UUID that identifies one logical composite and is reused only for an exact retry of the same steps.
One step up to the host’s step limit (100 by default, at least 16 on every host), executed in this order.
A step that creates one standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The record a Create step writes.
object
Entity definition identifier or normalized key.
Latest Entity Definition row version used as the schema concurrency token.
Primary field values keyed by stable field key.
object
StageOnCreate responsibility candidates; an empty list when none are proposed.
Caller-proposed initial subjects of one responsibility of a created record.
object
Stable responsibility key.
Proposed subjects.
One proposed responsibility subject.
object
Subject type, such as a user or a Workspace User Group.
Subject identifier.
Start of the assignment.
Optional end of the assignment.
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
A step that updates one existing standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The change an Update step writes.
object
Entity definition identifier or normalized key.
Target Entity record identifier.
Current row version of the record expected by the caller.
Field values to write, keyed by stable field key; every supplied value needs Field:Write, and fields left out
keep their stored values.
object
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
Examplegenerated
{ "OperationKey": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Steps": [ { "StepId": "example", "Create": { "EntityDefinitionKey": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Values": { "additionalProperty": "example" }, "ResponsibilityCandidates": [ { "ResponsibilityKey": "example", "Subjects": [ { "SubjectType": "example", "SubjectId": "example", "EffectiveFrom": "2026-04-15T12:00:00Z", "EffectiveTo": "2026-04-15T12:00:00Z" } ] } ], "StepReferences": { "additionalProperty": "example" } } } ]}Creates and updates several standalone Entity records in one transaction: every step commits or none does.
object
Caller-generated UUID that identifies one logical composite and is reused only for an exact retry of the same steps.
One step up to the host’s step limit (100 by default, at least 16 on every host), executed in this order.
A step that creates one standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The record a Create step writes.
object
Entity definition identifier or normalized key.
Latest Entity Definition row version used as the schema concurrency token.
Primary field values keyed by stable field key.
object
StageOnCreate responsibility candidates; an empty list when none are proposed.
Caller-proposed initial subjects of one responsibility of a created record.
object
Stable responsibility key.
Proposed subjects.
One proposed responsibility subject.
object
Subject type, such as a user or a Workspace User Group.
Subject identifier.
Start of the assignment.
Optional end of the assignment.
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
A step that updates one existing standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The change an Update step writes.
object
Entity definition identifier or normalized key.
Target Entity record identifier.
Current row version of the record expected by the caller.
Field values to write, keyed by stable field key; every supplied value needs Field:Write, and fields left out
keep their stored values.
object
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
Examplegenerated
{ "OperationKey": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Steps": [ { "StepId": "example", "Create": { "EntityDefinitionKey": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Values": { "additionalProperty": "example" }, "ResponsibilityCandidates": [ { "ResponsibilityKey": "example", "Subjects": [ { "SubjectType": "example", "SubjectId": "example", "EffectiveFrom": "2026-04-15T12:00:00Z", "EffectiveTo": "2026-04-15T12:00:00Z" } ] } ], "StepReferences": { "additionalProperty": "example" } } } ]}Creates and updates several standalone Entity records in one transaction: every step commits or none does.
object
Caller-generated UUID that identifies one logical composite and is reused only for an exact retry of the same steps.
One step up to the host’s step limit (100 by default, at least 16 on every host), executed in this order.
A step that creates one standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The record a Create step writes.
object
Entity definition identifier or normalized key.
Latest Entity Definition row version used as the schema concurrency token.
Primary field values keyed by stable field key.
object
StageOnCreate responsibility candidates; an empty list when none are proposed.
Caller-proposed initial subjects of one responsibility of a created record.
object
Stable responsibility key.
Proposed subjects.
One proposed responsibility subject.
object
Subject type, such as a user or a Workspace User Group.
Subject identifier.
Start of the assignment.
Optional end of the assignment.
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
A step that updates one existing standalone Entity record.
object
Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.
The change an Update step writes.
object
Entity definition identifier or normalized key.
Target Entity record identifier.
Current row version of the record expected by the caller.
Field values to write, keyed by stable field key; every supplied value needs Field:Write, and fields left out
keep their stored values.
object
Optional local references: a primary Reference field key of this definition mapped to the StepId of an
earlier Create step whose new record the field receives.
object
Examplegenerated
{ "OperationKey": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Steps": [ { "StepId": "example", "Create": { "EntityDefinitionKey": "example", "ExpectedDefinitionRowVersion": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "Values": { "additionalProperty": "example" }, "ResponsibilityCandidates": [ { "ResponsibilityKey": "example", "Subjects": [ { "SubjectType": "example", "SubjectId": "example", "EffectiveFrom": "2026-04-15T12:00:00Z", "EffectiveTo": "2026-04-15T12:00:00Z" } ] } ], "StepReferences": { "additionalProperty": "example" } } } ]}Responses
Section titled “Responses”OK
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Not Found
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Conflict
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Content Too Large
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Service Unavailable
object
The committed result; null when the answer is an error, which Errors then describes.
object
Operation key of the committed composite.
Captured completion instant of the committed composite.
Audit correlation shared by every step of the committed composite.
Whether this answer returns the stored result of an earlier commit without another write.
One result per step, in request order.
The outcome of one committed step.
object
Step identifier as the caller sent it.
A record the caller can read: its identity and the row version the composite committed.
object
Entity definition identifier.
Entity record identifier.
Row version committed by the whole composite.
An updated record the caller can no longer read: the change is committed, and only the identity the caller sent is returned, without field values or a row version. A Create step never answers a receipt.
object
Entity definition identifier.
Entity record identifier.
object
object
object
object
Example
{ "Data": { "Steps": [ { "Result": { "Kind": "RecordIdentity" } } ], "Kind": "EntityCompositeMutation" }, "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}