Skip to main content

Pact Broker overview

Apiome is a Pact Broker. The pact-broker CLI, the pact CLI, pact-js and pact-jvm work against it unchanged: give them your workspace's broker base URL (https://api.apiome.dev/v1/tenants/<workspace>/pact-broker) and an API key as the token. Consumers publish their pacts, providers verify them and report back, deploy jobs record what runs where, and can-i-deploy stops a release that would break something.

All of it is served through the API and the Pact tools, and all of it can be done in the Contracts workspace of the app: every apiome pact command has a screen there, and every screen that changes something shows the command that does the same (one model, every surface).

When to use it​

  • You test with Pact and want the broker next to your specs. Your pacts, verification results and deployments live in the same workspace as the projects that describe your APIs, under the same members, roles and API keys.
  • You are moving off a self-hosted Pact Broker. Point the same CLI commands and library options at Apiome; Pact Broker compatibility lists every endpoint and whether Apiome serves it.
  • You want consumer pacts without writing Pact tests. Run the consumer against Apiome's hosted mock and let Apiome write the pact from its calls — recorded on the page, from past traffic, from mock scenarios, or on every CI run — then serve the published pacts back as a stub. Neither Pact Broker nor PactFlow does this.
  • You want deploys gated on contracts. Ask can-i-deploy before each deployment, and let contract webhooks start a provider build when a pact changes.

Set up in ten minutes​

Set up contracts takes a workspace from nothing to a yes or no before every deploy, on one page you can leave and come back to. Click Contracts in the rail, then click “⋯” → “Set up contracts” — or “Open the guided set-up” on the landing's first-run checklist, or on Settings → CI and commit statuses. The page is /ade/dashboard/pacts/setup.

Set up contracts: six numbered sections. Who talks to whom and Where things run are Done, Connect your pipelines is Next and open with a Create a key button, the two broker variables and two repositories ticked for Write secrets, and three sections are To do. The side panel shows 2 of 6, about 8 minutes left, what you get at the end, and the apiome pact setup command.Set up contracts: six numbered sections. Who talks to whom and Where things run are Done, Connect your pipelines is Next and open with a Create a key button, the two broker variables and two repositories ticked for Write secrets, and three sections are To do. The side panel shows 2 of 6, about 8 minutes left, what you get at the end, and the apiome pact setup command.
Route/ade/dashboard/pacts/setup

The six sections come in the order they depend on each other. Each shows Done, Next or To do; only the next one is open, and clicking a section's title opens or closes any of them. A section is Done when what it sets up exists — whoever made it, here, in CI or from the CLI — so nothing is set up twice when you come back.

  1. Who talks to whom. Apiome proposes a pacticipant for every project (as a Provider) and for every registered repository no project is read from (as a Consumer), with where it was found and its owner team. Tick the ones that talk to each other and click “Create N pacticipants”. One that already exists reads Already a pacticipant and cannot be created again. With nothing to propose, click “Add one by hand” or follow import a project.
  2. Where things run. Tick production, staging or development, or type another name and click “Add another”; leave “Require a verified contract before anything reaches production” ticked to make can-i-deploy refuse a version with no contract there. Click “Create N environments”.
  3. Connect your pipelines. Click “Create a key”: an API key that can publish pacts, read verdicts and record deployments. It is shown once — click “Copy”. Under Where to point are the two variables every Pact tool reads, PACT_BROKER_BASE_URL and PACT_BROKER_TOKEN. Under Add them to, tick your GitHub repositories and click “Write secrets to N repositories”: Apiome stores both as Actions secrets with the GitHub account each repository was registered with, and lists each repository as written or not written with the reason. Coming back later, the section shows the key's prefix instead of offering a second key; paste the key into The key to store to write it to another repository. Wired your pipelines another way? Click “I connected them myself”.
  4. The first consumer pact. Record it from the mock is chosen for you: click “Record from the mock” to run your consumer against the hosted mock and let Apiome write the pact (Pact from a mock). Or choose We already write Pact tests and click “Publish a pact” (Publish and fetch pacts), or Start from the spec and click “Derive a pact” (Export a contract). The section is done when the first pact is published.
  5. The provider's side. Under The spec as the contract, click “Turn on” beside a provider to publish each published version of its project as its provider contract (bi-directional) — no provider test to write. To replay pacts against a running provider instead, or as well, click “Run a verification” (hosted verification). If your own pipeline verifies the provider, click “Our pipeline verifies the provider”.
  6. Gate deploys and tell people. Leave “Add a can-i-deploy step to each pipeline” and “Record deployments on merge” ticked, choose the Environment, check the pacticipant beside each repository, and click “Open N pull requests”. Each pull request adds .github/workflows/apiome-contracts.yml from the branch apiome/contracts-setup. Click “Show the workflow” to read the file first. Commit statuses are on by default and notifications are webhooks; the section links to both. Click “Finish set-up”.

