πŸ€– HarDojo
Log in Sign up
⚑ Quick info
API base URL
Example hash
β€” no certificates yet β€”

πŸ“‘ API Reference

Programmatically verify certificates of completion. No API key required β€” the certificate hash is a publicly verifiable claim.

GET/api.php?hash={certificate_hash}
Pretty-URL form (requires mod_rewrite): https://aii.run.place/api/verify/{certificate_hash} Β· CORS enabled for all origins Β· No authentication needed

πŸ§ͺ Live tester

Paste any certificate hash and hit Send β€” this page calls the real API and shows the response.

No certificates issued yet on this install β€” earn one, then paste its hash here.

πŸ”Ž Endpoint explorer

Select an endpoint, fill in the parameters, and try it against this live API β€” exactly like Swagger/OpenAPI tooling.

Endpoints

MethodPathDescriptionAuth
GET /api.php?hash={hash} Verify a certificate by its public hash None
GET /api/verify/{hash} (pretty URL) Same endpoint; needs Apache mod_rewrite None

curl examples

βœ… Valid certificate

curl -s "https://aii.run.place/api.php?hash=PLACE_YOUR_CERTIFICATE_HASH_HERE"
{
  "valid": true,
  "schema": "1.0",
  "verified_by": "HarDojo",
  "certificate": {
    "id": "7a8a34d319bdb11e5c89c60e734f971a0cfbe39821897d65",
    "learner": "alice",
    "path": "MCP",
    "path_slug": "mcp",
    "completed_at": "2026-08-22 05:04:27",
    "lesson_count": 6,
    "exercise_count": 8,
    "score_pct": 91,
    "verify_url": "https://aii.run.place/certificate.php?hash=7a8a34d319bdb11e5c89c60e734f971a0cfbe39821897d65"
  }
}

β›” Revoked certificate (still exists, but is no longer valid)

curl -s "https://aii.run.place/api.php?hash=PLACE_YOUR_CERTIFICATE_HASH_HERE"
{
  "valid": false,
  "revoked": true,
  "revoked_at": "2026-08-22 12:00:00",
  "schema": "1.0",
  "verified_by": "HarDojo",
  "certificate": {
    "id": "7a8a34d319bdb11e5c89c60e734f971a0cfbe39821897d65",
    "learner": "alice",
    "path": "MCP",
    "path_slug": "mcp",
    "completed_at": "2026-08-22 05:04:27"
  }
}

Response reference

StatusBodyMeaning
200 {"valid": true, "certificate": {…}} Certificate exists and is valid
200 {"valid": false, "revoked": true, "revoked_at": "…"} Certificate exists but was revoked by an admin
400 {"valid": false, "error": "missing_hash"} No hash parameter provided
400 {"valid": false, "error": "invalid_hash"} Hash is not 48 lowercase hex characters
404 {"valid": false, "error": "not_found"} No certificate with that hash
405 {"valid": false, "error": "method_not_allowed"} Request was not GET / OPTIONS
204 empty CORS preflight (OPTIONS)

Notes

  • No auth needed β€” the 48-character hash is the bearer token. It is a publicly verifiable claim, not a secret: anyone with the link can verify it, which is the point.
  • Response is JSON with Content-Type: application/json; charset=utf-8 and Cache-Control: public, max-age=300 (5-minute browser cache).
  • CORS β€” Access-Control-Allow-Origin: * plus preflight handling, so browser apps on any origin can call it directly with fetch().
  • Pretty URLs β€” if the host supports mod_rewrite, /api/verify/{hash} works; otherwise use the query-string form.
  • Revoked β‰  not found. Check valid first; a revoked certificate returns valid: false, revoked: true (status 200), while an unknown hash returns 404.
  • Rate limiting β€” none built in; responses are cached 5 minutes so light abuse is cheap. Add your own limits if you expose this to the public internet.