Badges
Customizable SVG badges for coding stats
Ziit allows you to display your coding activity using customizable badges that can be embedded on your profile, README, or website. These badges show your coding time statistics in a visual format.
Badge Structure
The badge URL follows this pattern:
https://ziit.app/api/public/badge/:userId/:project/:timeRange/:color/:labelText?Parameters
| Parameter | Description | Default |
|---|---|---|
userId | Your Ziit user ID | Required |
project | Project name or "all" for all projects | "all" |
timeRange | Time period to display stats for | "all-time" |
color | Badge color | "blue" |
labelText | Text for the badge label | "Ziit" |
Usage Examples
Basic Badge
This badge shows your total coding time across all projects:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5pProject-Specific Badge
Display coding time for a specific project:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/ziitCustom Time Range
Show coding time for a specific time period:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/all-timehttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/todayhttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/yesterdayhttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/weekhttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/monthhttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-90-dayshttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/month-to-datehttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-monthhttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/year-to-datehttps://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/last-12-monthsCustom Style
Customize the badge appearance:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p/all/all-time/green/Coding TimeAvailable Colors
Standard colors include: blue, green, red, orange, yellow, purple, and black. You can also use hex color codes (without the #).
Query Parameters
You can further customize badges using query parameters:
| Parameter | Description | Values |
|---|---|---|
style | Badge style | "classic" (default), "flat" |
icon | Icon URL | Direct URL to an image (e.g. SVG, PNG, JPG) |
Example with query parameters:
https://ziit.app/api/public/badge/cm98il90n0000o52c3my0bf5p?style=flat&icon=https://example.com/icon.svg