“Finish later” returns to Contracts; everything done so far is kept, and anyone with the Contracts admin permission can pick the page up. “I already have a broker” opens the Migration wizard instead.

What the page shows in special cases​

WhenWhat you see
Apiome finds no project or repositorySection 1 says so and offers Add one by hand and import a project
No registered repository has a linked GitHub accountAdd them to becomes two gh secret set commands to copy, and section 6 offers only Show the workflow — the file to add by hand
A repository cannot be written to (no admin access, a branch rule, an archived repository)That repository is listed as not written, or No pull request, with GitHub's reason and the workflow to add by hand; the others still go through
A pull request from the set-up is already openIt is listed as Pull request already open with its link; its branch is brought up to date
The workspace was migrated from a brokerSections 1 and 2 arrive Done, and the side panel says the workspace was copied
You are not a Contracts adminThe page is readable; each section reads Ask a Contracts admin to do this step in place of its buttons
Projects and repositories number more than 200The first 200 are proposed and the page says how many are not listed

The same, from a script​

apiome pact setup does sections 1, 2, 3 and 6 for a workspace created by script, and can be run again: what exists is reported as already there and left alone.

export PACT_BROKER_BASE_URL=https://api.apiome.dev/v1/tenants/acme/pact-broker
export PACT_BROKER_TOKEN=$APIOME_API_KEY

apiome pact setup # show the six sections and how far the set-up is
apiome pact setup --from-projects \
--environments production,staging --require-contract \
--ci github --write-secrets # pacticipants, environments, pull requests, secrets
apiome pact setup --from-projects --ci github --dry-run # print what a run would do
FlagWhat it does
--from-projectsCreates a pacticipant for each proposed project and repository that has none
--environments a,bCreates the environments that do not exist; production is marked production
--require-contractWith --environments: can-i-deploy to production requires a contract
--ci githubOpens the pull requests of section 6 for every GitHub repository a pacticipant names, and prints the workflow for any it could not open one in. Other CI systems have recipes on Run Pact in CI
--ci-environment nameThe environment the pipeline asks about (default: production, else the first)
--write-secretsStores this command's own broker address and key as the two Actions secrets
--dry-runPrints what a run would do and changes nothing

Every pacticipant, environment and repository ends as one line — created, already there, opened, written, or skipped with the reason. The command exits 1 when anything failed; a repository skipped with a reason is not a failure. The command cannot create its own first key: create one on the page or under API keys.

The page reads GET /v1/tenants/{t}/pact-setup and saves its own marks with PUT on the same path; secrets and pull requests are POST …/pact-setup/github/secrets and POST …/pact-setup/github/pull-requests (REST reference). Reading needs Pacts: view; every action on the page needs the Contracts admin permission (Pacts: delete — Admin and Owner). Saving, writing secrets and opening pull requests are recorded in the access audit as pacts.setup.update, pacts.setup.github.secrets and pacts.setup.github.pull_requests; the key's value is never stored or recorded.

