Commit Message Linter & Changelog API
Lint commit messages against Conventional Commits, build a CHANGELOG from git log and compute the next semantic version, with fix suggestions.
Three actions on one endpoint. lint checks one message, a list of commits or pasted git log output against Conventional Commits 1.0.0 with the rules of the popular config-conventional preset (type enum and case, scope case, subject case and full stop, header / body line length, blank lines, BREAKING CHANGE footers) or the stricter angular preset; customise with types, scopes, header_max, require_scope. Merge, revert and fixup commits are skipped. Every invalid message gets a corrected suggestion (synonyms such as feature → feat, past tense → imperative).
changelog groups commits into BREAKING CHANGES, Features, Bug Fixes, Performance and Reverts (all_types=1 adds docs, refactor, CI…), links issues and commits when you pass repo_url (GitHub or GitLab), and writes English or Vietnamese headings (lang=vi). bump returns the next version from current_version (breaking → major, feat → minor, fix / perf → patch; 0.x versions bump minor for breaking changes unless pre_major=0; prerelease=beta for pre-releases).
Accepted log formats: default git log, git log --oneline, or messages separated by ---. No configuration files are executed: everything is passed as parameters. Use it in GitLab / Bitbucket / Gitea pipelines, chat bots or release scripts without installing Node tooling.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
action | body|query | string | no | lint | lint, changelog or bump (also as path: /v1/commit-lint/changelog; alias mode). |
message | body|query | string | no | One commit message (header, body, footers). | |
commits | body | array | no | Messages as strings or {hash, message} objects (max 2000). | |
log | body | string | no | Pasted git log / git log --oneline output. | |
preset | body|query | string | no | conventional | conventional (config-conventional) or angular. |
types | body|query | string | no | Comma-separated allowed types (replaces the preset list). | |
scopes | body|query | string | no | Comma-separated allowed scopes. | |
header_max | body|query | number | no | 100 | Maximum header length (angular: 72). |
require_scope | body|query | boolean | no | Require a scope. | |
current_version | body|query | string | no | Current version for bump / changelog, e.g. 1.4.2 or v1.4.2. | |
prerelease | body|query | string | no | Pre-release identifier, e.g. beta. | |
repo_url | body|query | string | no | https://github.com/owner/repo (or GitLab) for issue / commit / compare links. | |
version | body|query | string | no | Changelog version heading (default: computed next version or "Unreleased"). | |
lang | body|query | string | no | en | en or vi group headings. |
all_types | body|query | boolean | no | Include docs / refactor / test / build / CI / chore groups. |
Example
curl -X POST "https://apibox.io.vn/v1/commit-lint" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message":"Fixed login redirect."}'const res = await fetch('https://apibox.io.vn/v1/commit-lint', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"message": "Fixed login redirect."
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/commit-lint",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"message": "Fixed login redirect."},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/commit-lint');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"message":"Fixed login redirect."}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"valid": false,
"commits": 1,
"invalid": 1,
"ignored": 0,
"config": {
"preset": "conventional",
"types": [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"perf",
"refactor",
"revert",
"style",
"test"
],
"scopes": null,
"header_max": 100
},
"results": [
{
"header": "Fixed login redirect.",
"valid": false,
"parsed": {
"type": null,
"scope": null,
"subject": null,
"breaking": false
},
"issues": [
{
"rule": "type-empty",
"severity": "error",
"message": "No type: the header must start with a type such as feat, fix, docs (\"type(scope): subject\")"
},
{
"rule": "subject-empty",
"severity": "error",
"message": "No subject after \"type: \""
}
],
"suggestion": "fix: login redirect"
}
],
"spec": "https://www.conventionalcommits.org/en/v1.0.0/"
}
Use cases
- Reject non-conventional commit messages in a GitLab or Bitbucket pipeline
- Generate release notes from the commits since the last tag
- Compute the next semantic version in a deploy script
- Show contributors a corrected commit message in a review bot
FAQ
Which rules are applied?
The rule set of @commitlint/config-conventional (type, scope, subject, header and body length, blank lines) re-implemented server-side, or the angular preset; types, scopes and lengths can be customised.
How is the next version decided?
Any breaking change (! or a BREAKING CHANGE footer) → major, any feat → minor, fix / perf / revert → patch, otherwise no release. Versions below 1.0.0 bump minor for breaking changes by default.
Can it read my repository?
No: paste the output of git log (or send the messages). Nothing is stored.
Related APIs
UUID Generator
Generate up to 1,000 UUID v4, time-ordered UUID v7, ULID, Nano ID or random hex IDs per request. Secure randomness, optional uppercase.
⏱Cron Expression Parser
Validate a cron expression and get its next run times in any timezone, with a plain-English description. Supports 5, 6 and 7-field cron syntax.
🕒Time & Timezone Converter
Get the current time in any timezone, convert between timezones and Unix timestamps (seconds or ms), with UTC offset and weekday for up to 30 zones.