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 Trust Developer API 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.

<!-- Paste into your site's HTML. The script tag loads once; each
     .trust-authority-badge div renders a live badge. Variants:
     full | compact | inline. Themes: light | dark. -->
<script src="https://trustauthority.ai/widget.js" async></script>
<div class="trust-authority-badge" data-badge-id="your-badge-id" data-variant="compact" data-theme="light"></div>

Emit your first receipt

Disclosure receipts create evidence that your agent displayed the required transparency notice. The receipt is an evidence artifact, not a compliance verdict.

const receipt = await fetch('https://api.trustauthority.ai/v1/mcp/audit-interaction', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    session_id: 'sess_2026_05_12',
    agent_did: agent.did,
    action: 'transparency_notice_rendered',
    disclosure_receipt: {
      receipt_hash: 'sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
      presented_at: new Date().toISOString(),
      presentation_mode: 'chat',
    },
  }),
});