Build trust into your platform

TrustDPV's APIs and embed widget let you integrate portable trust scores and verified profiles directly into your marketplace, community, or app.

On this page

  1. Public Profile API
  2. Verification API
  3. Ownership Verification
  4. Embed Widget
  5. API Keys, Batch & Webhooks
  6. Rate Limits & Fair Use
  7. Static Badge (SVG)
  8. SDKs
  9. Get Started

1. Public Profile API

Get a user's full public profile data including their trust score, verified platforms, endorsement count, and profile link. Perfect for displaying trust badges on your platform.

GET /api/public/:username

Example Request

Request
curl https://trustdpv.com/api/public/trustdpv

Example Response

200 OK
{
"username": "trustdpv",
"full_name": "Nobody",
"bio": "Building portable trust",
"trust_score": 842,
"verified": true,
"member_since": "2026-04-18T...",
"endorsements": 12,
"platforms": [
{ "platform": "github", "verified": true },
{ "platform": "google", "verified": true }
],
"profile_url": "https://trustdpv.com/u/trustdpv"
}

Error Response

404 Not Found
{ "error": "User not found" }

โ„น๏ธ CORS Enabled

All public API endpoints include Access-Control-Allow-Origin: * headers, so you can call them directly from browser-side JavaScript.

2. Verification API

A lightweight endpoint for checking if a user exists and their current trust score. Ideal for backend validation - when a user claims "I'm verified on TrustDPV," use this to confirm.

GET /api/verify/:username

Example Request

Request
curl https://trustdpv.com/api/verify/trustdpv

Example Response

200 OK
{
"valid": true,
"username": "trustdpv",
"trust_score": 842,
"verified": true,
"last_updated": "2026-04-21T..."
}

Use Cases

๐Ÿ›๏ธ Marketplace listing verification

When a seller adds their TrustDPV username, call the verify API to confirm they exist and check their score before displaying the badge.

๐Ÿ’ฌ Chat & community trust signals

Show a verified badge next to users who have linked and verified their TrustDPV profile in your community.

๐Ÿ“‹ Form validation

Validate TrustDPV usernames at signup or checkout - reject fake profiles before they enter your system.

3. Ownership Verification API

Prove that a TrustDPV profile belongs to the person claiming it. When a user on your platform enters their TrustDPV username, this API sends a confirmation email to the TrustDPV account holder. Only the real owner can confirm the link.

How It Works

๐Ÿ”’ Three-step verification

  1. Your platform calls POST /api/verify-ownership with the TrustDPV username and a callback URL.
  2. TrustDPV emails the profile owner a confirmation link with the name of your service.
  3. The user clicks the link, confirms, and gets redirected back to your callback URL with verification status and trust score.
POST /api/verify-ownership

Request Ownership Verification

Send the TrustDPV username and a HTTPS callback URL. TrustDPV will email the profile owner with a confirmation link that redirects back to your callback on success.

Parameters

FieldTypeRequiredDescription
usernamestringYesThe TrustDPV username to verify ownership of.
callback_urlstringYesHTTPS URL on your server where the user is redirected after confirming. Must use https://.

Example Request

Request
curl -X POST https://trustdpv.com/api/verify-ownership \
-H "Content-Type: application/json" \
-d '{"username": "trustdpv", "callback_url": "https://yoursite.com/trustdpv/callback"}'

Example Response

200 OK
{
"success": true,
"message": "Confirmation email sent. Check your TrustDPV email and click the link to verify."
}

Error Responses

400 Bad Request
{ "error": "Username is required." }
{ "error": "Callback URL is required." }
{ "error": "Callback URL must use HTTPS." }
{ "error": "Invalid callback URL." }
404 Not Found
{ "error": "Profile not found." }
400 Bad Request
{ "error": "This TrustDPV account has not verified its email address." }
429 Too Many Requests
{ "error": "Too many pending verification requests. Check your email or wait for existing requests to expire." }
GET /api/verify-ownership/confirm?token=โ€ฆ

User Confirmation

This is the link the user receives in their email. When they click it, TrustDPV marks the verification as confirmed and redirects them to your callback_url with the following query parameters:

ParameterTypeDescription
statusstring"verified" on success, "already_verified" if already confirmed.
usernamestringThe TrustDPV username that was verified.
trust_scorenumberThe user's current trust score.
servicestringThe hostname of the service that requested verification.

Your callback endpoint should capture these parameters and update the user's profile on your platform.

Example Callback Redirect

User is redirected to
https://yoursite.com/trustdpv/callback?status=verified&username=trustdpv&trust_score=842&service=yoursite.com
GET /api/verify-ownership/status?token=โ€ฆ

Check Verification Status

Poll this endpoint to check whether the user has confirmed. Use the token returned in the original request (or store it from your backend).

Example Request

Request
curl https://trustdpv.com/api/verify-ownership/status?token=a1b2c3โ€ฆ

Example Responses

