Collection model
Three rules apply to every signal:- Partner-declared. You register the event types you will send. The SDK does not invent events outside that set.
- Purpose-limited. The same click can be stored for
personalizationand still be unusable for another purpose until that purpose is granted. - Receipt-bound. Ingest requires a
consent_receipt_id(or an equivalent effective grant) for the event’sconsent_purpose.
What is collected
Identity the partner already has
The partner customer is your record. Linking to a Swapnice account happens through a connection session, not by uploading a raw email or phone.
Consent evidence
Swapnice stores purpose grants so later reads can be denied when consent is missing or revoked.
Activity events
These are the behavioral signals the SDK or API transmits.Context the runtime SDK may attach
When you use the client SDK (not a raw server POST), it can add runtime context you do not have to assemble yourself:- App identifier and SDK version
- Surface or screen name you registered
- Session id for the current app session
- Event timestamp
- Network retry metadata (not user content)
How it is collected
- SDK observers
- Partner backend
- Explicit user choices
You register event names in your app. When the user performs that action, the SDK builds the payload, attaches consent and context, queues it, and sends it.Observers do not run until a connection exists and the purpose is granted.
When it is transmitted
The ingest path is non-blocking:
POST /v1/events returns 202 after Durable Object acceptance. Projection into the long-lived archive happens on a queue. Profile reads are synchronous against already-archived events.
If the device is offline, the SDK holds consented events in a local retry queue and sends them when connectivity returns. It does not send events that were observed before consent, and it drops queued events whose receipt has since been revoked.
What is transmitted to Swapnice
A typical event on the wire looks like this:client_id, PKCE challenge/verifier, and scoped tokens. Tokens are hashed at rest.
What is never collected or sent
The partner SDK/API will not collect or accept:- Payment provider tokens, Plaid credentials, or wallet private keys
- Government identification numbers
- Precise home address or raw geolocation unless you put it in a payload you control (do not)
- Email or phone in the clear as an identity key. If you need a join key later, use a hash you already store, under an approved purpose
- Contacts, photos, clipboard, or keystrokes
- Events for purposes the user did not grant
- Another partner’s raw event stream or unresolved cross-app identity
Consent purposes
Request only the purposes the product actually uses. Do not bundle extra purposes into a basic connection.
Retention and revocation
- Revoking a purpose stops new events for that purpose immediately.
- Profile reads that pass
consent_purposefail with403 consent_requiredafter revoke. - Archive and workflow records are updated asynchronously after the consent object accepts the revoke.
- A future profile-recompute cascade will drop revoked-purpose facts from resolved reads. Until that ships, partners must pass
consent_purposeon reads so the live consent gate still applies.