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.

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

Step 3 — Submit for verification

Request a TrustBadge credential for your agent. Level 2 includes capability testing.

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();

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>