Badge
GET/api/v1/badges/public-key
The service Ed25519 key used to verify badge signatures.
Authorization
bearer_token In: header
Response Body
application/json
curl -X GET "https://example.com/api/v1/badges/public-key"{ "public_key": "string", "signature_alg": "string"}POST/api/v1/badges/render
Renders the template with live state and returns the result as JSON.
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/render" \ -H "Content-Type: application/json" \ -d '{ "template_id": "string" }'{ "cache": { "hit": true, "ttl_seconds": 0 }, "content_type": "string", "render_id": "string", "state_hash": "string", "svg": "string", "template_id": "string", "template_version": 0, "verification": null}GET/api/v1/badges/render/{template_file}
Renders the template with live state and returns the SVG image.
Authorization
bearer_token In: header
Path Parameters
Template identifier, optionally suffixed with .svg
Query Parameters
Optional template version to pin
int320 <= valueRender parameters supplied as additional query string entries
Response Body
image/svg+xml
curl -X GET "https://example.com/api/v1/badges/render/string?property1=string&property2=string"GET/api/v1/badges/state-sources
Authorization
bearer_token In: header
Query Parameters
int640 <= valueint640 <= valueResponse Body
application/json
curl -X GET "https://example.com/api/v1/badges/state-sources"{ "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }, "sources": [ { "created_at": "2019-08-24T14:15:22Z", "fallback": null, "field_template": "string", "key_template": "string", "kind": "literal", "owner_id": "string", "projection": null, "source_id": "string", "staleness": null, "updated_at": "2019-08-24T14:15:22Z" } ]}POST/api/v1/badges/state-sources
Registers a data source that feeds dynamic badge fields.
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/state-sources" \ -H "Content-Type: application/json" \ -d '{ "key_template": "string", "kind": "literal" }'{ "created_at": "2019-08-24T14:15:22Z", "fallback": null, "field_template": "string", "key_template": "string", "kind": "literal", "owner_id": "string", "projection": null, "source_id": "string", "staleness": null, "updated_at": "2019-08-24T14:15:22Z"}GET/api/v1/badges/templates
Authorization
bearer_token In: header
Query Parameters
Full-text search applied to template name and description
Filter by template name
Filter by status (draft, active, deprecated, disabled)
Include all versions of each template
1-indexed page number
int640 <= valuePage size
int640 <= valueSort field (created_at, name, version)
Sort order (asc or desc)
Value in
- "asc"
- "desc"
Response Body
application/json
curl -X GET "https://example.com/api/v1/badges/templates"{ "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }, "templates": [ { "animation": null, "cache": null, "click_through": null, "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "description": "string", "fonts": null, "name": "string", "placeholders": null, "state_sources": null, "status": "draft", "svg_template": "string", "template_id": "string", "thresholds": null, "updated_at": "2019-08-24T14:15:22Z", "verification": null, "version": 0, "versions": [ { "created_at": "2019-08-24T14:15:22Z", "status": "draft", "version": 0 } ], "visibility": "private" } ]}POST/api/v1/badges/templates
Registers a template with its SVG source and dynamic field bindings.
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "svg_template": "string" }'{ "created_at": "2019-08-24T14:15:22Z", "name": "string", "status": "draft", "template_id": "string", "version": 0, "visibility": "private"}GET/api/v1/badges/templates/{template_id}
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/badges/templates/string"{ "animation": null, "cache": null, "click_through": null, "created_at": "2019-08-24T14:15:22Z", "created_by": "string", "description": "string", "fonts": null, "name": "string", "placeholders": null, "state_sources": null, "status": "draft", "svg_template": "string", "template_id": "string", "thresholds": null, "updated_at": "2019-08-24T14:15:22Z", "verification": null, "version": 0, "versions": [ { "created_at": "2019-08-24T14:15:22Z", "status": "draft", "version": 0 } ], "visibility": "private"}POST/api/v1/badges/templates/{template_id}/activate
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Optional template version to act on (defaults to the active version)
int320 <= valueResponse Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates/string/activate"{ "active_version": 0, "status": "draft", "template_id": "string", "version": 0}POST/api/v1/badges/templates/{template_id}/cache/purge
Clears cached renders for the template.
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates/string/cache/purge"{ "purged_entries": 0, "template_id": "string"}POST/api/v1/badges/templates/{template_id}/deprecate
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Optional template version to act on (defaults to the active version)
int320 <= valueResponse Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates/string/deprecate"{ "active_version": 0, "status": "draft", "template_id": "string", "version": 0}POST/api/v1/badges/templates/{template_id}/disable
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Optional template version to act on (defaults to the active version)
int320 <= valueResponse Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates/string/disable"{ "active_version": 0, "status": "draft", "template_id": "string", "version": 0}GET/api/v1/badges/templates/{template_id}/metrics
Authorization
bearer_token In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/api/v1/badges/templates/string/metrics"{ "cache_hit_ratio": 0.1, "cache_hits": 0, "cache_misses": 0, "render_count": 0, "render_errors": { "property1": 0, "property2": 0 }, "render_latency_p50_ms": 0.1, "render_latency_p95_ms": 0.1, "template_id": "string", "verification_failures": 0}POST/api/v1/badges/templates/{template_id}/versions
Adds a new version of the template's SVG source.
Authorization
bearer_token In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/templates/string/versions" \ -H "Content-Type: application/json" \ -d '{ "svg_template": "string" }'{ "active_version": 0, "status": "draft", "template_id": "string", "version": 0}PUT/api/v1/badges/templates/{template_id}/visibility
Switches a template between public and private rendering.
Authorization
bearer_token In: header
Path Parameters
Query Parameters
Optional template version to act on (defaults to the active version)
int320 <= valueRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/api/v1/badges/templates/string/visibility" \ -H "Content-Type: application/json" \ -d '{ "visibility": "private" }'{ "template_id": "string", "version": 0, "visibility": "private"}POST/api/v1/badges/verify
Checks a rendered badge's Ed25519 signature.
Authorization
bearer_token In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/api/v1/badges/verify" \ -H "Content-Type: application/json" \ -d '{ "expires_at": "string", "issued_at": "string", "signature": "string", "signature_alg": "string", "state_hash": "string", "template_id": "string", "template_version": 0 }'{ "reason": "string", "template_id": "string", "template_version": 0, "valid": true}GET/badges/public/render/{template_file}
Unauthenticated rendering, public templates only.
Path Parameters
Template identifier, optionally suffixed with .svg
Query Parameters
Optional template version to pin
int320 <= valueRender parameters supplied as additional query string entries
Response Body
image/svg+xml
curl -X GET "https://example.com/badges/public/render/string?property1=string&property2=string"