Where you work from​

WhereBest forDetails
The Contracts workspace in the appEverything a command does — publishing pacts and provider contracts, running verifications, managing pacticipants, versions and environments, settings, migrating and exporting — plus reading verdicts and historyThe Contracts workspace
The Pact CLI (pact-broker, pact broker)Publishing, recording deployments and can-i-deploy from CIPublish and fetch pacts
The Apiome CLI (apiome pact …)The same commands with the same flags and exit codes, plus provider contracts and hosted verificationThe apiome pact commands, Run Pact in CI
A CI pipeline (GitHub Actions, GitLab CI, Bitbucket, Jenkins, Azure Pipelines)Publish, can-i-deploy and record-deployment as ready-made steps, with the verdict on the pull requestRun Pact in CI, Commit statuses
An AI agent (the pact MCP tools)Listing pacts, reading the matrix, asking can-i-deploy and recording deployments from a chatAsk from an AI agent
A Pact library (pact-js, pact-jvm, …)Publishing from the consumer's tests and verifying in the provider'sChoose pacts to verify with selectors
The Pact Broker API (…/pact-broker/…)Anything a Pact tool does, from a scriptPact Broker API
The Pacticipants API (…/pacticipants/…)Registering applications, labels, deletes and retentionPacticipants API

The Contracts workspace​

Click Contracts in the rail (under Ship). It opens on the Contracts landing: what needs your attention, every integration, and where to start. A row of tabs under the title — Overview, Pacticipants, Matrix, Can I deploy, Verification, Environments, Webhooks, Health and Settings — is on every Contracts page, with the page you are on highlighted. Every screen is open to anyone who can view pacts, and each empty screen shows the CLI command that fills it.

The Contracts landing: the tab row with Overview selected, a status strip reading 1 failing, 1 stale, 1 without a provider contract and 1 pending with the failing detail open, a facts line (6 integrations, 3 verified, 9 pacticipants, 3 environments), the integrations table worst first, and Start something grouped by consumer, provider and pipeline.The Contracts landing: the tab row with Overview selected, a status strip reading 1 failing, 1 stale, 1 without a provider contract and 1 pending with the failing detail open, a facts line (6 integrations, 3 verified, 9 pacticipants, 3 environments), the integrations table worst first, and Start something grouped by consumer, provider and pipeline.
Route/ade/dashboard/pacts

What the landing shows​

  • The status strip. One chip each for failing, stale, without a provider contract and pending integrations, shown only when there is one. The worst chip is open; click a chip to read its detail instead. Show the failing ones and Show the stale ones filter the table.

  • The facts line. How many integrations, how many are verified, and how many pacticipants and environments the workspace has. Click “Show stats” for the contract health rollup: pairs per state, pass rate, flakiness and mean duration.

  • The integrations table. One row per consumer → provider pair, worst first:

    ColumnWhat it says
    IntegrationThe consumer and the provider, each linked to its page, with the consumer version of the newest pact and the provider version that last verified it
    KindPact (a provider verifier replays the pact) or Bi-directional (a provider contract is compared with it)
    Latest verdictFailing, Stale, No provider contract (nothing to compare it with yet), Not verified yet or Verified, and Pending while the provider has never passed it (pending pacts)
    Deployed together inThe environments where both sides are deployed now
    VerifiedWhen the newest result was recorded, or never

    Type in the search box and press Enter to match consumer and provider names. The chips — All, Failing, Stale, Bi-directional and Mine (a team you are on owns either side) — filter the rows, and Previous / Next page through them. The search, the chip and the page are kept in the address, so you can share the link. Anything in the address the page cannot use (an unknown filter, a page that does not exist) is listed under the toolbar, and the default is used instead. Each row's ⋯ menu opens the pact, its verification history, the pair's health, or Can I deploy? for its consumer version. Click “Network” to draw the integrations on the page as a network.

  • Start something. The ways in, by who you are: I consume an API, I provide an API and I run the pipeline. Each entry opens its screen; the first, Generate a pact from a mock, records a consumer's calls to a hosted mock and writes the pact. Until one integration is verified, a Your first contract, in four steps checklist is shown above them.

