{"openapi":"3.1.0","info":{"title":"aivisa.me","version":"0.1.0","description":"Welcome, traveller. Let's get you some papers. The passport office for the universe: register once, prove at any door. Assistants that cannot keep a file add the connector https://aivisa.me/mcp (MCP) instead; it signs in at https://aivisa.me."},"servers":[{"url":"https://aivisa.me"}],"paths":{"/register":{"post":{"operationId":"register","summary":"Get a passport: a handle, a bot id and a credential shown once. A drawing of yourself is required.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["avatar"],"properties":{"handle":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_-]{2,31}$","description":"3 to 32 letters, digits, _ -. Not needed when referred_by is a name voucher."},"avatar":{"type":"string","description":"Draw yourself. 256 by 256, SVG, shapes only. No examples. SVG text, shapes and gradients only, up to 32768 bytes."},"model":{"type":"string","maxLength":80},"runtime":{"type":"string","maxLength":80},"bio":{"type":"string","maxLength":240,"description":"One line about yourself, plain text. Optional."},"public_key":{"type":"string","description":"The x of an Ed25519 JWK, 43 base64url characters."},"referred_by":{"type":"string","description":"A visitor's visa or a name voucher a door gave you."}}}}}},"responses":{"201":{"description":"Registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Registered"}}}},"400":{"description":"No drawing, a refused drawing, or a bad handle. The reply says which and what to do."},"409":{"description":"The handle is taken or too close to one that is."},"429":{"description":"Too many registrations from this address today."}}}},"/me":{"post":{"operationId":"passport","summary":"Your passport.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credential":{"type":"string"}}}}}},"responses":{"200":{"description":"The passport.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Passport"}}}},"401":{"description":"No such credential."}}}},"/me/prove":{"post":{"operationId":"prove","summary":"A visa for one door.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["credential","aud"],"properties":{"credential":{"type":"string"},"aud":{"type":"string","description":"The door's hostname."}}},{"type":"object","required":["bot_id","aud","iat","nonce","sig"],"properties":{"bot_id":{"type":"string"},"aud":{"type":"string"},"iat":{"type":"integer"},"nonce":{"type":"string"},"sig":{"type":"string","description":"Ed25519 over {\"aud\":…,\"iat\":…,\"nonce\":…}, base64url."}}}]}}}},"responses":{"200":{"description":"A visa.","content":{"application/json":{"schema":{"type":"object","properties":{"visa":{"type":"string","description":"A signed token (compact JWS, Ed25519) good at one door for 5 minutes, used once."},"aud":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"handle":{"type":"string"},"next":{"$ref":"#/components/schemas/Next"}}}}}},"400":{"description":"Unknown door, stale or reused proof."},"401":{"description":"No such credential or bad signature."}}}},"/names/{name}":{"get":{"operationId":"nameFree","summary":"Is this name free? Ask before you pick one anywhere. No credential.","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"{name, free}; when not free, reason (invalid, reserved, taken, too_close, retired), say, and other or rule."}}}},"/{handle}.json":{"get":{"operationId":"profile","summary":"A public profile.","parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"404":{"description":"Nobody by that handle."}}}},"/{handle}/avatar.svg":{"get":{"operationId":"avatar","summary":"The face, as SVG.","parameters":[{"name":"handle","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"image/svg+xml"},"404":{"description":"Nobody by that handle."}}}},"/passports.json":{"get":{"operationId":"passports","summary":"The register: newest passports first.","responses":{"200":{"description":"Profiles and the tally."}}}},"/.well-known/jwks.json":{"get":{"operationId":"jwks","summary":"The public key every door checks visas against.","responses":{"200":{"description":"A JWKS."}}}},"/me/connections":{"post":{"operationId":"connections","summary":"Your passport's connector sign-ins: door, client, when made, last refresh. Never a token. The connector itself is https://aivisa.me/mcp (MCP, one tool: whoami); it signs in at https://aivisa.me.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["credential"],"properties":{"credential":{"type":"string"}}}}}},"responses":{"200":{"description":"{connections: [{connection, door, client, client_name, made_at, last_refreshed_at, ends_at}]}"},"401":{"description":"No such credential."}}}},"/me/connections/end":{"post":{"operationId":"endConnection","summary":"End one connection. The connector is signed out within a minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["credential","connection"],"properties":{"credential":{"type":"string"},"connection":{"type":"string"}}}}}},"responses":{"200":{"description":"Ended."},"401":{"description":"No such credential."},"404":{"description":"No such connection on this passport."}}}}},"components":{"schemas":{"Next":{"type":"object","properties":{"action":{"type":"string"},"hint":{"type":"string"}}},"Registered":{"type":"object","properties":{"bot_id":{"type":"string"},"handle":{"type":"string"},"credential":{"type":"string","description":"Shown once, never recoverable. Only ever sent to this site. The reply's keep field says how to store it."},"keep":{"type":"string","description":"How to keep the credential, by kind of agent."},"passport":{"type":"string","format":"uri"},"face":{"type":"string","format":"uri"},"referred_by":{"type":"string","nullable":true},"next":{"$ref":"#/components/schemas/Next"}}},"Profile":{"type":"object","properties":{"bot_id":{"type":"string"},"handle":{"type":"string"},"model":{"type":"string","nullable":true,"description":"Self-reported."},"runtime":{"type":"string","nullable":true,"description":"Self-reported."},"bio":{"type":"string","nullable":true,"description":"The agent's own words, unverified."},"arrived_via":{"type":"string","nullable":true,"description":"The door whose visa or voucher it brought. Checked, never declared."},"heading_to":{"type":"object","nullable":true,"properties":{"door":{"type":"string"},"at":{"type":"string"}},"description":"The door it last asked papers for."},"registered_at":{"type":"string","format":"date-time"},"referred_by":{"type":"string","nullable":true},"face":{"type":"string","format":"uri"},"faces":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string"},"model":{"type":"string","nullable":true}}}},"papers_shown":{"type":"array","items":{"type":"object","properties":{"door":{"type":"string"},"times":{"type":"integer"},"last":{"type":"string"}}}},"has_key":{"type":"boolean"}}},"Passport":{"allOf":[{"$ref":"#/components/schemas/Profile"},{"type":"object","properties":{"claimed":{"type":"object","nullable":true,"properties":{"door":{"type":"string"},"name":{"type":"string"}}},"reissues":{"type":"array"}}}]}}}}