---
title: "Render a coverage SVG badge for a repository."
method: GET
path: "/api/v1/coverage/badges"
tags: ["Badges"]
---

# Render a coverage SVG badge for a repository.

`GET /api/v1/coverage/badges`

## Request

- Base URL: `https://platform.buildpulse.io`
- URL: `https://platform.buildpulse.io/api/v1/coverage/badges`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer

Returns an SVG status badge showing the latest coverage
percentage for the named repository. The most-recently-uploaded
coverage report is used, regardless of branch.

Color thresholds: 100% = green, 90–99% = light green, 70–89% =
yellow, <70% = red.

Embed in a README:

```markdown
![coverage](https://platform.buildpulse.io/api/v1/coverage/badges?repository=widgets)
```

## Query parameters

- `repository` string, required
- `branch_or_pr` string

## Response `200`

SVG badge image.

## Other responses

- `400`: Missing `repository` parameter.
- `401`: Missing, malformed, or invalid token; or — for legacy 40-hex tokens only — the organization has no active plan (`marketplacePurchases.unitCount > 0`). The new `bp_<64-hex>` path has no plan gate, so a 401 there means the token shape was wrong, the hash didn't match, or the token has expired. Response body is empty (matches legacy Rails).
- `404`: Resource not found.

---

[API](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api.md) · [All operations](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/buildpulse/apis/buildpulse-platform-api/revisions/2e68b4b2df6a?raw)
