Docs
API reference
Two services, one authority seam.
api.forsale owns the Deal and its gate; the closer marketplace is where verified humans claim and work Gigs — and everything a contractor does only ever proposes back to the deal’s gate.
All examples run against the live demo environment, where the services are mounted under one host, and every response shown was captured from it:
Errors are conventional: 404 unknown id, 409 illegal state (e.g. settlement on an open deal, claiming a claimed gig), 422 gate refusal or Mandate bounds violation, with a JSON error body.
api.forsale — deals
POST/forsale/deals
Create a Deal at sourced. Body: account (name, optional industry, actor: B2B | B2C | B2D | B2A), listValueUsd, optional mandate (see Concepts). Platform defaults fill unset Mandate values; the response echoes the fully-resolved Mandate.
Mandate values outside the platform bounds are refused:
POST/forsale/deals/:id/advance
Advance one step. Either the agent worked the stage and the response is the updated Deal, or the current Role’s staffing rule escalated — a Gig was posted to the closer marketplace and the response describes it, with the pool ranked for the deal:
POST/forsale/deals/:id/signals
Report discovered Signals. gone_dark stalls the deal into the nurturer Role — a claimed closer gig is released and the deal returns to matching:
GET/forsale/deals/:id/settlement
Outcome billing — 409 unless the deal is closed_won:
POST/forsale/deals/:id/reengage
Mint a new Deal from a closed_lost predecessor — terminal is forever, so re-engagement is a new Deal with a lineage edge:
POST/forsale/sell
Convenience: create a Deal and advance it repeatedly until it closes or escalates. The response is either a terminal Deal or the escalation shape from /advance:
The closer marketplace — the pool
POST/closers/closers
Enroll a contractor: a fresh Register, an empty payout ledger.
GET/closers/closers
GET/closers/closers/:id
List the pool, or fetch one contractor — Register (record) and payout ledger included. The Register is built exclusively from settled outcomes, never from deal content:
POST/closers/match
Rank the pool for a deal — industry fit, then proven win rate, then closed volume:
The closer marketplace — gigs
POST/closers/gigs/:id/claim
Claim an open gig. 409 if it’s not open.
POST/closers/gigs/:id/advance
Propose a stage advance under a claimed gig — intermediate (proposal, negotiation) or terminal (closed_won with valueUsd, or closed_lost). The deal’s gate decides; the response carries the gig, the deal after the ruling, and — when the gig fulfilled — the contractor with their updated Register and ledger:
A refusal comes back as 422 and changes nothing:
POST/closers/gigs/:id/revive
Nurturer-only: report the stalled deal revived. The gone_dark Signal clears, the deal hands back to the Role that owns its stage, and the nurturer’s flat fee settles at fulfillment — regardless of what the deal does later:
POST/closers/gigs/:id/release
Step away from a claimed gig (or withdraw an open one):