Pending
{ "status": "pending" }
Verified
{
"status": "verified",
"username": "trustdpv",
"trust_score": 842,
"verified": true
}
Expired
{ "status": "expired" }

Integration Flow

๐Ÿ“‹ Typical implementation

  1. User enters their TrustDPV username on your site.
  2. Your backend calls POST /api/verify-ownership with the username and your callback URL.
  3. Show a message: "Check your TrustDPV email and click the confirmation link."
  4. Optionally poll GET /api/verify-ownership/status to check progress.
  5. When the user confirms, they're redirected to your callback URL with status=verified, username, and trust_score.
  6. Your callback endpoint updates their profile on your platform with the verified trust data.

โฑ๏ธ Token expiry & limits

  • Confirmation links expire after 1 hour.
  • Maximum 3 pending verification requests per user.
  • The user's TrustDPV account must have a verified email address. Unverified accounts will return a 400 error.
  • Callback URLs must use HTTPS.

๐Ÿ”— Real-world example: SiteJobs

SiteJobs (construction hiring platform) uses Ownership Verification to let workers link their TrustDPV profile. Workers enter their username, receive a confirmation email, click to verify, and are redirected back with their verified trust score โ€” no API key required.

4. Embed Widget

The easiest option. One line of code renders a styled trust badge on your page. No JavaScript coding needed - just include the script with a username.

Basic Usage

HTML
<!-- Default: dark theme, normal size -->
<script src="https://trustdpv.com/embed.js"
data-tdpv-user="trustdpv"></script>

Options

HTML
<!-- Light theme -->
<script src="https://trustdpv.com/embed.js"
data-tdpv-user="trustdpv"
data-tdpv-theme="light"></script>

<!-- Compact size (smaller badge) -->
<script src="https://trustdpv.com/embed.js"
data-tdpv-user="trustdpv"
data-tdpv-size="compact"></script>

Available Options

data-tdpv-user (required)

The TrustDPV username to display.

data-tdpv-style

card (default) - 3-line layout with score, username, verified badge. inline - score + username on one line. minimal - just score + checkmark, tiny. full - card with platform badges and endorsement count.

data-tdpv-theme

dark (default) or light. Matches your site's background.

data-tdpv-size

normal (default) or compact. Compact shows a smaller, inline badge.

Style Demos

Minimal - tiny score + check
TrustDPV 660 โœ“
Copy this
<div class="trustdpv-badge" data-tdpv-user="trustdpv" data-tdpv-style="minimal"></div>
Inline - one line
TrustDPV 660 @trustdpv โœ“
Copy this
<div class="trustdpv-badge" data-tdpv-user="trustdpv" data-tdpv-style="inline"></div>
Card - default 3-line
TrustDPV
660
@trustdpv
โœ“ Verified
Trust Score ยท 4 platforms
Copy this
<div class="trustdpv-badge" data-tdpv-user="trustdpv"></div>
Full - card with platforms
TrustDPV @trustdpv โœ“ Verified
660
Trust Score ยท 0 endorsements
โœ“ GitHub โœ“ Google โœ“ Discord โœ“ GitLab
Copy this
<div class="trustdpv-badge" data-tdpv-user="trustdpv" data-tdpv-style="full"></div>
Light theme - Inline
TrustDPV 660 @trustdpv โœ“
Copy this
<div class="trustdpv-badge" data-tdpv-user="trustdpv" data-tdpv-style="inline" data-tdpv-theme="light"></div>

How It Works

โš™๏ธ Automatic rendering

The script fetches profile data from the Public API and renders a styled, clickable badge. It links to the user's full TrustDPV profile. If the user doesn't exist, nothing is rendered - no errors shown to your visitors.

Dynamic & Multi-User (Marketplaces)

For sites where each user has their own TrustDPV profile - marketplaces, directories, community platforms - use the class method instead of the script tag. Place badges anywhere on your page and the widget renders them all automatically.

HTML - Place badges anywhere on your page
<!-- Each seller/user gets their own badge -->
<div class="trustdpv-badge" data-tdpv-user="seller1"></div>
<div class="trustdpv-badge" data-tdpv-user="seller2" data-tdpv-theme="light"></div>
<div class="trustdpv-badge" data-tdpv-user="seller3" data-tdpv-size="compact"></div>

<!-- Load the script ONCE at the bottom of your page -->
<script src="https://trustdpv.com/embed.js"></script>

Server-Side Examples

Your backend outputs the username dynamically. Here's how it looks in common frameworks:

PHP
<div class="trustdpv-badge" data-tdpv-user="<?php echo htmlspecialchars($seller->trustdpv_username); ?>"></div>
<!-- Load once at page bottom -->
<script src="https://trustdpv.com/embed.js"></script>
React / Next.js
{/* In your component */}
<div className="trustdpv-badge" data-tdpv-user={seller.trustdpvUsername} />

{/* In _app.js or layout.tsx */}
<script src="https://trustdpv.com/embed.js" />
Django / Jinja2
<div class="trustdpv-badge" data-tdpv-user="{{ seller.trustdpv_username }}"></div>
<script src="https://trustdpv.com/embed.js"></script>