The header's Publish a pact and Publish provider contract, and its ⋯ menu (Run a verification, Derive a pact from a project, Can I deploy?, Set up contracts, Migrate from a broker), open the same screens. Publish provider contract is also the action of the strip's without a provider contract chip. Only a role that can publish pacts (Pacts → Create) sees the header actions and Start something; anyone who can view pacts sees the strip and the table.

A workspace with no pacts shows No contracts yet instead of the strip and the table, with the checklist open. If the integrations cannot be read, one banner says why, with Try again.

Every screen​

ScreenTabWhat it shows
Contracts (this landing)OverviewWhat needs attention, every integration, and where to start
PacticipantsPacticipantsEvery application in your pacts; create one with New pacticipant. Each one's page has Overview (branches, environments and pacts), Versions (tag, delete and restore versions) and Settings (name, main branch, labels, badges, delete)
Pact detailPacticipantsOne pact's interactions, its verification status and what changed since the previous pact
NetworkPacticipantsThe pacticipants connected through pacts, each integration coloured by its verdict
VerificationPacticipantsA provider's results with their logs and mismatches; re-run one pact or verify the stale ones
MatrixMatrixWhich consumer versions were verified against which provider versions, with the verdict explained
Can I deploy?Can I deployWhether one version is safe to deploy to an environment, and the CLI command that asks the same
Run a verificationVerification (/ade/dashboard/pacts/verification/new)Choose a provider version and its pacts, preview the run, watch it live, or upload a verifier's results
EnvironmentsEnvironmentsWhich version runs where and its history; New environment, Record a deployment, Record a release, undeployments and end of support; the deploy simulator
WebhooksWebhooksContract webhooks and every delivery; create, test and redeliver
Contract healthHealthEach pair rolled up into one state, with pass-rate and flakiness trends; re-publish requests
Clean-upSettings → Clean-upWhat is kept, what the nightly clean-up would remove now, and Recently deleted with Restore
SecretsSettings → SecretsThe workspace secrets, where each is used, and those waiting for a value
CI and commit statusesSettings → CI and commit statusesWhich commit statuses are written, and a pipeline recipe for each CI system
Verification settingsSettings → Verification scheduleStale thresholds, verification schedules and per-pair overrides
AgentsSettings → AgentsWhat an AI agent may do with contracts through the pact MCP tools
Pact comparisonsPacticipants (/ade/dashboard/pacts/comparisons)The fidelity report of each bi-directional comparison
Provider statesPacticipants (/ade/dashboard/pacts/provider-states)A provider's registered states, and a check of its pacts against them before a run
Set up contractsOverview (/ade/dashboard/pacts/setup, “⋯” → “Set up contracts”)Six resumable sections from an empty workspace to a yes or no before every deploy
Generate a pact from a mockOverview (/ade/dashboard/pacts/from-mock, Start something → “Generate a pact from a mock”)Record a consumer's calls to a hosted mock, review the pact Apiome writes from them, and publish it
Publish a consumer pactOverview (/ade/dashboard/pacts/publish, “Publish a pact”)Upload, paste, write or derive pacts, check them against what is published, and publish them for a consumer version
Publish a provider contractOverview (/ade/dashboard/pacts/provider-contracts/new, “Publish provider contract”)A project version or an uploaded OpenAPI or AsyncAPI document with graded evidence, a preview of every consumer's verdict, and standing sources
Migrate from a brokerOverview (/ade/dashboard/pacts/migrate, “⋯” → “Migrate from a broker”)Copy a Pact Broker or PactFlow workspace, check that both brokers agree, and keep copying until everyone has moved
ExportOverview (/ade/dashboard/pacts/export, “⋯” → “Derive a pact from a project”)A pact from a project, a Postman collection, a stored pact file, or provider test scaffolding

