Manage contract releases
Create a reviewed consumer API, synchronize selected source changes, and publish a governed release from the CLI.
Requires evlio-cli 1.2.0 or later. Run evlio --version to check your installed version.
Create and inspect a draft
evlio --json collection list
evlio contract list
evlio --yes contract create --from partner-contract.json
evlio --json contract show "Partner API" > contract-snapshot.json
Save the following definition as partner-contract.json. Replace the example collection ID, collection name, and operation with values from your workspace. This is a contract definition; import your OpenAPI document as a collection first.
{
"name": "Partner API",
"audience": "partner",
"description": "Partner access to orders",
"collections": [
{
"collection": "0123456789abcdef01234567",
"collectionName": "Orders",
"endpoints": [
{
"method": "GET",
"path": "/orders"
}
],
"sourceEndpoints": [
{
"method": "GET",
"path": "/orders"
}
]
}
],
"publishing": {
"platforms": [],
"platformConfigs": [],
"publicArtifacts": false,
"mockServer": false,
"mcpServer": false
},
"governance": {
"breakingChangePolicy": "block",
"requireApproval": false,
"stakeholders": []
}
}
Creation saves a draft. This example leaves publishing destinations and public sharing disabled and blocks breaking changes. Set the destinations and approval policy your team needs before publishing. Provider credentials are configured in Evlio.
Update reviewed content
evlio --yes contract update "Partner API" --from reviewed-contract.json
Save your reviewed changes to reviewed-contract.json, using either a sparse patch such as {"description":"Revised partner API"} or an edited contract snapshot. Updating a snapshot does not publish it. Use Compose to change endpoint selection and Schema to refine selected endpoints.
Synchronize source changes
Inspect drift in contract show after rescanning or reimporting a source. Prepare a reviewed sync file with the complete desired endpoint selections, any endpointSchemas needed to resolve field drift, and refreshedCollections identifying only the fully resolved sources. Omitting refreshedCollections or supplying an empty list can mark all existing sources refreshed, so provide it explicitly.
evlio --yes contract sync "Partner API" --from reviewed-sync.json
evlio --json contract show "Partner API"
Sync applies your reviewed change set; it does not choose merges or publish a release. Content changes can invalidate an earlier approval.
Approve and publish
evlio --yes contract approve "Partner API" --note "Reviewed endpoint selection and schemas"
evlio --yes contract publish "Partner API"
An assigned approver can approve or reject with contract reject and --note. Admin access alone does not make someone an assigned approver. If the release requires explicit acknowledgment, review the reported breaking changes and rerun publish with --acknowledge-breaking-changes.
Inspect the result for every destination: published, unchanged, skipped, or failed. A nonzero exit after partial publication does not roll back successful destinations. Correct the failing destination and retry, then inspect contract show and test the published consumer surface.
Reject or remove a contract
evlio --yes contract reject "Partner API" --note "Exclude internalNotes before release"
evlio --yes contract delete "Partner API"
Notes are up to 500 characters. Removing a contract also removes its generated artifacts and deployment, so check who consumes it first.
To start a draft without a definition file, use evlio --yes contract create --name "Partner API" --audience partner. The audience can be partner, internal, public, or ai_agent. See the CLI command reference for every contract option.
On this page
- Manage contract releases