{"openapi":"3.1.0","info":{"title":"Universal Cryptographic Identity Infrastructure","description":"Universal Cryptographic Identity Infrastructure (UCII) providing post-quantum cryptographic identity services using ML-DSA and protected through x402 economic access.","version":"0.1.0"},"paths":{"/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register authentication account","description":"Creates a compatibility authentication account for systems integrating with UCII.","operationId":"auth_register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/login":{"post":{"tags":["auth"],"summary":"Authenticate user","description":"Authenticates through the UCII compatibility authentication layer.","operationId":"auth_login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh authentication token","description":"Refreshes an existing compatibility authentication token.","operationId":"auth_refresh","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/me":{"get":{"tags":["auth"],"summary":"Retrieve current authenticated user","description":"Returns information associated with the current authentication session.","operationId":"auth_me","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout authentication session","description":"Terminates the current compatibility authentication session.","operationId":"auth_logout","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/auth/revoke":{"post":{"tags":["auth"],"summary":"Revoke authentication token","description":"Revokes a compatibility authentication token.","operationId":"auth_revoke","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/identity":{"get":{"tags":["identity"],"summary":"List identities","description":"Returns available UCII identity records.","operationId":"list_identities","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/IdentityResponse"},"type":"array","title":"Response List Identities"}}}}}},"post":{"tags":["identity"],"summary":"Create a cryptographic identity","description":"Creates a UCII identity root entity. An identity represents a cryptographic subject independent from authentication credentials.","operationId":"create_identity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/identity/{identity_id}":{"get":{"tags":["identity"],"summary":"Retrieve an identity","description":"Returns a UCII identity record using its identity identifier.","operationId":"get_identity","parameters":[{"name":"identity_id","in":"path","required":true,"schema":{"type":"string","title":"Identity Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credentials/register":{"post":{"tags":["credentials"],"summary":"Register a cryptographic credential","description":"Registers a cryptographic credential associated with a UCII identity.","operationId":"register_credential","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credentials/{fingerprint}":{"get":{"tags":["credentials"],"summary":"Retrieve a credential","description":"Returns a cryptographic credential using its fingerprint.","operationId":"get_credential","parameters":[{"name":"fingerprint","in":"path","required":true,"schema":{"type":"string","title":"Fingerprint"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credentials/{credential_id}/revoke":{"post":{"tags":["credentials"],"summary":"Revoke a credential","description":"Revokes an active cryptographic credential.","operationId":"revoke_credential","parameters":[{"name":"credential_id","in":"path","required":true,"schema":{"type":"string","title":"Credential Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/credentials/verify":{"post":{"tags":["credentials"],"summary":"Verify credential ownership","description":"Verifies cryptographic proof of credential ownership using the configured verification provider.","operationId":"verify_credential","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/x402/info":{"get":{"tags":["x402"],"summary":"X402 Info","operationId":"x402_info_v1_x402_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/v1/x402/settlements":{"get":{"tags":["x402"],"summary":"Settlement Overview","operationId":"settlement_overview_v1_x402_settlements_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/metadata":{"get":{"summary":"Metadata","operationId":"metadata_metadata_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/pricing":{"get":{"summary":"Pricing","operationId":"pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"CredentialCreate":{"properties":{"identity_id":{"type":"string","title":"Identity Id"},"credential_type":{"$ref":"#/components/schemas/CredentialType"},"algorithm":{"type":"string","title":"Algorithm"},"public_key":{"type":"string","title":"Public Key"},"fingerprint":{"type":"string","title":"Fingerprint"},"key_version":{"type":"string","title":"Key Version","default":"1"}},"type":"object","required":["identity_id","credential_type","algorithm","public_key","fingerprint"],"title":"CredentialCreate","description":"Register public credential material."},"CredentialResponse":{"properties":{"id":{"type":"string","title":"Id"},"identity_id":{"type":"string","title":"Identity Id"},"credential_type":{"$ref":"#/components/schemas/CredentialType"},"algorithm":{"type":"string","title":"Algorithm"},"fingerprint":{"type":"string","title":"Fingerprint"},"key_version":{"type":"string","title":"Key Version"},"status":{"$ref":"#/components/schemas/CredentialStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"revocation_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revocation Reason"},"replaced_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replaced By Id"},"replaced_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Replaced At"}},"type":"object","required":["id","identity_id","credential_type","algorithm","fingerprint","key_version","status","created_at"],"title":"CredentialResponse","description":"Public credential representation."},"CredentialStatus":{"type":"string","enum":["ACTIVE","PENDING","REPLACED","REVOKED","EXPIRED"],"title":"CredentialStatus","description":"Credential lifecycle states.\n\nREPLACED means the credential was valid\nbut superseded by a newer credential.\n\nIt is different from REVOKED.\n\nREVOKED:\n    Credential should no longer be trusted.\n\nREPLACED:\n    Credential was intentionally migrated."},"CredentialType":{"type":"string","enum":["ML_DSA_SIGNING_KEY","DEVICE_KEY","SERVICE_KEY","CERTIFICATE","ATTESTATION_KEY"],"title":"CredentialType","description":"Cryptographic credential classes.\n\nCredentials represent proof mechanisms,\nnot identity itself."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IdentityCreate":{"properties":{"identity_type":{"$ref":"#/components/schemas/IdentityType"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["identity_type","name"],"title":"IdentityCreate","description":"Request to create a new identity."},"IdentityResponse":{"properties":{"id":{"type":"string","title":"Id"},"identity_type":{"$ref":"#/components/schemas/IdentityType"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","identity_type","name","description","is_active","created_at"],"title":"IdentityResponse","description":"Identity returned to clients."},"IdentityType":{"type":"string","enum":["HUMAN","AI_AGENT","ROBOT","DEVICE","SERVICE","ORGANIZATION"],"title":"IdentityType","description":"Supported identity classes."},"RefreshRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"RefreshRequest","description":"Request body for refreshing an access token."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"anyOf":[{"$ref":"#/components/schemas/UserResponse"},{"type":"null"}]},"expires_in":{"type":"integer","title":"Expires In","default":3600}},"type":"object","required":["access_token"],"title":"TokenResponse","description":"Response after successful login/register/refresh."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","minLength":8,"title":"Password"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"}},"type":"object","required":["email","password"],"title":"UserCreate","description":"Request body for user registration."},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"UserLogin","description":"Request body for login."},"UserResponse":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"role":{"type":"string","title":"Role"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","role","created_at"],"title":"UserResponse","description":"Safe user data returned to clients."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VerificationRequest":{"properties":{"fingerprint":{"type":"string","title":"Fingerprint"},"message":{"type":"string","title":"Message"},"signature":{"type":"string","title":"Signature"}},"type":"object","required":["fingerprint","message","signature"],"title":"VerificationRequest","description":"Credential verification request."},"VerificationResponse":{"properties":{"verified":{"type":"boolean","title":"Verified"},"fingerprint":{"type":"string","title":"Fingerprint"},"identity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identity Id"},"status":{"anyOf":[{"$ref":"#/components/schemas/CredentialStatus"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"}},"type":"object","required":["verified","fingerprint"],"title":"VerificationResponse","description":"Credential verification result."}}},"tags":[{"name":"identity","description":"Cryptographic identity lifecycle operations for humans, AI agents, devices, services, and organizations."},{"name":"credentials","description":"Post-quantum credential registration, verification, rotation, and revocation."},{"name":"auth","description":"Authentication compatibility operations built on UCII identity primitives."},{"name":"x402","description":"Economic authorization and USDC settlement layer powered by x402."}]}