Documentation
REST API & Webhooks
Endpoints, authentication, rate limits, and webhook events — everything the API really does.
Base URL and auth
Base URL: https://api.badgebeacon.com. Authenticate with an API key in the X-API-Key header (create one in the console under Operations → API Keys), or with a JWT in the Authorization: Bearer header for a signed-in session. An API key is not a Bearer token — sending it as Authorization: Bearer <API key> will fail with 401.
Endpoints
| Endpoint | Auth | What it returns |
|---|---|---|
| GET /api/verify?code=BB-… | Public | found, checkedAt, lookupMs, verificationCount, certificate (signatureValid inside) |
| POST /api/certificates/issue | API key / JWT | 201 — created: [{code, holderName, holderEmail}] |
| GET /api/certificates?search=&status=&limit= | API key / JWT | certificates + counts {total, valid, expired, revoked} |
| POST /api/certificates/:id/revoke | API key / JWT | {ok: true} — body {reason} |
| GET /api/export · /export/csv · /export/snapshot.html | API key / JWT | Full registry JSON / CSV / static verification snapshot |
| GET /api/public/key[/:tenantId] | Public | Ed25519 public key (JWK x + PEM) |
| GET /api/openapi.json | Public | OpenAPI 3.1 spec — the four core credential endpoints |
| GET /api/mcp/manifest | Public | The four MCP tools (see the MCP page) |
Examples
curl "https://api.badgebeacon.com/api/verify?code=BB-2026-AF3UE5"
curl -X POST https://api.badgebeacon.com/api/certificates/issue \
-H "X-API-Key: <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"templateId": 1,
"recipients": [
{ "holderName": "Maya Chen", "holderEmail": "[email protected]" }
]
}'
# 201 -> {"created": [{"code": "BB-2026-XXXXXX", "holderName": "Maya Chen", "holderEmail": "[email protected]"}]}Rate limits
Verification: 100 requests per minute. Login: 5 attempts per 15 minutes per IP and email. Registration: 20 per 15 minutes. Global: 300 requests per 15 minutes per IP. Over the limit the API answers 429 with {"error": "Too many requests. Please try again later."}. There is no separate per-minute limit on writes — writes fall under the global 300 per 15 minutes.
Webhooks
Configure a webhook URL in the console (Operations → Webhooks): a URL, an optional secret (auto-generated as whsec_… when not supplied), and the events to receive. Default events: credential.issued, credential.revoked, credential.renewed (credential.verified is intentionally not sent — firing on every public verification would spam the endpoint; verifications are already recorded in the verification log). The test button sends a credential.issued test event with demo code BB-2026-TEST.
Delivery is a POST with Content-Type: application/json and an HMAC-SHA256 signature of the raw body in the X-BadgeBeacon-Signature header (hex digest). Timeout is 5 seconds, with 2 attempts total — one retry, 500 ms apart. Verify the signature like this:
import crypto from "node:crypto";
const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
const ok = crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(req.headers["x-badgebeacon-signature"]),
);OpenAPI spec
The live spec is at https://api.badgebeacon.com/api/openapi.json (OpenAPI 3.1.0, “BadgeBeacon Enterprise Credential API”). It documents the four core credential endpoints — verify, issue, batch issue, revoke. The table above is the full route list; the spec does not list endpoints it does not contain.