Skip to content

Create and update standalone records in one transaction, up to the host's step limit (100 by default).

POST
/api/workspace/entity-composite-mutations
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.

access_token
string

Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.

The operation key and the ordered steps.

Creates and updates several standalone Entity records in one transaction: every step commits or none does.

object
OperationKey
required

Caller-generated UUID that identifies one logical composite and is reused only for an exact retry of the same steps.

string format: uuid
Steps
required

One step up to the host’s step limit (100 by default, at least 16 on every host), executed in this order.

Array
One of:

A step that creates one standalone Entity record.

object
StepId
required

Caller-chosen step identifier, unique within the request ignoring case; errors of the step repeat it in Metadata.StepId.

string
>= 1 characters <= 64 characters /^[A-Za-z0-9][A-Za-z0-9._-]*$/
Create
required

The record a Create step writes.

object
EntityDefinitionKey
required

Entity definition identifier or normalized key.

string
ExpectedDefinitionRowVersion
required

Latest Entity Definition row version used as the schema concurrency token.

string format: uuid
Values
required

Primary field values keyed by stable field key.

object
key
additional properties
ResponsibilityCandidates
required

StageOnCreate responsibility candidates; an empty list when none are proposed.

Array<object>

Caller-proposed initial subjects of one responsibility of a created record.

object
ResponsibilityKey
required

Stable responsibility key.

string
Subjects
required

Proposed subjects.

Array<object>

One proposed responsibility subject.

object
SubjectType
required

Subject type, such as a user or a Workspace User Group.

string
SubjectId
required

Subject identifier.

string
EffectiveFrom
required

Start of the assignment.

string format: date-time
EffectiveTo

Optional end of the assignment.

string format: date-time
nullable
StepReferences

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
key
additional properties
string
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"
}
}
}
]
}

OK

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Bad Request

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Forbidden

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Not Found

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Conflict

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Content Too Large

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}

Service Unavailable

Media typeapplication/json
object
Data

The committed result; null when the answer is an error, which Errors then describes.

object
OperationKey
required

Operation key of the committed composite.

string format: uuid
CompletedAt
required

Captured completion instant of the committed composite.

string format: date-time
AuditCorrelationId
required

Audit correlation shared by every step of the committed composite.

string
IsIdempotentReplay
required

Whether this answer returns the stored result of an earlier commit without another write.

boolean
Steps
required

One result per step, in request order.

Array<object>

The outcome of one committed step.

object
StepId
required

Step identifier as the caller sent it.

string
Result
required
One of: discriminator: Kind

A record the caller can read: its identity and the row version the composite committed.

object
EntityDefinitionId
required

Entity definition identifier.

string
EntityInstanceId
required

Entity record identifier.

string
RowVersion
required

Row version committed by the whole composite.

string format: uuid
Kind
required
string
Allowed values: RecordIdentity
Kind
required
string
Allowed values: EntityCompositeMutation
Errors
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Warnings
Array<object>
nullable
object
Code
required
string
nullable
Message
required
string
nullable
Target
string
nullable
Field
string
nullable
Metadata
object
key
additional properties
string
nullable
Type
integer format: int32
Allowed values: 0 1 2
Severity
integer format: int32
Allowed values: 0 1 2
Success
boolean
Example
{
"Data": {
"Steps": [
{
"Result": {
"Kind": "RecordIdentity"
}
}
],
"Kind": "EntityCompositeMutation"
},
"Errors": [
{
"Type": 0,
"Severity": 0
}
],
"Warnings": [
{
"Type": 0,
"Severity": 0
}
]
}