๐Ÿ’ก How it works

When the script loads, it scans the page for all elements with class="trustdpv-badge" and data-tdpv-user. It batches API calls (deduplicates same usernames) and renders a badge inside each element. Add data-tdpv-theme and data-tdpv-size per-element for different styles.

5. API Keys, Batch & Webhooks

For serious platform integrations, use the versioned /api/v1/ endpoints with an API key in the X-API-Key header. The original public endpoints stay open for lightweight embeds and experiments, but major platforms should use the key-auth path. By using the API you agree to the API Terms of Service.

GET /api/v1/public/:username
GET /api/v1/verify/:username

Authentication

HTTP Header
X-API-Key: tdpv_live_your_generated_key_here

How to create keys

Signed-in TrustDPV users can create and revoke keys via the API. Keys are shown only once when created.

Create key
POST /api/api-keys
{ "name": "Facebook Marketplace", "tier": "pro" }
List keys
GET /api/api-keys
Revoke key
DELETE /api/api-keys/:id

Example request

cURL
curl https://trustdpv.com/api/v1/verify/trustdpv \ -H "X-API-Key: tdpv_live_your_generated_key_here"

๐Ÿ” Tiered rate limits

free: 60/min ยท pro: 1000/min ยท enterprise: 10000/min. Responses include RateLimit-Limit and RateLimit-Remaining headers.

๐Ÿงฑ Stable integration path

Use /api/v1/... for production integrations so future API changes can ship without breaking your implementation.

Batch Verification
POST /api/v1/verify-batch

curl -X POST https://trustdpv.com/api/v1/verify-batch \ -H "X-API-Key: tdpv_live_your_key" \ -H "Content-Type: application/json" \ -d '{"usernames":["seller1","seller2","seller3"]}'

Up to 50 usernames per request. Returns a map of username โ†’ verification result. Counts as 1 API request (not 50).

๐Ÿ”” Webhooks

Get notified when trust events happen. Register a callback URL from your dashboard (Developer Tools section) and we\'ll POST to it when:

  • trust_score_change - score went up or down
  • verification_change - account became verified or unverified

Each delivery includes an X-TrustDPV-Signature header (HMAC-SHA256 of the body using your signing secret) so you can verify it\'s genuinely from us.

6. Rate Limits & Fair Use

โฑ๏ธ 60 requests per minute per IP

All public API endpoints share a rate limit of 60 requests per minute. Responses include standard RateLimit-* headers so you can monitor your usage.

๐Ÿ“ฆ Caching

API responses are cached for 5 minutes (Cache-Control: public, max-age=300). Use browser or server-side caching to reduce repeated calls for the same user.

โš ๏ธ Fair Use

These APIs are free for reasonable use. If you're building a high-volume integration (1M+ monthly requests), please contact us to discuss a dedicated arrangement. We reserve the right to block abusive traffic.

7. Static Badge (SVG)

Get a trust badge as an SVG image - works in emails, PDFs, and anywhere JavaScript can\'t run.

SVG Badge URL
https://trustdpv.com/badge/USERNAME.svg
HTML
<img src="https://trustdpv.com/badge/trustdpv.svg" alt="TrustDPV" />

๐Ÿ–ผ๏ธ No API key needed

Badge SVGs are public. No API key or authentication required. Cached for 5 minutes.

8. SDKs

Official SDKs to get you started faster.

๐Ÿ“ฆ JavaScript (Node.js)

npm install trustdpv
Usage
const TrustDPV = require('trustdpv'); const tdpv = new TrustDPV({ apiKey: 'tdpv_live_...' }); const result = await tdpv.verify('username'); const batch = await tdpv.verifyBatch(['a', 'b', 'c']);

Download SDK ยท README

๐Ÿ˜ PHP

composer require trustdpv/sdk
Usage
$tdpv = new TrustDPV('tdpv_live_...'); $result = $tdpv->verify('username'); $batch = $tdpv->verifyBatch(['a', 'b', 'c']);

Download SDK ยท README

9. Quick Start

Three ways to integrate, from easiest to most custom:

Option A: Embed Widget (easiest)

Copy-paste one line of HTML. No coding required.

<script src="https://trustdpv.com/embed.js" data-tdpv-user="USERNAME"></script>

Option B: Public API (flexible)

Fetch profile data and render it however you like.

JavaScript
const res = await fetch('https://trustdpv.com/api/public/trustdpv');
const data = await res.json();
console.log(data.trust_score); // 842

Option C: Verification API (backend)

Validate TrustDPV users on your server.

Python
import requests
resp = requests.get('https://trustdpv.com/api/verify/trustdpv')
data = resp.json()
if data['valid'] and data['trust_score'] >= 500:
  print("Trusted user!")

Ready to build trust?

Integrate TrustDPV into your platform today. Free, fast, and no API key needed.

Create Your Profile