Skip to main content
Version: v1.0

Quick Start

Record your first consent, receive a webhook, and understand the path to proofs — using the Company Portal and the official SDK.


Overview​

StepActionTime
1Create account and company~1 min
2Generate a test API key~1 min
3Install the SDK~1 min
4Create and publish a policy~1 min
5Launch the widget (sandbox or embed)~1 min
6Configure a webhookasync
7Verify proof (live ledger)when ready

1. Create account​

  1. Open the Company Portal and complete signup or invite acceptance.
  2. Complete company onboarding — company profile and first policy milestone.
  3. Check Platform health for readiness, then open Integration Center for developer tools.

Platform health (Live)


2. Generate API key​

  1. In the Company Portal, go to API keys.
  2. Create a test key (smm_test_…). Copy the raw key immediately — it is shown once.
  3. Store it as SAMMATI_API_KEY in your secrets manager or .env.

More detail: Authentication


3. Install SDK​

npm install @sammati/server-sdk @sammati/widget-sdk @sammati/webhook-utils

Client setup and configuration: SDK Guide


4. Configure webhook​

  1. Go to Webhooks → create an endpoint URL and select events (for example consent.recorded).
  2. Save the signing secret (whsec_…) when it is revealed.
  3. On the test ledger: click Send Test Event on the endpoint row (consent actions with smm_test_* do not enqueue automatic webhooks).
  4. On the live ledger: grant, update, or revoke with smm_live_* automatically enqueue consent.recorded for subscribed endpoints.

Verification: Webhooks


5. Create policy​

  1. Go to Policies → create a draft → publish version 1.
  2. Note your policy_ref (for example sample-newsletter-subscription).

Details: Policies


6. Launch widget​

Option A — Portal sandbox (fastest): open Developer → Sandbox (or Integration Center → Widget Sandbox). No embed code required.

Widget sandbox (Test)

Option B — Embed in your site: register domains under Allowed origins, create a widget session with the SDK, embed the iframe.

→ Widget Guide


7. Receive callback​

LedgerHow you get consent.recorded
Test (smm_test_*)Send Test Event or client.webhooks.testEndpoint() — not from consent/widget writes
Live (smm_live_*)Automatically after grant, update, or revoke (endpoint ACTIVE and subscribed)

Verify signatures with SDK helpers — Webhooks.


8. Verify proof​

LedgerProof behavior
Test (smm_test_*)Consent and widget work; proofs and automatic webhooks are limited — Sandbox
Live (smm_live_*)Full pipeline: Merkle proof → Evidence Link JWT → TSA timestamp

In the portal, open Platform health and use the live verification panels.


API reference​

HTTP operations for this flow are in the API Reference under Policies, Widget, Consents, Webhooks, and Proofs.


Next steps​