Quickstart
-
Create an account and an application. Sign in at trustysweep.com, open Developers, create an organization and an application. No approval step.
-
Create a test key. In the application, create an API key in test mode (
sk_test_…). Test keys work against an isolated simulated tenant with synthetic Gmail and Drive data; nothing touches real users. -
Seed test mode. Seeding creates a delegated connection (
cxn_…) and simulated sources so you can exercise the full flow.Terminal window curl -X POST https://api.trustysweep.com/v1/developer/applications/app_…/test-mode/seed \-H "Authorization: Bearer sk_test_…" -H "Content-Type: application/json" \-d '{"scenario":"storage_pressure"}' -
Make a read-only call. The free diagnosis is the canonical first call.
Terminal window curl "https://api.trustysweep.com/v1/diagnosis?connection_id=cxn_…" -H "Authorization: Bearer sk_test_…"import { TrustySweep } from "@trustysweep/sdk";const sweep = new TrustySweep({ apiKey: process.env.SWEEP_API_KEY });const d = await sweep.diagnosis.get({ connection_id: "cxn_…" });console.log(`${(d.reclaimable_bytes / 1e9).toFixed(1)} GB reclaimable, health ${d.account_health}`);from trustysweep import TrustySweepsweep = TrustySweep("sk_test_...")d = sweep.diagnosis.get(connection_id="cxn_...")print(d["reclaimable_bytes"], d["account_health"])Terminal window npm i -g @trustysweep/clisweep auth login --key sk_test_…sweep diagnosis -c cxn_… -
Run a simulated Sweep. Plans in test mode are always simulated: they walk the full lifecycle and issue a receipt without touching any provider.
const sources = await sweep.sources.list({ connection_id: "cxn_…" }).all();const result = await sweep.sweep({intent: "sweep",connection_id: "cxn_…",source_ids: sources.map((s) => s.id),selection: { classes: ["promotional", "large_attachment"], min_confidence: 0.85 },simulate: true,});console.log(result.execution.status, result.receipt.receiptId);console.log(await sweep.receipts.verify(result.receipt)); // { valid: true }ids = [s["id"] for s in sweep.sources.list({"connection_id": "cxn_..."})]r = sweep.sweep({"intent": "sweep", "connection_id": "cxn_...", "source_ids": ids,"selection": {"classes": ["promotional"], "min_confidence": 0.85}, "simulate": True})print(r["execution"]["status"], r["receipt"]["receiptId"])Terminal window sweep plan create -c cxn_… --source src_… --classes promotional,large_attachment --simulatesweep plan price pln_…sweep plan authorize pln_…sweep plan commit pln_… --waitsweep executions verify exe_… -
Go live. Create a live key, add a webhook, and send real end users through Sweep Connect. Live usage is metered against your developer plan; see Usage & billing.