Skip to main content
Version: v1.0

15 — Other compliance portal (CMS → partner)

Phase 4 wall: a non-Sammati compliance portal consumes Sammati without our dashboard (dds-cms-dashboard).

Our portal Connect path (CMS ↔ Sammati portal) is documented separately in the teammate repo (CONNECT-SAMMATI.md). This page is the integrator contract for any other portal.


What you need​

ItemValue
CMS base URLe.g. https://api.example.com
API keysmm_live_… or smm_test_… (Company Portal → API keys, or POST /v1/portal/api-keys)
SDK (optional)@sammati/server-sdk → client.consents.feed()

You do not need the Sammati compliance dashboard UI or its DASHBOARD_TOKEN.


Path A — Pull (required)​

GET /v1/consents/feed?limit=200&cursor=…
Authorization: Bearer smm_live_…

200 envelope

{
"results": [
{
"user_id": "<customer reference>",
"purpose": "KYC",
"consent_status": "granted",
"timestamp": "…",
"consent_granted_at": "…",
"consent_revoked_at": null,
"policy_version": "1",
"proof_status": "…",
"ledger_mode": "live"
}
],
"nextCursor": null
}
RuleDetail
AuthBearer smm_* with scope consent
Limit1–500 (default 200); follow nextCursor until null
PrivacyMetadata only — no email/phone/PAN
OpenAPIlistConsentFeed in openapi/openapi.yaml
SDKSDK examples
curl -sS "$CMS/v1/consents/feed?limit=50" \
-H "authorization: Bearer $SAMMATI_API_KEY"

Store results[] in your portal DB; re-pull on a schedule or after webhook notification.


Path B — Push (optional webhooks)​

RegisterPOST /v1/webhooks/endpoints + Idempotency-Key
Body{ "url", "events": ["consent.recorded", …], "ledgerMode"? }
SecretsigningSecret (whsec_…) returned once
Headersx-sammati-signature: t=<epoch>,v1=<hex> (+ delivery / event ids)
VerifyHMAC-SHA256 over <t>.<canonical_json> — Signature verification, @sammati/webhook-utils
Docs08 — Webhooks

Live ledger auto-enqueues consent.recorded on grant/update/revoke. Test ledger uses Send Test Event (POST …/endpoints/:id/test).


Path C — Kafka (optional fan-out)​

When KAFKA_FANOUT_ENABLED=1, consent events also publish to sammati.consent.events.v1 (no CRM PII). Not required for Connect-style portals; see pilot trust runbook.


Fixture + smoke (this repo)​

# stub other-portal: sync store + /hooks/sammati
node scripts/fixtures/other-portal-consumer.mjs # :18188

# end-to-end: CMS grant → feed pull into fixture → webhook HMAC via h3-receiver
npm run smoke:cms-other-portal

Exit proof: tmp/other-portal-proofs/cms-other-portal-*.json with PHASE-4 CMS → OTHER-PORTAL PASSED.

Local webhook delivery uses docker h3-receiver (WEBHOOK_SSRF_ALLOW_PRIVATE=1 on api + worker — local pilot only). Production partners expose a public HTTPS URL; leave the SSRF bypass unset.


Exit criteria​

  • Partner can pull feed with smm_* only (no our dashboard)
  • Fixture other-portal stores feed rows after pull
  • Webhook HMAC path documented + smoked
  • Cross-link from our-portal Connect docs