SpoolisDocs

Spoolis docs

Quickstart

Run one acceptance in the sandbox, read the Outcome, and verify its signed receipt.

1. Mint a sandbox session

Run one request and keep the returned token.

terminal
curl -sS -X POST https://spoolis.com/api/sandbox/session > session.json

Expected checkpoint: session.json contains token, expires_at, and limits.
Keep: token.

2. Run one acceptance

Send the criteria, evidence, and deterministic check in one request.

terminal
TOKEN=$(node -p 'require("./session.json").token')
curl -sS -X POST https://spoolis.com/api/v1/verify   -H "Authorization: Bearer $TOKEN"   -H "Content-Type: application/json"   -d '{
    "conditions": [{
      "description": "Every row includes status",
      "deterministic_check": {
        "checker": "completeness",
        "required_fields": ["status"]
      }
    }],
    "max_amount_cents": 3,
    "unit": { "total_units": 3, "unit_amount_cents": 1 },
    "evidence": {
      "type": "dataset",
      "rows": [
        { "id": 1, "status": "complete" },
        { "id": 2, "status": "complete" },
        { "id": 3 }
      ],
      "provenance": "api_response"
    }
  }' > verify.json

Expected checkpoint: earned_cents is 2, accepted is 2, and rejected is 1. The one rejected unit includes its verifier reason.

3. Read the Outcome

The response reports accepted, rejected, rejections with reasons, earned_cents, the signed receipt, and its receipt_url.

4. Verify the Outcome

Save the returned receipt, then verify schema spoolis/outcome-receipt@1 with the CLI or @spoolis/receipt-verifier. The CLI automatically selects the demo trust set.

terminal
node -e 'const x=require("./verify.json");require("node:fs").writeFileSync("outcome-receipt.json",JSON.stringify(x.receipt,null,2)+"
")'
npx -y @spoolis/cli verify outcome-receipt.json

Expected checkpoint: the CLI reports a valid demo receipt. The Outcome still reports earned_cents as 2 and accepted as 2.

Move to production

Production verification is self-serve. The same call you just made works against your account:

  1. Create an account, then mint a production API key at /dashboard/api-keys. The spk_live_ key is shown once.
  2. Replace the sandbox bearer token with that key on the same POST /api/v1/verify call. Set "settlement": "external" (the default): Spoolis verifies and issues the signed Outcome; your existing payment stack acts on it.
  3. Each account includes 10 verification runs per calendar month before any payment; after that, prepaid usage credits apply.
  4. Verify production receipts with environment: 'production' and the published trust set.

Production enablement is a separate, optional step that applies only to managed settlement (Spoolis-coordinated payment). Verification and Outcome issuance never require it.

5. Choose what you want to do next

Try your own Spool

Compile a sandbox Spool with no account, then verify it yourself.

Try your own Spool
Acceptance quickstart · Spoolis