> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enfinitos.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Send your first signed delivery event into EnfinitOS and verify the resulting proof pack with the open-source auditor — using only curl.

This quickstart takes you from a fresh sandbox tenant to a verified proof
pack in a few minutes, using nothing but `curl` and the open-source
auditor. You will:

1. Authenticate to your sandbox tenant.
2. Find an active right to deliver against.
3. Observe a delivery event.
4. Seal and fetch the signed proof pack.
5. Verify the pack offline with the open-source auditor.

<Note>
  The hosted sandbox is available now. Request access at
  [enfinitos.com/apply](https://enfinitos.com/apply); once your application is
  approved you receive an activation email, and you exchange that for a `/v1`
  sandbox key in the [integration playground](https://enfinitos.com/developers/playground).
  Self-service key issuance from the developer dashboard lands at the April 2027
  production launch.
</Note>

Every request is a bearer-authenticated call to
`https://sandbox.api.enfinitos.com/v1/*`, and every response uses the same
envelope:

```json theme={null}
{ "ok": true, "data": { ... }, "contractVersion": "v1.0" }
```

Errors use the same shape with `"ok": false`, a machine-readable `error`
code, and a human-readable `message`:

```json theme={null}
{ "ok": false, "error": "VALIDATION_FAILED", "message": "`rightId` is required.", "contractVersion": "v1.0" }
```

## 1. Authenticate

Set your key and read your tenant. `GET /v1/tenant` returns your tenant
snapshot, your developer profile, and the scopes on your key.

```bash cURL theme={null}
export ENFINITOS_API_KEY="sk_sandbox_..."

curl https://sandbox.api.enfinitos.com/v1/tenant \
  -H "Authorization: Bearer $ENFINITOS_API_KEY"
```

```json Response theme={null}
{
  "ok": true,
  "data": {
    "tenant": {
      "tenantId": "tnt_...",
      "orgId": "org_...",
      "counts": { "rights": 3, "proofPacks": 0, "events": 0 }
    },
    "key": { "keyId": "key_...", "scopes": ["rights:read", "delivery:write", "proof:read"] }
  },
  "contractVersion": "v1.0"
}
```

## 2. Find an active right

You deliver against an **active right** (`rgh_...`). List your rights and
pick one whose `status` is `ACTIVE`:

```bash cURL theme={null}
curl "https://sandbox.api.enfinitos.com/v1/rights?status=ACTIVE" \
  -H "Authorization: Bearer $ENFINITOS_API_KEY"
```

The response is `{ "ok": true, "data": { "rights": [...], "nextCursor": null, "total": N } }`.
Grab a `rightId` from the list. (No active rights yet? Issue one from a
rights base with `POST /v1/rights/issue` — see the API reference.)

## 3. Observe a delivery event

`POST /v1/delivery` records that content rendered against a right. The
substrate constraint gate runs first; a violation comes back as
`412 PRECONDITION_FAILED`.

<Note>
  The hosted sandbox collapses the Resolve step into `POST /v1/delivery` —
  the constraint gate runs server-side at delivery time, so there is no
  separate `/v1/world-model` or `/v1/resolve` call to make today. Those
  ship as first-class primitives at the April 2027 production launch.
</Note>

```bash cURL theme={null}
curl -X POST https://sandbox.api.enfinitos.com/v1/delivery \
  -H "Authorization: Bearer $ENFINITOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "rightId": "rgh_...",
    "spatialAnchorId": "anchor_demo_001",
    "dwellMs": 8500
  }'
```

Success returns the signed `receipt` and the `substrate` it landed on:

```json Response theme={null}
{ "ok": true, "data": { "receipt": { ... }, "substrate": "DOOH" }, "contractVersion": "v1.0" }
```

## 4. Seal and fetch the proof pack

`POST /v1/proof-packs/seal` folds every delivery since the last seal into
one signed, hash-chained pack. Then fetch it by id.

```bash cURL theme={null}
# Seal — returns the new pack (or sealed:false if nothing new to seal)
curl -X POST https://sandbox.api.enfinitos.com/v1/proof-packs/seal \
  -H "Authorization: Bearer $ENFINITOS_API_KEY"

# Fetch a single pack by id
curl https://sandbox.api.enfinitos.com/v1/proof-packs/PACK_ID \
  -H "Authorization: Bearer $ENFINITOS_API_KEY"
```

`GET /v1/proof-packs/{packId}` returns
`{ "ok": true, "data": { "proofPack": { ... } } }` — the full signed pack
(receipts plus the Ed25519 signature), ready to hand to the auditor. List
every pack with `GET /v1/proof-packs`.

## 5. Verify the pack offline

The auditor is the open-source library that checks the signature, walks the
hash chain, re-projects metering, and re-runs settlement reconciliation. It
never calls home — and it's the one SDK published today.

<CodeGroup>
  ```typescript TypeScript theme={null}
  // npm install @enfinitos/sdk-auditor
  import { EnfinitOSAuditor } from "@enfinitos/sdk-auditor";

  const auditor = new EnfinitOSAuditor({
    // "platform" fetches the published keys from <host>/v1/runtime-keys.
    // Pin the sandbox host until the production host (api.enfinitos.com)
    // goes live at the April 2027 launch; the default points at that
    // production host, which is dark until then.
    // "local" reads from localKeys (offline audit) — see /compliance/verification-keys.
    verificationKeySource: "platform",
    platformKeysUrl: "https://sandbox.api.enfinitos.com/v1/runtime-keys",
  });

  const report = await auditor.verifyAll({ pack: proofPack });
  if (report.status !== "VALID") {
    throw new Error(`Verification failed: ${report.status}`);
  }
  ```

  ```python Python theme={null}
  # pip install enfinitos-sdk-auditor
  from enfinitos_auditor import EnfinitOSAuditor

  # Pin the sandbox host until api.enfinitos.com goes live at launch.
  auditor = EnfinitOSAuditor(
      verification_key_source="platform",
      platform_keys_url="https://sandbox.api.enfinitos.com/v1/runtime-keys",
  )

  report = auditor.verify_proof_pack(proof_pack)
  if report.status != "VALID":
      raise SystemExit(f"Verification failed: {report.status}")
  ```

  ```rust Rust theme={null}
  // cargo add enfinitos-sdk-auditor
  use enfinitos_auditor::{Auditor, AuditBundle, AuditStepStatus};

  let auditor = Auditor::new(pinned_keys); // Vec<VerificationKey>
  let report = auditor.verify_all(&AuditBundle {
      pack: proof_pack,
      metering: None,
      settlement: None,
  });
  if report.status != AuditStepStatus::Valid {
      return Err(format!("Verification failed: {:?}", report.status).into());
  }
  ```
</CodeGroup>

<Note>
  The full client SDKs (renderer-core, brand, operator-web, and the substrate
  SDKs) ship at the April 2027 production launch. Until then the `/v1` HTTP API
  above works against your sandbox credentials today, and the auditor verifies
  every pack the platform issues.
</Note>

## Next steps

<CardGroup cols={2}>
  <Card title="Guided-demo API reference" icon="code" href="/sandbox/api-reference">
    The cookie-authed sandbox demo surface, with request and response
    shapes. The key-authed `/v1` families are documented on the
    concept pages and [SDK integration map](/sandbox/sdk-integration).
  </Card>

  <Card title="Proof-pack format" icon="file-signature" href="/compliance/proof-pack-format">
    The canonical-JSON shape, signing scheme, and chain semantics.
  </Card>

  <Card title="SDK catalogue" icon="layer-group" href="/sdks/overview">
    The full SDK catalogue across every substrate the platform governs.
  </Card>

  <Card title="Substrate model" icon="diagram-project" href="/concepts/substrate-model">
    Why a single rights handshake governs 23 substrates.
  </Card>
</CardGroup>
