Stage contracts for human review instead of creating them directly as active contracts:
POST /draft-contracts- Create a contract in the "draft" holding stateGET /draft-contracts/{id},PUT /draft-contracts/{id}, andDELETE /draft-contracts/{id}- Retrieve, replace, or delete a draft contract- Compatibility: the existing
/pending-contractsendpoints remain available with their current request and response shapes
Draft contracts appear in the Rillet UI under "Draft" for an operator to approve or reject.
Deduplication via external_references: to prevent duplicates on retry, attach at least one external_references entry with a stable (type, id) pair. Re-posting with any matching pair replaces the prior draft record. Draft contracts created without external_references are not deduplicated — every POST creates a new record.
Each reference's type slug must already be defined under Rillet Settings → External References for your organization. References attached at create time are preserved when the draft contract is later promoted to an active contract.
Once a draft contract is approved in the UI it becomes a regular contract.