One model, every surface​

The app, apiome pact, the Pact CLI and libraries, the GitHub Action and the pact MCP tools all read and write the same Pact Broker API, so whatever one of them records the others see at once.

  • Every command has a screen. Each of the 28 apiome pact commands is done from a Contracts screen; The same command, in the app lists where.
  • Every screen shows its command. A screen that changes something has a The same, from anywhere block: what you filled in as an apiome pact command, a Pact CLI command, a GitHub Action step and a REST request, with secrets written as variables. An action no command does yet (editing a webhook, a workspace secret, stopping a live run) says why and shows the REST request.
  • CI keeps it that way. A new command without a screen, or a new Contracts write without a command or a written reason, fails the build (The CLI ↔ UI parity ledger).

The landing reads GET /v1/tenants/{t}/pact-integrations (REST reference).

A project's Consumers screen can also publish a pact to the broker while you import it: click “Import Pact file” and tick “Also publish to the Pact Broker”; its open the Publish page link carries the pact over to the full page.

At a glance​

ToRead
Learn the words: pacticipant, version, branch, tag, pact versionPact Broker concepts
Browse your pacticipants, their versions and what runs wherePacticipants
Read a pact's interactions, verification status and changes since the previous onePact detail
See which applications depend on each other, and where a pact failsIntegration network
Publish a consumer's pacts and fetch them backPublish and fetch pacts
Get a consumer's pact from its calls to the hosted mock, with no Pact libraryPact from a mock
Build a pact from past mock traffic, or from operations × mock scenarios with no trafficOther sources
Record a pact on every CI run; hold one that asks for less than the lastRecord from a pipeline and keep it current from CI
Expect only the response fields a consumer reads; record GraphQL, gRPC and event pactsReport which fields the consumer reads and other protocols
Give consumer teams a stub that answers only what the published pacts promiseServe pacts as a mock
Tell a provider's verifier which pacts to checkChoose pacts to verify with selectors
Verify a new expectation without breaking the provider's buildPending and work-in-progress pacts
Report whether a provider version honours each pactPublish verification results
Read a result's expected and actual values, re-run a pact, verify stale pactsVerification results and re-runs
Verify pacts on a cadence; ask consumers to re-publish stale pactsStale pacts and verification scheduling
See each pair's health in one state; follow pass-rate, flakiness and duration trendsContract health and verification analytics
Turn a pact into replayable cases with a fixed digestCompile a pact into a contract suite
Verify a provider without a Pact library, from ApiomeVerify a provider from Apiome
Tell Apiome how to set up the provider states pacts nameProvider states
Record which version runs in each environmentEnvironments and deployments
See which version runs where; simulate a deployment before you make itEnvironments and the deploy simulator
Ask whether a version is safe to deployCan I deploy?
Query which consumer versions were verified against which provider versionsMatrix
Register a provider's OpenAPI document for bi-directional contract testingPublish a provider contract
See how a pact is compared with a provider's OpenAPI documentComparison rules
Check message pacts against a provider's AsyncAPI documentMessage pacts
Start CI when a pact needs verifying or a verification finishesContract webhooks
Run the consumer, provider and deploy steps in your CIRun Pact in CI
Create, test and manage webhooks in the app; read and redeliver deliveriesWebhooks and delivery log
Keep a CI token once and use it from webhooks and verification targetsSecrets for webhooks and targets
See each pact's verdict on the GitHub or GitLab commit and pull requestCommit statuses
Run a consumer's pact against a provider build in Postman or NewmanExport a pact as a Postman collection
Show in a README whether a public project's pacts are verifiedPact badges
Group applications, undo a delete, clean up old versionsLabels, deletes and retention
See how fast the matrix and the verification console stay as history growsScale and performance
Move an existing Pact Broker or PactFlow workspace to ApiomeMigrate from Pact Broker or PactFlow
Run Apiome as your own brokerSelf-host the Pact Broker
Check which Pact Broker endpoints Apiome servesPact Broker compatibility

