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. Embed Widget
  4. API Keys, Batch & Webhooks
  5. Rate Limits & Fair Use
  6. Static Badge (SVG)
  7. SDKs
  8. 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. 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.

4. 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.

5. 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.

6. 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.

7. 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

8. 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