Submit Workflow Contract

Submit an assembled workflow contract instance for immediate execution.

The instance is executed by the already-registered pkg:contract/[email protected] behavior, so
this endpoint only assembles and signs the contract; it does not interpret the template.

The caller must include an inlined template (identity + document). Before signing, the handler
loads the reviewed catalog entry for that template's id and version and replaces the
inlined document with the stored definition so system role bindings and steps cannot be forged
via the request body. Roles and params are then checked against that stored template.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Request for submitting an assembled workflow contract instance.

string
required

Unique ID to ensure idempotency

data
object
required

Assembled workflow instance: the inlined template document, role bindings keyed by role
name, template parameters, and the decimal scale of every asset the workflow touches.

The template document must remain on the wire (callers and future create/save flows still
send it). Execution authority comes from the stored catalog row for
template.id + template.version, not from the caller-supplied body text.

participants
array of uuids
required

Exchange user IDs of additional participants that must sign the contract. Users bound to
a template role are derived from the instance data and do not need to be listed here.

participants*
string | null

Optional memo attached to the contract

Responses

400

Possible reasons:

  • invalid template: {err}
  • invalid workflow instance data: {err}
  • transaction with this external_id was already attempted
  • unknown participant '{user_id}'
  • unknown workflow template '{workflow_id}' version '{version}'
  • workflow template id is required
  • workflow template version is required
401

Not authenticated

422

The request body is valid JSON but does not match the expected schema.

500

Possible reasons:

  • attempt to verify existing contract failed
  • could not begin transactional query
  • failed to build contract
  • failed to commit database transaction
  • failed to create transaction
  • failed to load workflow template
  • failed to save contract
  • stored workflow template is invalid
Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json