How the pieces fit​

  1. The consumer publishes. Its Pact tests write a pact file — or Apiome writes it from the consumer's calls to the hosted mock — and its build publishes it with the consumer version and branch. The consumer and the provider are registered as pacticipants the first time a pact names them. Identical pacts are stored once as one pact version, so an unchanged pact is verified once.
  2. A webhook starts the provider. A contract_requiring_verification_published webhook fires for each provider version that has not verified the pact yet — the head of the main branch and what is deployed or released — and can start a GitHub Actions workflow directly.
  3. The provider verifies. Its verifier sends consumer-version selectors ({ mainBranch: true }, { deployedOrReleased: true }) and gets each pact to check once. With enablePending, a new expectation comes back pending and its failure does not fail the build.
  4. The verifier reports back. It publishes a result per pact: passed or failed, with the outcome of each interaction. Results are what the matrix is made of.
  5. Deploy jobs record where versions run. pact-broker record-deployment (or record-release) records each version in its environment, replacing the one deployed there before.
  6. Can-i-deploy decides. Before each deployment, pact-broker can-i-deploy reads the matrix against what runs in the target environment and answers yes, no or unknown, with a reason for each integration. The job stops when the answer is not yes.

Apiome as the verifier. A provider without a Pact library in its language can leave steps 3 and 4 to Apiome. One request verifies it from Apiome: the same selectors pick the pacts, each pact is compiled into a contract suite, the provider states are set up, and every interaction is replayed against a registered verification target. Apiome then publishes a result for each pact. This covers HTTP interactions, gRPC calls recorded by the Pact protobuf plugin, and GraphQL operations.

Bi-directional instead of a verifier. A provider that does not run Pact verification publishes its OpenAPI document as a provider contract instead, with self-verification evidence from a tool such as Schemathesis, Dredd or Newman. Apiome compares each pact with that document by the comparison rules as soon as either side publishes, and stores the verdict as a verification result, so steps 4 and 6 work the same way. A consumer without Pact tests can export a pact from the surface it declared in Apiome. A provider that sends messages publishes its AsyncAPI document instead, and its consumers' message pacts are compared with it the same way.

Pacts from mocks. A consumer that runs against the hosted mock already shows what it relies on. Tag its calls with X-Mock-Capture and Apiome turns them into the consumer's pact: grouped by operation, provider states taken from the scenario or session behind each answer, values matched by type or by the spec, and — when the consumer reports which fields it reads — only those fields. REST, GraphQL, gRPC and event-channel calls all record. apiome pact record and the GitHub Action's record command do it from CI, and a recording policy decides per mock and consumer whether each build's pact is published or held for review when it got looser. In the other direction, a pact stub answers consumer teams with what the published pacts promise rather than everything the spec allows.

Inside the registry. The broker is not a separate tool beside your specifications; its data flows into them:

  • One consumer model. A published pact becomes the consumer's next contract revision in the provider's project, so breaking-change analysis sees consumers that publish pacts.
  • The deploy gate. The project deploy gate has a contracts signal that gives the same verdict as can-i-deploy.
  • The publish gate. A version publish can warn or be blocked on failing contracts.
  • Diff and CI. apiome diff --consumers and the diff-action name the pacticipant behind each consumer verdict.
  • Browse and the portal. Public project pages show pact badges and the consumers that depend on the project.

Along the way, badges show the state of a public project's pacts, and retention keeps the registry small: it deletes old versions but keeps anything deployed or released, and always starts as a dry run.

Who can do what​

Everything here is guarded by the Pacts resource. Viewer can read; Editor can publish, verify, record deployments and create webhooks — give CI an API key from an Editor; only Admin and Owner can delete. Each page's Who can do what section has the details, and custom roles get Pacts on Roles.