Health and version
Two unauthenticated endpoints that report whether the proxy is up and which git SHA is currently deployed. Use them for uptime monitoring and post-deploy verification.
GET /health
Liveness check + deploy identity. Always returns 200if the FastAPI process is up. Doesn't check upstream providers, doesn't check Supabase, doesn't check Razorpay — only that this process can answer HTTP. That's deliberate so transient upstream issues don't cause a load balancer to evict a healthy node.
curl https://api.mintoken.in/health
# Response (always 200 if the process is up):
# {
# "status": "ok",
# "version": "0.1.0",
# "git_sha": "b3a20acf...",
# "git_sha_short": "b3a20ac",
# "build_time": "2026-05-02T12:34:56Z"
# }
Response fields
| Field | Type | Notes |
|---|---|---|
status | string | Always "ok" when the response is served. If you got a non-200, your monitor should treat the endpoint as down regardless of body. |
version | string | Semver-style app version. Bumps with breaking changes. |
git_sha | string | Full 40-char commit SHA the Docker image was built from. Source of truth for "what's actually deployed right now" without trusting the Coolify dashboard. |
git_sha_short | string | First 7 characters of git_sha. Convenience. |
build_time | string (ISO-8601) | When the Docker image was built. Useful for spotting deploys that succeeded but didn't actually rebuild. |
GET /version
Same payload as /health minus the statusfield. For tools that only care about deploy identity and don't want to parse around the liveness flag.
curl https://api.mintoken.in/version
# Response:
# {
# "git_sha": "b3a20acf...",
# "git_sha_short": "b3a20ac",
# "build_time": "2026-05-02T12:34:56Z",
# "version": "0.1.0"
# }
Uptime monitoring
Configure your monitor to GET /health at 60s intervals. Pass on 200, fail on anything else (including timeout). Don't bother parsing the body — the status code is the contract.
URL: https://api.mintoken.in/health
Method: GET
Interval: 60s
Timeout: 10s
Pass when: HTTP status == 200
Fail when: HTTP status != 200 OR no response within timeout
Deploy verification
After a Coolify deploy, hit /version and confirm the live git_sha matches the commit you expected to ship. This catches the failure mode where the Coolify webhook fires but the rebuild silently uses a stale layer cache.
#!/usr/bin/env bash
# After a deploy, confirm the live proxy is serving the SHA you expect.
set -euo pipefail
EXPECTED_SHA="${1:-$(git rev-parse HEAD)}"
LIVE_SHA=$(curl -sf https://api.mintoken.in/version | jq -r '.git_sha')
if [ "${LIVE_SHA:0:7}" != "${EXPECTED_SHA:0:7}" ]; then
echo "Deploy mismatch: expected ${EXPECTED_SHA:0:7}, live is ${LIVE_SHA:0:7}" >&2
exit 1
fi
echo "Deploy verified: live SHA ${LIVE_SHA:0:7}"
What these endpoints don't cover
/health is intentionally narrow. It does not verify:
- Supabase reachability
- Razorpay reachability
- Upstream provider reachability (OpenAI, Anthropic, etc.)
- That a real proxy request would succeed end-to-end
For end-to-end synthetic checks, run a real /v1/chat/completions call against a known prompt and assert on the response. That covers the dependencies /health deliberately skips.