> ## Documentation Index
> Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Embeddable badges

> Add verification badges to your website, README, or portfolio to prove content authenticity.

After you protect content on Truthlocks, you can embed a badge that links to the cryptographic proof. Visitors click the badge to verify authenticity without needing a Truthlocks account.

## How badges work

Each protection generates a unique badge URL and a proof page URL. The badge is a dynamic SVG image that shows the current verification status — **Protected** (cyan/green) or **Not Found** (red). Clicking the badge opens the proof page where anyone can inspect the attestation details.

Badge URL format:

```text theme={null}
https://verify.truthlocks.com/api/badge/{attestation_id}
```

Proof page URL format:

```text theme={null}
https://verify.truthlocks.com/proof/{attestation_id}
```

## Badge styles

Badges are available in four styles. Append the `style` query parameter to choose a layout:

| Style       | Description                                                              | Size        |
| :---------- | :----------------------------------------------------------------------- | :---------- |
| **default** | Two-tone shield badge with a gradient overlay and rounded corners        | 300 × 36 px |
| **flat**    | Same two-tone layout without gradients — clean and minimal               | 300 × 36 px |
| **large**   | Card-style badge showing status pill, content title, and protection date | 400 × 80 px |
| **minimal** | Text-only checkmark label with no background                             | 200 × 24 px |

```text theme={null}
https://verify.truthlocks.com/api/badge/{attestation_id}?style=default
https://verify.truthlocks.com/api/badge/{attestation_id}?style=flat
https://verify.truthlocks.com/api/badge/{attestation_id}?style=large
https://verify.truthlocks.com/api/badge/{attestation_id}?style=minimal
```

### Dark theme variant

Every style supports a dark theme variant. Append `theme=dark` to use lighter backgrounds and brighter accent colors suited for dark-background pages:

```text theme={null}
https://verify.truthlocks.com/api/badge/{attestation_id}?style=flat&theme=dark
```

<Tip>
  Use the `large` style on landing pages where you want to highlight the protection date and content title. Use `minimal` for inline text or README footers where space is limited.
</Tip>

## Embed formats

After protecting content, copy the badge embed code from the proof page or the success screen. Truthlocks provides two formats:

<CodeGroup>
  ```md Markdown theme={null}
  [![Protected by Truthlocks](https://verify.truthlocks.com/api/badge/ATTESTATION_ID)](https://verify.truthlocks.com/proof/ATTESTATION_ID)
  ```

  ```html HTML theme={null}
  <a href="https://verify.truthlocks.com/proof/ATTESTATION_ID">
    <img
      src="https://verify.truthlocks.com/api/badge/ATTESTATION_ID"
      alt="Protected by Truthlocks"
    />
  </a>
  ```
</CodeGroup>

Replace `ATTESTATION_ID` with the ID returned when you minted the protection. To use a specific style, add `?style=flat` (or any style name) to the badge URL. Add `&theme=dark` for dark pages.

<Tip>
  On the Protect page, click **Copy Badge** after protecting content to copy the
  Markdown embed code to your clipboard.
</Tip>

## Dynamic status

Badges reflect the real-time verification status of the underlying attestation:

| Status        | Appearance       | Meaning                                                     |
| ------------- | ---------------- | ----------------------------------------------------------- |
| **Protected** | Cyan/green badge | The attestation exists and is valid on the transparency log |
| **Not Found** | Red badge        | The attestation was not found or has been revoked           |

Badge responses are cached for up to one hour. If you revoke an attestation, the badge updates to "Not Found" after the cache expires.

## Certificates

You can download a formal SVG certificate for any protection. The redesigned certificate features a premium layout with a dark gradient header, circular verification seal, corner ornaments, and a details card showing the category, date, attestation ID, issuer, and SHA-256 content hash.

```text theme={null}
GET /api/certificate/{attestation_id}              → SVG download
GET /api/certificate/{attestation_id}?format=html  → HTML view
```

The SVG version downloads as a file (`truthlocks-certificate-{id}.svg`). The HTML version renders the certificate in a centered page layout suitable for printing or embedding.

Certificates are useful for legal evidence, portfolio displays, or print. Download them from the proof page or the protection success screen.

## Where to use badges

* **GitHub READMEs** — prove authorship of open-source code
* **Personal websites** — show visitors your content is verified
* **Portfolio pages** — link each piece to its cryptographic proof
* **Social media bios** — share your proof page URL directly

## Next steps

<CardGroup cols={2}>
  <Card title="Content protection" icon="lock" href="/guides/content-protection">
    Full guide to protecting content with cryptographic attestations.
  </Card>

  <Card title="Public portfolio" icon="id-badge" href="/guides/portfolio">
    Showcase your protected content on a public profile page.
  </Card>

  <Card title="Proof bundle spec" icon="file-certificate" href="/specification/proof-bundle">
    Technical specification for the verification payload behind each badge.
  </Card>
</CardGroup>
