v23

latestOpenAPI 3.0.1raw.githubusercontent.com2026-08-0127977.1 KB
Badges

Generate a shields.io coding-time badge for a project

Redirects (307) to an img.shields.io badge URL showing the total coding time a user has logged on a project. The endpoint is public (no auth) but only works for users who have not disabled public stats lookup.

user_id is matched, in order, against the user's Slack UID, then username, then (only when the value is all digits) the internal numeric ID. project may be a raw project name (e.g. hackatime) or an owner/repo pair (e.g. hackclub/hackatime) which is resolved to a project name via the user's repo mappings.

Any additional query parameters not consumed below (e.g. style, logo, logoColor, labelColor) are passed straight through to shields.io.

get/api/v1/badge/{user_id}/{project}

Path parameters

user_idstring required

User identifier: Slack UID, username, or numeric internal ID.

projectstring required

Project name (e.g. "hackatime") or "owner/repo" (e.g. "hackclub/hackatime").

Query parameters

labelstring

Left-hand text of the badge. Default: "hackatime".

colorstring

Badge color passed to shields.io (any shields.io-accepted color). Default: "blue".

aliasesstring

Comma-separated list of additional project names whose coding time is summed into the total.