{"openapi":"3.1.0","info":{"title":"AltID age check (Lenius)","version":"1.0.0","description":"Independent service developed and operated by Lenius (not by the Danish Agency for Digital Government). Open age verification with AltID (OID4VP, EU Age Verification Profile). Only \"over X years\" is shared; no personal data is stored. Approved checks are stored as verifications that can always be looked up."},"servers":[{"url":"https://altid.lenius.ai/api/v1"}],"paths":{"/claims":{"get":{"summary":"Supported age limits","responses":{"200":{"description":"Ages: 13, 15, 16, 18, 21, 23, 25, 27, 67"}}}},"/stats":{"get":{"summary":"Usage of the service (counts only, no personal data)","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["all","30d"]},"description":"all (default) or the last 30 days."}],"responses":{"200":{"description":"totals per event (started, approved, claim_not_satisfied, rejected, verification_failed, cancelled, expired, revoked, failed), channels (mcp, api, web), ages, and days (the last 30 days: started, approved). Days are in Danish time."}}}},"/checks":{"post":{"summary":"Start an age check","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minAge":{"type":"integer","minimum":1,"maximum":120,"description":"The smallest AltID limit covering it is used (17 → age_over_18)."},"claim":{"type":"string","example":"age_over_18"},"redirectUrl":{"type":"string","description":"https URL the hosted page continues to after approval."},"reference":{"type":"string","maxLength":200,"description":"Your own id; returned as is."}}}}}},"responses":{"201":{"description":"Pending check; revokeToken is only returned here.","content":{"application/json":{"schema":{"type":"object","required":["id","status","claim","age","createdAt","expiresAt","pageUrl","statusUrl"],"properties":{"id":{"type":"string","description":"22 characters (128 random bits); also the verification id."},"status":{"type":"string","enum":["pending","approved","failed","expired","revoked"]},"claim":{"type":"string","example":"age_over_18"},"age":{"type":"integer","example":18},"reference":{"type":["string","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["claim_not_satisfied","rejected","verification_failed","cancelled","expired"]},"message":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When the request to AltID expires (15 minutes after start). A verification itself does not expire; it is valid until revoked."},"completedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"verification":{"type":["object","null"],"properties":{"level":{"type":"string","enum":["mdoc_crypto_verified"]},"issuer":{"type":["string","null"]},"issuerTrusted":{"type":"boolean"},"deviceSignature":{"type":"boolean"},"statusList":{"type":"string","enum":["valid","not_present"]},"checkedAt":{"type":"string","format":"date-time"}}},"pageUrl":{"type":"string","description":"Hosted page with QR code (computer) and \"Åbn AltID app\" (phone)."},"statusUrl":{"type":"string"},"verificationUrl":{"type":["string","null"],"description":"Shareable verification page (approved or revoked)."},"authorizationUrl":{"type":"string","description":"Only while pending: the AltID app link (QR code / button)."},"qrUrl":{"type":"string","description":"Only while pending: SVG QR code with the AltID icon."},"websocketUrl":{"type":"string","description":"Only while pending: live status."},"revokeToken":{"type":"string"}}}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/checks/{id}":{"get":{"summary":"Status of a check or verification","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"wait","in":"query","schema":{"type":"integer","minimum":0,"maximum":25},"description":"Long poll: wait up to this many seconds while pending."}],"responses":{"200":{"description":"The check","content":{"application/json":{"schema":{"type":"object","required":["id","status","claim","age","createdAt","expiresAt","pageUrl","statusUrl"],"properties":{"id":{"type":"string","description":"22 characters (128 random bits); also the verification id."},"status":{"type":"string","enum":["pending","approved","failed","expired","revoked"]},"claim":{"type":"string","example":"age_over_18"},"age":{"type":"integer","example":18},"reference":{"type":["string","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["claim_not_satisfied","rejected","verification_failed","cancelled","expired"]},"message":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When the request to AltID expires (15 minutes after start). A verification itself does not expire; it is valid until revoked."},"completedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"verification":{"type":["object","null"],"properties":{"level":{"type":"string","enum":["mdoc_crypto_verified"]},"issuer":{"type":["string","null"]},"issuerTrusted":{"type":"boolean"},"deviceSignature":{"type":"boolean"},"statusList":{"type":"string","enum":["valid","not_present"]},"checkedAt":{"type":"string","format":"date-time"}}},"pageUrl":{"type":"string","description":"Hosted page with QR code (computer) and \"Åbn AltID app\" (phone)."},"statusUrl":{"type":"string"},"verificationUrl":{"type":["string","null"],"description":"Shareable verification page (approved or revoked)."},"authorizationUrl":{"type":"string","description":"Only while pending: the AltID app link (QR code / button)."},"qrUrl":{"type":"string","description":"Only while pending: SVG QR code with the AltID icon."},"websocketUrl":{"type":"string","description":"Only while pending: live status."}}}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"delete":{"summary":"Revoke a verification (or cancel a pending check)","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"revokeToken":[]}],"responses":{"200":{"description":"Revoked","content":{"application/json":{"schema":{"type":"object","required":["id","status","claim","age","createdAt","expiresAt","pageUrl","statusUrl"],"properties":{"id":{"type":"string","description":"22 characters (128 random bits); also the verification id."},"status":{"type":"string","enum":["pending","approved","failed","expired","revoked"]},"claim":{"type":"string","example":"age_over_18"},"age":{"type":"integer","example":18},"reference":{"type":["string","null"]},"error":{"type":["object","null"],"properties":{"code":{"type":"string","enum":["claim_not_satisfied","rejected","verification_failed","cancelled","expired"]},"message":{"type":"string"}}},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","description":"When the request to AltID expires (15 minutes after start). A verification itself does not expire; it is valid until revoked."},"completedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"verification":{"type":["object","null"],"properties":{"level":{"type":"string","enum":["mdoc_crypto_verified"]},"issuer":{"type":["string","null"]},"issuerTrusted":{"type":"boolean"},"deviceSignature":{"type":"boolean"},"statusList":{"type":"string","enum":["valid","not_present"]},"checkedAt":{"type":"string","format":"date-time"}}},"pageUrl":{"type":"string","description":"Hosted page with QR code (computer) and \"Åbn AltID app\" (phone)."},"statusUrl":{"type":"string"},"verificationUrl":{"type":["string","null"],"description":"Shareable verification page (approved or revoked)."},"authorizationUrl":{"type":"string","description":"Only while pending: the AltID app link (QR code / button)."},"qrUrl":{"type":"string","description":"Only while pending: SVG QR code with the AltID icon."},"websocketUrl":{"type":"string","description":"Only while pending: live status."}}}}}},"403":{"description":"Wrong token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/checks/{id}/qr.svg":{"get":{"summary":"QR code (SVG) while pending","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"image/svg+xml"}}}},"/checks/{id}/ws":{"get":{"summary":"WebSocket with live status: {\"type\":\"status\",\"check\":{…}}","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"101":{"description":"Switching protocols"}}}}},"components":{"securitySchemes":{"revokeToken":{"type":"http","scheme":"bearer","description":"The revokeToken from POST /checks."}}}}