{"openapi":"3.1.0","info":{"title":"Let’s Peppol KYC API","description":"KYC, registration, authentication, and identity-verification endpoints.\n\nBrowser authentication has two layers. `/auth/browser/**` establishes a server-side\nbrowser session (password plus optional TOTP/recovery code, or a passkey). The\nSPA then uses OAuth 2.0 Authorization Code with PKCE at `/auth/oauth2/authorize` and\n`/auth/oauth2/token`. The public SPA is `letspeppol-ui`; it has no client secret and\nreceives no refresh token. Token renewal and ownership changes use silent\nre-authorization (`prompt=none`).\n\nPath families: `/api/**` is public, `/auth/browser/**` is the cookie/CSRF browser\nsurface, `/auth/oauth2/**` and `/auth/oidc/**` are protocol surfaces, and\n`/sapi/**` is stateless and requires a bearer access token with company context;\na browser session cookie is never sufficient for these endpoints.\nLocal-control APIs are intentionally omitted from this OpenAPI document. KYC\nalso issues `service` scoped client-credentials tokens to trusted backends.\nProtected APIs validate\nJWT signature, expiry, issuer (when configured), and audience\n`letspeppol-api`.\n\nApplication errors are JSON objects with `errorCode`; validation errors may\nalso contain an `errors` map. Authentication failures can be 401, authorization\nfailures 403, rate limits 429, and unexpected failures 500.\n","contact":{"name":"Let’s Peppol"},"version":"v1"},"servers":[{"url":"/kyc","description":"KYC through the public reverse proxy"}],"tags":[{"name":"KYC Account","description":"Authenticated account endpoints for discovering which companies and roles are linked to the current identity."},{"name":"KYC Linked Access","description":"Administrative endpoints for viewing and managing services or related identities linked to a company account."},{"name":"KYC TOTP","description":"TOTP enrollment, recovery codes, status, and completion of a pending browser login."},{"name":"KYC Company Management","description":"Authenticated company endpoints for loading account context, searching companies, and activating or deactivating Peppol registration."},{"name":"KYC Registration","description":"Endpoints for the public company onboarding flow, from company lookup through email confirmation and final account activation."},{"name":"KYC Identity Verification","description":"Endpoints used during the director signing flow, including contract generation and Web eID signature finalization."},{"name":"KYC Browser Authentication","description":"Cookie-session and CSRF bootstrap used before the OAuth2 Authorization Code + PKCE exchange."},{"name":"KYC Passkeys","description":"WebAuthn passkey enrollment, management, and browser-session authentication."},{"name":"KYC Passwords","description":"Password recovery and password change endpoints for KYC-managed accounts."}],"paths":{"/sapi/passkeys/{id}/name":{"put":{"tags":["KYC Passkeys"],"summary":"Rename passkey","description":"Changes the user-visible name of a passkey owned by the current account.","operationId":"renamePasskey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyRenameRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"oauth2":["openid"]}]}},"/sapi/totp/setup":{"post":{"tags":["KYC TOTP"],"summary":"Create TOTP enrollment","description":"Creates a secret and authenticator URI for the signed-in account. TOTP is not enabled until the code is verified.","operationId":"setup","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TotpSetupResponse"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/totp/enable":{"post":{"tags":["KYC TOTP"],"summary":"Enable TOTP","description":"Verifies the first authenticator code, enables TOTP, and returns one-time recovery codes.","operationId":"enable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TotpEnableResponse"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/totp/disable":{"post":{"tags":["KYC TOTP"],"summary":"Disable TOTP","description":"Disables TOTP after validating a current authenticator or recovery code.","operationId":"disable","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"oauth2":["openid"]}]}},"/sapi/password/change":{"post":{"tags":["KYC Passwords"],"summary":"Change password while signed in","description":"Changes the password for the currently authenticated account using the existing access token.","operationId":"change","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"204":{"description":"Password has been changed"}}}},"/sapi/passkeys/register/verify":{"post":{"tags":["KYC Passkeys"],"summary":"Verify passkey registration","description":"Verifies the WebAuthn attestation response and stores the new credential for the current account.","operationId":"verifyRegistration","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyVerifyRegistrationRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"oauth2":["openid"]}]}},"/sapi/passkeys/register/options":{"post":{"tags":["KYC Passkeys"],"summary":"Create passkey registration options","description":"Starts WebAuthn registration for the currently authenticated account and returns a short-lived challenge.","operationId":"registrationOptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/linked/unregister":{"post":{"tags":["KYC Linked Access"],"summary":"Unlink a service from the company","description":"Removes a previously linked service integration from the authenticated company. Intended for admin users.","operationId":"unregister","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequest"}}},"required":true},"responses":{"200":{"description":"OK"}},"security":[{"oauth2":["openid"]}]}},"/sapi/linked/request-company":{"post":{"tags":["KYC Linked Access"],"summary":"Request onboarding for another company","description":"Starts an additional company request flow based on the currently authenticated ownership context.","operationId":"requestCompany","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCompanyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SimpleMessage"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/linked/register":{"post":{"tags":["KYC Linked Access"],"summary":"Link a service to the company","description":"Registers a service integration or linked service account for the authenticated company. Intended for admin users.","operationId":"register","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/OwnershipInfo"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company/peppol/unregister":{"post":{"tags":["KYC Company Management"],"summary":"Deactivate Peppol registration","description":"Unregisters the authenticated company from the access point while keeping the company account itself intact.","operationId":"unregister_1","responses":{"200":{"description":"Updated JWT token with refreshed activation state","content":{"*/*":{"schema":{"type":"string"}}}},"204":{"description":"Company already inactive; no response body","content":{"*/*":{"schema":{"type":"object"}}}},"424":{"description":"Access point unregistration failed","content":{"*/*":{"schema":{"type":"string"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company/peppol/register":{"post":{"tags":["KYC Company Management"],"summary":"Activate Peppol registration","description":"Registers the authenticated company on the access point and updates the Peppol activation state reflected in the JWT.","operationId":"register_1","responses":{"200":{"description":"Updated JWT token with refreshed activation state","content":{"*/*":{"schema":{"type":"string"}}}},"204":{"description":"Company already active; no response body","content":{"*/*":{"schema":{"type":"object"}}}},"403":{"description":"Registration suspended","content":{"*/*":{"schema":{"type":"string"}}}},"409":{"description":"Registration conflict with existing provider","content":{"*/*":{"schema":{"type":"string"}}}},"424":{"description":"Access point registration failed","content":{"*/*":{"schema":{"type":"string"}}}},"503":{"description":"Registration temporarily unavailable","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/account/ownership":{"post":{"tags":["KYC Account"],"summary":"Select acting ownership","description":"Remembers the given company and role as the default ownership for this account. The caller must then re-authorize (silently) with the same explicit selection.","operationId":"selectOwnership","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}},"required":true},"responses":{"204":{"description":"Ownership selected; re-authorize to receive an updated token"}},"security":[{"oauth2":["openid"]}]}},"/auth/browser/totp":{"post":{"tags":["KYC TOTP"],"summary":"Complete browser login with TOTP","description":"Completes the cookie-session login started by password authentication. Accepts an authenticator or recovery code and requires the CSRF token returned by `/auth/browser/session`.","operationId":"verifyLogin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TotpVerifyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/auth/browser/passkeys/authenticate/verify":{"post":{"tags":["KYC Passkeys"],"summary":"Verify passkey authentication","description":"Verifies the WebAuthn assertion and establishes the authenticated KYC browser session used by the following OAuth2 authorization request. Requires CSRF protection.","operationId":"verifyAuthentication","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasskeyAuthenticationResponse"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}}}},"/auth/browser/passkeys/authenticate/options":{"post":{"tags":["KYC Passkeys"],"summary":"Create passkey authentication options","description":"Starts passwordless browser authentication and stores a short-lived challenge in the cookie session. Requires CSRF protection.","operationId":"authenticationOptions","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object","additionalProperties":{}}}}}}}},"/api/register/verify":{"post":{"tags":["KYC Registration"],"summary":"Verify activation token","description":"Consumes the email verification token and returns the company context needed to continue with director selection and signing.","operationId":"verify","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TokenVerificationResponse"}}}}}}},"/api/register/verify-account":{"post":{"tags":["KYC Registration"],"summary":"Activate account after signing","description":"Finalizes account creation by validating the token received after signing and storing the first password.","operationId":"verifyAccount","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Account activated"}}}},"/api/register/confirm-company":{"post":{"tags":["KYC Registration"],"summary":"Start registration for a company","description":"Validates the selected company and sends the activation email that continues the onboarding flow.","operationId":"confirmCompany","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmCompanyRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SimpleMessage"}}}}}}},"/api/password/reset":{"post":{"tags":["KYC Passwords"],"summary":"Reset password with token","description":"Completes the password recovery flow by validating the reset token and storing the new password.","operationId":"reset","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPasswordRequest"}}},"required":true},"responses":{"204":{"description":"Password has been reset"}}}},"/api/password/forgot":{"post":{"tags":["KYC Passwords"],"summary":"Request password reset","description":"Starts the password recovery flow by sending a reset email to the account owner.","operationId":"forgot","parameters":[{"name":"Accept-Language","in":"header","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"204":{"description":"Reset email accepted for processing"}}}},"/api/identity/sign/prepare":{"post":{"tags":["KYC Identity Verification"],"summary":"Prepare contract signing","description":"Builds the pre-signature payload and digest information required before the Web eID signing step.","operationId":"prepare","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrepareSigningRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PrepareSigningResponse"}}}}}}},"/api/identity/sign/finalize":{"post":{"tags":["KYC Identity Verification"],"summary":"Finalize contract signing","description":"Stores the signature result from Web eID, persists the signed contract, and returns registration status information in the response headers.","operationId":"finalize","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeSigningRequest"}}},"required":true},"responses":{"200":{"description":"Signed contract PDF with registration status headers","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/sapi/totp/status":{"get":{"tags":["KYC TOTP"],"summary":"Get TOTP status","description":"Reports whether TOTP is enabled and how many unused recovery codes remain.","operationId":"status","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TotpStatusResponse"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/passkeys":{"get":{"tags":["KYC Passkeys"],"summary":"List passkeys","description":"Lists passkey credentials registered by the current account without exposing credential secrets.","operationId":"listPasskeys","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PasskeyDto"}}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/linked":{"get":{"tags":["KYC Linked Access"],"summary":"List linked access","description":"Returns the services and related access records linked to the authenticated company account. Intended for admin users.","operationId":"getOwnershipsForToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OwnershipInfo"}}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company":{"get":{"tags":["KYC Company Management"],"summary":"Load admin company account","description":"Returns the primary admin account and company details for the authenticated Peppol identifier.","operationId":"getAdminAccountForToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountInfo"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company/signed-contract":{"get":{"tags":["KYC Company Management"],"summary":"Download signed contract","description":"Returns the signed onboarding contract PDF stored for the authenticated company.","operationId":"signedContract","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"object"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company/search":{"get":{"tags":["KYC Company Management"],"summary":"Search companies","description":"Searches company records by VAT number, Peppol identifier, or company name for onboarding and administrative workflows.","operationId":"search","parameters":[{"name":"identifier","in":"query","required":false,"schema":{"type":"string"}},{"name":"vatNumber","in":"query","required":false,"schema":{"type":"string"}},{"name":"peppolId","in":"query","required":false,"schema":{"type":"string"}},{"name":"companyName","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanySearchResponse"}}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/company/account":{"get":{"tags":["KYC Company Management"],"summary":"Load current account details","description":"Returns the currently authenticated user account together with the related company information.","operationId":"getAccountForToken","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AccountInfo"}}}}},"security":[{"oauth2":["openid"]}]}},"/sapi/account/ownerships":{"get":{"tags":["KYC Account"],"summary":"List linked ownerships","description":"Returns the companies, roles, and ownership relationships available to the currently authenticated identity.","operationId":"getOwnerships","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OwnershipSummary"}}}}}},"security":[{"oauth2":["openid"]}]}},"/auth/browser/session":{"get":{"tags":["KYC Browser Authentication"],"summary":"Inspect browser authentication session","description":"Returns anonymous, TOTP-required, or authenticated status together with the CSRF token required by browser authentication POSTs. This endpoint does not issue an OAuth access token.","operationId":"session","parameters":[{"name":"csrfToken","in":"query","required":true,"schema":{"$ref":"#/components/schemas/CsrfToken"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AuthSessionResponse"}}}}}}},"/api/register/company/{peppolId}":{"get":{"tags":["KYC Registration"],"summary":"Load company for registration","description":"Looks up a company by Peppol identifier so the user can confirm they are registering the correct legal entity.","operationId":"getCompany","parameters":[{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}}}}},"/api/identity/contract/{peppolId}/{directorId}":{"get":{"tags":["KYC Identity Verification"],"summary":"Download unsigned contract","description":"Generates the contract PDF for the selected company director so it can be reviewed and signed.","operationId":"getContract","parameters":[{"name":"peppolId","in":"path","required":true,"schema":{"type":"string"}},{"name":"directorId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string","format":"byte"}}}}}}},"/sapi/passkeys/{id}":{"delete":{"tags":["KYC Passkeys"],"summary":"Delete passkey","description":"Deletes one passkey owned by the current account.","operationId":"deletePasskey","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK"}},"security":[{"oauth2":["openid"]}]}},"/auth/oauth2/jwks":{"get":{"tags":["authorization-server-endpoints"],"summary":"Read JWT verification keys","description":"Returns the public JSON Web Keys used by App and Proxy to verify KYC-issued JWT signatures.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}}}}},"/auth/oauth2/token":{"post":{"tags":["authorization-server-endpoints"],"summary":"Issue OAuth2 tokens","description":"Exchanges an authorization code plus PKCE verifier for user tokens, or accepts client credentials from a trusted backend to issue a service-scoped access token.","parameters":[{"name":"Authorization","in":"header","schema":{"type":"string"}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token","client_credentials"]},"code":{"type":"string"},"redirect_uri":{"type":"string"},"refresh_token":{"type":"string"},"scope":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"client_assertion_type":{"type":"string"},"client_assertion":{"type":"string"},"additionalParameters":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Token"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}}}}},"/auth/oauth2/authorize":{"post":{"tags":["authorization-server-endpoints"],"summary":"Start OAuth2 authorization","description":"Validates the OAuth2 authorization request and PKCE challenge using the authenticated browser session, then redirects the client with an authorization code and state.","parameters":[{"name":"parameters","in":"query","schema":{"type":"object","additionalProperties":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"text/html":{}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}},"302":{"description":"Found","headers":{"Location":{"schema":{"type":"string"}}}}}}},"/auth/oauth2/introspect":{"post":{"tags":["authorization-server-endpoints"],"summary":"Inspect an OAuth2 token","description":"Returns metadata describing a token to an authenticated OAuth2 client.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type_hint":{"type":"string"},"additionalParameters":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2TokenIntrospection"}}}},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}}}}},"/auth/oauth2/revoke":{"post":{"tags":["authorization-server-endpoints"],"summary":"Revoke an OAuth2 token","description":"Invalidates a token submitted by an authenticated OAuth2 client.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"token":{"type":"string"},"token_type_hint":{"type":"string"}}}}}},"responses":{"200":{"description":"OK"},"500":{"description":"Internal Server Error"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuth2Error"}}}}}}},"/auth/oidc/userinfo":{"get":{"tags":["authorization-server-endpoints"],"summary":"Read OpenID Connect user information","description":"Returns OpenID Connect claims for the subject represented by a valid access token.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"}}}}},"500":{"description":"Internal Server Error"}}}},"/auth/browser/login":{"post":{"tags":["login-endpoint"],"summary":"Authenticate the browser session","description":"Accepts the user's credentials and establishes the server-side browser session required before Authorization Code with PKCE. Browser submissions require CSRF protection.","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","properties":{"username":{"type":"string"},"password":{"type":"string","format":"password"},"_csrf":{"type":"string","description":"CSRF token obtained from GET /auth/browser/session."}}}}},"required":true},"responses":{"200":{"description":"Browser session established."},"401":{"description":"Credentials or second-factor state rejected."}}}}},"components":{"schemas":{"PasskeyRenameRequest":{"type":"object","properties":{"displayName":{"type":"string"}}},"TotpSetupResponse":{"type":"object","properties":{"secret":{"type":"string"},"qrCodeDataUri":{"type":"string"}}},"TotpVerifyRequest":{"type":"object","properties":{"code":{"type":"string","minLength":1}},"required":["code"]},"TotpEnableResponse":{"type":"object","properties":{"recoveryCodes":{"type":"array","items":{"type":"string"}}}},"ChangePasswordRequest":{"type":"object","properties":{"password":{"type":"string","minLength":1}},"required":["password"]},"PasskeyRegistrationResponse":{"type":"object","properties":{"id":{"type":"string"},"rawId":{"type":"string"},"type":{"type":"string"},"clientDataJSON":{"type":"string"},"attestationObject":{"type":"string"},"transports":{"type":"array","items":{"type":"string"}}}},"PasskeyVerifyRegistrationRequest":{"type":"object","properties":{"challengeToken":{"type":"string"},"displayName":{"type":"string"},"credential":{"$ref":"#/components/schemas/PasskeyRegistrationResponse"}}},"ServiceRequest":{"type":"object","properties":{"uid":{"type":"string","format":"uuid"}},"required":["uid"]},"ConfirmCompanyRequest":{"type":"object","properties":{"type":{"type":"string","enum":["ADMIN","USER","USER_DRAFT","USER_READ","APP","AFFILIATE"]},"peppolId":{"type":"string","maxLength":32,"minLength":0},"email":{"type":"string","format":"email","minLength":1},"city":{"type":"string"},"postalCode":{"type":"string"},"street":{"type":"string"}},"required":["email","peppolId","type"]},"SimpleMessage":{"type":"object","properties":{"message":{"type":"string"}}},"OwnershipInfo":{"type":"object","properties":{"type":{"type":"string","enum":["ADMIN","USER","USER_DRAFT","USER_READ","APP","AFFILIATE"]},"name":{"type":"string"},"email":{"type":"string"},"company":{"type":"string"},"createdOn":{"type":"string","format":"date-time"}}},"AuthRequest":{"type":"object","properties":{"type":{"type":"string","enum":["ADMIN","USER","USER_DRAFT","USER_READ","APP","AFFILIATE"]},"peppolId":{"type":"string","maxLength":32,"minLength":0}},"required":["peppolId","type"]},"PasskeyAuthenticationResponse":{"type":"object","properties":{"id":{"type":"string","minLength":1},"rawId":{"type":"string","minLength":1},"type":{"type":"string","minLength":1},"clientDataJSON":{"type":"string","minLength":1},"authenticatorData":{"type":"string","minLength":1},"signature":{"type":"string","minLength":1},"userHandle":{"type":"string"}},"required":["authenticatorData","clientDataJSON","id","rawId","signature","type"]},"CompanyResponse":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"peppolId":{"type":"string"},"identifier":{"type":"string"},"vatNumber":{"type":"string"},"name":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"directors":{"type":"array","items":{"$ref":"#/components/schemas/DirectorDto"}},"hasKboAddress":{"type":"boolean"},"registeredOnPeppol":{"type":"boolean"},"hasAdmin":{"type":"boolean"}}},"DirectorDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"}}},"TokenVerificationResponse":{"type":"object","properties":{"email":{"type":"string"},"accountExists":{"type":"boolean"},"accountVerified":{"type":"boolean"},"directorSigned":{"type":"boolean"},"requestedType":{"type":"string","enum":["ADMIN","USER","USER_DRAFT","USER_READ","APP","AFFILIATE"]},"company":{"$ref":"#/components/schemas/CompanyResponse"},"requester":{"$ref":"#/components/schemas/OwnershipInfo"}}},"SetPasswordRequest":{"type":"object","properties":{"token":{"type":"string","minLength":1},"newPassword":{"type":"string","maxLength":2147483647,"minLength":8}},"required":["newPassword","token"]},"ForgotPasswordRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1}},"required":["email"]},"PrepareSigningRequest":{"type":"object","properties":{"peppolId":{"type":"string"},"directorId":{"type":"integer","format":"int64"},"certificate":{"type":"string"},"supportedSignatureAlgorithms":{"type":"array","items":{"$ref":"#/components/schemas/SignatureAlgorithm"}},"language":{"type":"string"}}},"SignatureAlgorithm":{"type":"object","properties":{"hashFunction":{"type":"string"},"paddingScheme":{"type":"string"},"cryptoAlgorithm":{"type":"string"}}},"PrepareSigningResponse":{"type":"object","properties":{"hashToSign":{"type":"string"},"hashToFinalize":{"type":"string"},"hashFunction":{"type":"string"},"allowedToSign":{"type":"boolean"},"suggestedDirectorId":{"type":"integer","format":"int64"}}},"FinalizeSigningRequest":{"type":"object","properties":{"peppolId":{"type":"string"},"directorId":{"type":"integer","format":"int64"},"email":{"type":"string"},"certificate":{"type":"string"},"signature":{"type":"string"},"signatureAlgorithm":{"$ref":"#/components/schemas/SignatureAlgorithm"},"hashToSign":{"type":"string"},"hashToFinalize":{"type":"string"}}},"TotpStatusResponse":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"PasskeyDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"displayName":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"lastUsedOn":{"type":"string","format":"date-time"}}},"AccountInfo":{"type":"object","properties":{"peppolId":{"type":"string"},"identifier":{"type":"string"},"vatNumber":{"type":"string"},"companyName":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"},"directorName":{"type":"string"},"directorEmail":{"type":"string"},"active":{"type":"boolean"},"lastUpdatedTimestamp":{"type":"string","format":"date-time"}}},"CompanySearchResponse":{"type":"object","properties":{"peppolId":{"type":"string"},"identifier":{"type":"string"},"vatNumber":{"type":"string"},"name":{"type":"string"},"street":{"type":"string"},"city":{"type":"string"},"postalCode":{"type":"string"}}},"OwnershipSummary":{"type":"object","properties":{"peppolId":{"type":"string"},"companyName":{"type":"string"},"type":{"type":"string","enum":["ADMIN","USER","USER_DRAFT","USER_READ","APP","AFFILIATE"]},"peppolActive":{"type":"boolean"}}},"CsrfToken":{"type":"object","properties":{"headerName":{"type":"string"},"parameterName":{"type":"string"},"token":{"type":"string"}}},"AuthSessionResponse":{"type":"object","properties":{"status":{"type":"string"},"csrfToken":{"type":"string"},"csrfHeaderName":{"type":"string"},"csrfParameterName":{"type":"string"}}},"OAuth2Error":{"type":"object","properties":{"errorCode":{"type":"string"},"description":{"type":"string"},"uri":{"type":"string"}}},"OAuth2AuthorizationServerMetadata":{"type":"object","properties":{"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"response_types_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint":{"type":"string"},"introspection_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"jwks_uri":{"type":"string"}}},"OAuth2Token":{"type":"object","properties":{"scope":{"type":"string"},"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer","format":"int64"}}},"OAuth2TokenIntrospection":{"type":"object","properties":{"jti":{"type":"string"},"scope":{"type":"string"},"username":{"type":"string"},"iat":{"type":"integer","format":"int64"},"sub":{"type":"string"},"iss":{"type":"string"},"nbf":{"type":"integer","format":"int64"},"active":{"type":"boolean"},"client_id":{"type":"string"},"token_type":{"type":"string"},"aud":{"type":"array","items":{"type":"string"}},"exp":{"type":"integer","format":"int64"}}},"OidcProviderConfiguration":{"type":"object","properties":{"token_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"response_types_supported":{"type":"array","items":{"type":"string"}},"grant_types_supported":{"type":"array","items":{"type":"string"}},"revocation_endpoint":{"type":"string"},"revocation_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"introspection_endpoint":{"type":"string"},"introspection_endpoint_auth_methods_supported":{"type":"array","items":{"type":"string"}},"code_challenge_methods_supported":{"type":"array","items":{"type":"string"}},"id_token_signing_alg_values_supported":{"type":"string"},"scopes_supported":{"type":"string"},"subject_types_supported":{"type":"string"},"issuer":{"type":"string"},"authorization_endpoint":{"type":"string"},"token_endpoint":{"type":"string"},"userinfo_endpoint":{"type":"string"},"jwks_uri":{"type":"string"}}}},"securitySchemes":{"oauth2":{"type":"oauth2","description":"Browser Authorization Code flow. PKCE (S256) is mandatory.","flows":{"authorizationCode":{"authorizationUrl":"/kyc/auth/oauth2/authorize","tokenUrl":"/kyc/auth/oauth2/token","scopes":{"openid":"OpenID Connect sign-in"}}}},"serviceAuth":{"type":"oauth2","description":"Trusted backend client-credentials flow; never expose its secret to a browser.","flows":{"clientCredentials":{"tokenUrl":"/kyc/auth/oauth2/token","scopes":{"service":"Service-to-service API access"}}}},"bearerAuth":{"type":"http","description":"Manual JWT entry for diagnostics; normal clients use one of the OAuth2 flows.","scheme":"bearer","bearerFormat":"JWT"}}}}