Skip to main content

What is Done?

Done gives you a REST API to create claims — on-chain-style commitments backed by programmable fulfillment conditions. When the condition is met, the claim is confirmed. If it isn’t, the claim fails. Use cases include:
  • Delivery guarantees — claim confirms when a file is downloaded or a job finishes
  • Multi-party agreements — claim confirms only after all signatories submit their approval event
  • SLA enforcement — claim fails if no activity is recorded within an activity window
  • Conditional payments — trigger fulfillment from any event your system can emit

Core concepts

Schemas

A schema is a reusable contract template. It defines the price, time windows, and the fulfillment condition. Create one schema and mint as many claims from it as you need.
{
  "contract": {
    "price": 100.00,
    "activity_window": 3600,
    "review_window": 86400,
    "timeout_outcome": "fail",
    "fulfillment_condition": {
      "op": "AND",
      "conditions": [
        { "event": "signed_by_buyer" },
        { "event": "signed_by_seller" }
      ]
    }
  }
}

Claims

A claim is an instance of a schema. It captures a snapshot of the contract at creation time and maintains its own event log. The contract on a claim never changes — schema updates do not affect existing claims. Claims are state machines:
StateMeaning
OPENAccepting events. Fulfillment condition is evaluated on every event.
PENDINGCondition was satisfied or activity window elapsed. Waiting for the review window.
CONFIRMEDClaim confirmed. Terminal.
FAILEDClaim failed. Terminal.

Events

You push events to a claim via POST /v1/events with a claim_id in the body. Each event has a type string — this is the value the fulfillment condition matches against. When the full set of submitted event types satisfies the condition, the claim atomically transitions to PENDING with scheduled_outcome = CONFIRMED.

API base URL

https://api.done.app
All endpoints are versioned under /v1.

Next steps

Quickstart

Create a schema, mint a claim, and submit an event in under 5 minutes.

Authentication

Generate an API token and learn how to authenticate requests.

Claim lifecycle

Understand the claim lifecycle and how transitions are triggered.

Fulfillment conditions

Learn the boolean expression tree that controls when a claim resolves.