Real-time risk scoring for trial signups, post-signup activity, and KYC verification. All endpoints accept and return JSON.
Introduction
TrialShield combines 100+ identity, network, payment, behavior, and content signals into a single 0–100 risk score. The most common integration is two API calls: /v1/verify at signup, and /v1/track for continuous monitoring while the user is on a trial.
All endpoints are hosted at https://trialshield.cc/api/v1.
Pro600 req/minEverything in Starter plus Graph and Compliance modules.
Enterprise3,000 req/minCustom limits and self-hosted edge SDK.
POST/v1/verify
Verify
Score a signup or login event. Returns a 0–100 risk score, a recommended decision, and the signals that fired. At least one of email, phone or ip is required.
Request body
email
stringEnd-user email. At least one of email, phone or ip is required.
phone
stringE.164 phone number (e.g. +14155550100).
ip
stringEnd-user IPv4/IPv6. Auto-detected from x-forwarded-for if omitted.
deviceFingerprint
objectOptional fingerprint object (id, canvas, webgl, audio, …) from the browser SDK.
organizationId
stringGroup users so members of the same org are exempt from cross-account checks.
oauthProvider
objectOAuth metadata (provider, providerId, createdAt, githubUsername, …) for ghost-account detection.
metadata
objectFree-form context. metadata.payment is read for Stripe card signals.
Response
id
stringUnique evaluation id, used for /feedback and audit lookups.
decision
"ALLOW" | "CHALLENGE" | "DENY"Recommended action based on the score and your rules.
riskScore
number0–100. Higher is riskier. 71+ recommended for block by default.
signals
RiskSignal[]Triggered signals with module, severity, description, value.
breakdown
ScoreBreakdownPer-module subscores plus the configurable weights used.
enrichment
EnrichmentDataResolved metadata about email, phone, IP, device, behavior, graph.
Continuous monitoring after signup. Pass any user activity (file upload, AI query, GitHub link, login) and TrialShield resolves identity, fingerprints content, and surfaces duplicate accounts that share the same device, IP, or content.
Request body
userIdrequired
stringYour stable user identifier — the one you want to monitor.
objectAnything else you want logged with the event.
organizationId
stringOverride org grouping at runtime.
timestamp
stringISO timestamp. Server uses now() if omitted.
POST/v1/feedback
Feedback
Tell us when our decision was wrong (false positive / false negative). The signal flows back into the model.
evaluationIdrequired
stringThe id from a previous verify response.
isAbuserrequired
booleantrue if the user turned out to be abusive.
notes
stringFree-form context for the review team.
POST/v1/kyc/session
Create KYC session
Generate a hosted verification link for a specific end-user. The link expires after 30 minutes. Document images are purged after 30 days; cryptographic hashes are kept indefinitely for cross-tenant reuse detection.
Request body
userIdrequired
stringYour end-user id (stored as external_user_id).
stringWhere to send the end-user after they complete the flow.
metadata
objectFree-form metadata stored on the session.
Response
sessionId
stringUnique session id.
verifyUrl
stringHosted URL the end-user should open to complete the flow.
status
"pending"Initial status.
level
stringVerification level for this session.
expiresAt
stringISO timestamp the link stops working.
GET/v1/kyc/session/{id}
Get KYC session
Poll for the result of a KYC session. Returns status, level, the full result (decision, score, signals) once status is completed, plus timestamps.
DELETE/v1/users/{id}
Delete a user (GDPR / CCPA)
Erase every record we hold for an end-user — risk events, device graph entries, monitoring events, identity anchors, and the user row itself. Resolves id as a TrialShield user UUID by default; pass ?type=email or ?type=phone to look up by hash.
Tenant-scoped: the user must have at least one risk event tied to one of your API keys. Cross-tenant deletes are rejected with 403.
Errors come back with an error string and a stable machine-readable code.
CodeHTTPWhen
MISSING_API_KEY401No X-API-Key (or Authorization: Bearer) header was provided.
INVALID_API_KEY401The key was not found.
INACTIVE_API_KEY401The key was deactivated.
PAYMENT_REQUIRED403API key is in pending state. Subscribe or get a free trial approved to activate.
SUBSCRIPTION_INACTIVE403Subscription is canceled, expired or revoked.
TRIAL_EXPIRED403Free trial has ended. Subscribe to keep using the API.
FEATURE_UNAVAILABLE403Endpoint is not available on the current plan.
RATE_LIMIT_EXCEEDED429Plan rate limit reached. Wait or upgrade.
MISSING_INPUT400Required body fields were missing or invalid.
Rate limits
Every key has a per-minute window. The current limit comes from your plan unless you have an override from sales. Exceeded requests return 429 with the code RATE_LIMIT_EXCEEDED. The response includes X-RateLimit-Limit so you can back off.
GET/v1/health
Health
Unauthenticated. Returns {"status":"ok"} when the API is reachable. Use it as your uptime-monitor target.