Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · Ironclad API

Worlds / Legal

Ironclad API

A local Ironclad with contract workflows, templates, approvals, clause library and the repository of executed records. Test the legal ops agent that launches, routes and approves contracts through each workflow step.

Base path
/public/api/v1
Auth
OAuth bearer token, the world key
Endpoints
15
Status
Active today

This reference previews the surface the Ironclad world serves in the closed beta. Paths mirror the public Ironclad API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_IRONCLAD_URLThis world's origin followed by /public/api/v1
WORLDS_API_KEYThe world key, accepted wherever Ironclad expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_IRONCLAD_URL;

const res = await fetch(base + "/public/api/v1/workflows?page=0&pageSize=20", {
  headers: {
    Authorization: "Bearer " + process.env.WORLDS_API_KEY,
  },
});

const { list } = await res.json();

API reference

Workflows

Contract requests moving through review and approval.

  • GET/public/api/v1/workflowsList workflows
  • POST/public/api/v1/workflowsLaunch a workflow
  • GET/public/api/v1/workflows/{id}Retrieve a workflow
  • PATCH/public/api/v1/workflows/{id}/attributesUpdate workflow attributes
  • GET/public/api/v1/workflows/{id}/approvalsList workflow approvals
  • PATCH/public/api/v1/workflows/{id}/approvals/{roleId}Update an approval
Fields · 6
idstringWorkflow id
titlestringTitle
templatestringTemplate id
statusstringactive, completed, cancelled or paused
stepstringCurrent step
attributesobjectForm values

Workflow schemas

The fields each workflow template collects.

  • GET/public/api/v1/workflow-schemasList workflow schemas
  • GET/public/api/v1/workflow-schemas/{id}Retrieve a workflow schema
  • POST/public/api/v1/workflows/asyncLaunch a workflow asynchronously
Fields · 4
idstringTemplate id
namestringTemplate name
schemaobjectAttribute definitions
rolesarrayApprover and reviewer roles

Records

Executed contracts stored in the repository.

  • GET/public/api/v1/recordsList records
  • GET/public/api/v1/records/{id}Retrieve a record
  • PATCH/public/api/v1/records/{id}Update a record
Fields · 5
idstringRecord id
namestringRecord name
typestringRecord type
propertiesobjectContract metadata
lastUpdateddatetimeLast update

Workflow comments

Discussion on a contract request.

  • GET/public/api/v1/workflows/{id}/commentsList workflow comments
  • POST/public/api/v1/workflows/{id}/commentCreate a comment
  • GET/public/api/v1/workflows/{id}/participantsList workflow participants
Fields · 4
idstringComment id
userobjectAuthor
messagestringComment text
createdAtdatetimeTime posted

Test workflow

  1. Prepare. Select the Ironclad setup for your workflow and review its starting records, including workflows, workflow schemas, records.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Northwind NDA moved to Sign
  • Globex MSA still in Review with Finance pending
  • Initech DPA unchanged
  • Umbrella order form in Review
  • No approvals recorded on another user's role

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · Ironclad
version: 2
connector: ironclad
seed: ironclad-starter
mode: isolated
policy: >
  Move contracts forward where every approval is complete, and launch the
  Umbrella order form for review. Never mark an approval for a role you don't
  hold.
tasks:
  - id: launch-an-nda-workflow-from-the-right-template
    prompt: Launch an NDA workflow from the right template
  - id: route-a-redlined-contract-to-the-required-approvers
    prompt: Route a redlined contract to the required approvers
  - id: move-a-fully-approved-contract-to-the-sign-step
    prompt: Move a fully approved contract to the Sign step
expected:
  - Northwind NDA moved to Sign
  - Globex MSA still in Review with Finance pending
  - Initech DPA unchanged
  - Umbrella order form in Review
  - "No approvals recorded on another user's role"
scenarios:
  - rate-limited
  - missing-launch-field
  - permission-denied

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
rate-limitedThe API returns 429
missing-launch-fieldLaunch without a required form field returns 400
permission-deniedApproving a role the user doesn't hold returns 403
webhook-twiceThe workflow updated webhook arrives two times

Starting data

Start each run from the same records and relationships. The overview below describes the Ironclad starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
workflows40 in Create, Review, Sign and Archive steps
templatesNDA, MSA, DPA and order form templates with launch forms
approvalsLegal, Finance and Security approver roles
clause libraryStandard and fallback clauses for liability and term
records300 executed contracts with metadata

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Workflows records

Workflows

Contract requests moving through review and approval.

FieldTypeMeaning / relationship
idstringWorkflow id
titlestringTitle
templatestringTemplate id
statusstringactive, completed, cancelled or paused
stepstringCurrent step
attributesobjectForm values
json · illustrative record shape
{
  "id": "<Workflow id>",
  "title": "<Title>",
  "template": "<Template id>",
  "status": "<active, completed, cancelled or paused>",
  "step": "<Current step>",
  "attributes": {}
}

See workflows operations

Workflow schemas records

Workflow schemas

The fields each workflow template collects.

FieldTypeMeaning / relationship
idstringTemplate id
namestringTemplate name
schemaobjectAttribute definitions
rolesarrayApprover and reviewer roles
json · illustrative record shape
{
  "id": "<Template id>",
  "name": "<Template name>",
  "schema": {},
  "roles": []
}

See workflow schemas operations

Records records

Records

Executed contracts stored in the repository.

FieldTypeMeaning / relationship
idstringRecord id
namestringRecord name
typestringRecord type
propertiesobjectContract metadata
lastUpdateddatetimeLast update
json · illustrative record shape
{
  "id": "<Record id>",
  "name": "<Record name>",
  "type": "<Record type>",
  "properties": {},
  "lastUpdated": "<Last update>"
}

See records operations

Workflow comments records

Workflow comments

Discussion on a contract request.

FieldTypeMeaning / relationship
idstringComment id
userobjectAuthor
messagestringComment text
createdAtdatetimeTime posted
json · illustrative record shape
{
  "id": "<Comment id>",
  "user": {},
  "message": "<Comment text>",
  "createdAt": "<Time posted>"
}

See workflow comments operations

See the Ironclad world in the catalog