3 API calls to verified
15 minutes from zero to a live TrustBadge.
0/4 steps complete
Step 1 — Get your API key
Head to your dashboard and create a new API key. Use the "Developer" scope for this walkthrough.
Open API key manager →Step 2 — Register your agent
Create an agent record. Trust Authority returns a DID you'll use for the rest of the flow.
curl -X POST https://api.trustauthority.ai/v1/agents \
-H "Authorization: Bearer ${TA_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"name": "My Agent",
"description": "Autonomous payment agent",
"capabilities": ["payments.initiate", "payments.settle"]
}' const res = await fetch('https://api.trustauthority.ai/v1/agents', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'My Agent',
description: 'Autonomous payment agent',
capabilities: ['payments.initiate', 'payments.settle'],
}),
});
const agent = await res.json();
console.log(agent.did); // did:tp:agent:... import os, httpx
res = httpx.post(
"https://api.trustauthority.ai/v1/agents",
headers={"Authorization": f"Bearer {os.environ['TA_API_KEY']}"},
json={
"name": "My Agent",
"description": "Autonomous payment agent",
"capabilities": ["payments.initiate", "payments.settle"],
},
)
agent = res.json()
print(agent["did"]) # did:tp:agent:... Step 3 — Submit for verification
Request a TrustBadge credential for your agent. Level 2 includes capability testing.
curl -X POST https://api.trustauthority.ai/v1/credentials/issue \
-H "Authorization: Bearer ${TA_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"agent_did": "did:tp:agent:your-org:...", "verification_level": 2}' const res = await fetch('https://api.trustauthority.ai/v1/credentials/issue', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
agent_did: agent.did,
verification_level: 2,
}),
});
const credential = await res.json(); res = httpx.post(
"https://api.trustauthority.ai/v1/credentials/issue",
headers={"Authorization": f"Bearer {os.environ['TA_API_KEY']}"},
json={"agent_did": agent["did"], "verification_level": 2},
)
credential = res.json() Step 4 — Embed your badge
Drop the TrustBadge widget anywhere in your site. It fetches live verification data from trustauthority.ai.
<!-- Embed your TrustBadge -->
<script
src="https://trustauthority.ai/badge.js"
data-did="did:tp:agent:your-org:..."
data-variant="compact"
async
></script> // React:
import { TrustBadge } from '@trustauthority/react';
export function Footer() {
return <TrustBadge did="did:tp:agent:your-org:..." variant="compact" />;
} # Django template tag:
# {% load trust_authority %}
# {% trust_badge did="did:tp:agent:your-org:..." variant="compact" %} You're verified.
Your badge is live. Share your verification URL with customers and partners.