{"openapi":"3.1.0","info":{"title":"VerifID — Identity Verification API","description":"KYC identity verification system","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Liveness","description":"Liveness probe — returns 200 if the process is running.","operationId":"liveness_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/ready":{"get":{"tags":["health"],"summary":"Readiness","description":"Deep readiness probe — checks all dependencies.","operationId":"readiness_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/api/v1/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Register a new developer account.","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Authenticate a developer and return a JWT.","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","description":"Get the current developer's profile.","operationId":"get_me_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}},"patch":{"tags":["auth"],"summary":"Update Profile","description":"Update the developer's profile (company_name).","operationId":"update_profile_api_v1_auth_me_patch","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["auth"],"summary":"Delete Account","description":"Delete the authenticated developer's account.\n\nDefault behaviour (soft delete): marks the account as deleted and\nschedules a hard-delete 30 days later. During the grace window the\naccount cannot log in and the API keys stop working, but all data\n(sessions, webhook config/logs, usage counters, row itself) remains\nintact so the user can self-recover via the magic-link email.\n\nWith `?immediate=true`: bypasses the grace window and purges every\nartifact synchronously. The account cannot be recovered afterwards.\n\nAfter `scheduled_hard_delete_at` elapses, a Cloud Run Job permanently\npurges every artifact (see `backend/scheduled_jobs/purge_soft_deleted.py`).\n\nRequires the current password to prevent hijack of a compromised session.","operationId":"delete_account_api_v1_auth_me_delete","parameters":[{"name":"immediate","in":"query","required":false,"schema":{"type":"boolean","description":"If true, skip the 30-day grace window and hard-delete the account immediately (GDPR Art. 17 strict). Default false: soft delete with 30-day recovery window.","default":false,"title":"Immediate"},"description":"If true, skip the 30-day grace window and hard-delete the account immediately (GDPR Art. 17 strict). Default false: soft delete with 30-day recovery window."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Clear the auth cookie.","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Logout Api V1 Auth Logout Post"}}}}}}},"/api/v1/auth/api-keys/rotate":{"post":{"tags":["auth"],"summary":"Rotate Api Keys","description":"Rotate both live and test API keys.","operationId":"rotate_api_keys_api_v1_auth_api_keys_rotate_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateKeysResponse"}}}}}}},"/api/v1/auth/api-keys/reveal":{"post":{"tags":["auth"],"summary":"Reveal Api Keys","description":"Decrypt and return the current API keys. Requires authentication.","operationId":"reveal_api_keys_api_v1_auth_api_keys_reveal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RotateKeysResponse"}}}}}}},"/api/v1/auth/me/overage-cap":{"patch":{"tags":["auth"],"summary":"Update Overage Cap","description":"V2.1 — adjust overage settings (enabled flag + cap percent).\n\nFree plan cannot enable overage — Stripe billing is the only path to\noverage charges and Free has no subscription. Returns 400 if a Free\ndeveloper tries to flip overage_enabled=True.","operationId":"update_overage_cap_api_v1_auth_me_overage_cap_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverageCapRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OverageCapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/password":{"patch":{"tags":["auth"],"summary":"Change Password","description":"Change password while logged in. Requires current password.","operationId":"change_password_api_v1_auth_me_password_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Change Password Api V1 Auth Me Password Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Send a password reset email (always returns 200 to prevent enumeration).","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Consume a password reset token and update the password.","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/request-recovery":{"post":{"tags":["auth"],"summary":"Request Account Recovery","description":"Send a self-service recovery magic link to the email if it matches a\nsoft-deleted account still within the 30-day grace window.\n\nAnti-enumeration: always returns 200 with the same message, regardless\nof whether the email matches a deleted account.\n\nRate limit: 3 requests per hour per IP.","operationId":"request_account_recovery_api_v1_auth_request_recovery_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/confirm-recovery":{"post":{"tags":["auth"],"summary":"Confirm Account Recovery","description":"Consume a recovery token and reactivate the soft-deleted account.\n\nValidates the JWT (purpose=account_recovery), checks the account is\nstill within its grace window, clears the soft-delete flags, restores\n`is_active=True`, and lets the user log in again with the same\ncredentials and API keys.\n\nRate limit: 5 attempts per hour per IP.","operationId":"confirm_account_recovery_api_v1_auth_confirm_recovery_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmRecoveryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmRecoveryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verifications":{"get":{"tags":["auth"],"summary":"Get Verifications","description":"Get the last 50 verification sessions for this developer.","operationId":"get_verifications_api_v1_auth_verifications_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VerificationHistoryItem"},"type":"array","title":"Response Get Verifications Api V1 Auth Verifications Get"}}}}}}},"/api/v1/auth/usage":{"get":{"tags":["auth"],"summary":"Get Usage","description":"Get current month's usage for the authenticated developer.","operationId":"get_usage_api_v1_auth_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponse"}}}}}}},"/api/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Create Checkout Session","description":"Create a Stripe Checkout session for the authenticated developer.","operationId":"create_checkout_session_api_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhook":{"post":{"tags":["billing"],"summary":"Stripe Webhook","description":"Handle Stripe webhook events.\n\nEvents handled:\n- checkout.session.completed → activate Pro plan\n- invoice.created/finalized/paid → persist invoice preview (V2.1 overage)\n- customer.subscription.updated → plan change via Portal\n- customer.subscription.deleted → downgrade to Free\n\nSignature is verified against both live and test secrets so the dashboard's\ntest endpoint keeps working while production stays on live mode. See\n:func:`_verify_webhook_dual_mode`.","operationId":"stripe_webhook_api_v1_billing_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Stripe Webhook Api V1 Billing Webhook Post"}}}}}}},"/api/v1/billing/usage-preview":{"get":{"tags":["billing"],"summary":"Get Usage Preview","description":"V2.1 — return current-month usage with overage cost projection.\n\nCombines live Redis usage counter + the last invoice preview persisted\nby the Stripe webhooks. Used by the dashboard billing card.","operationId":"get_usage_preview_api_v1_billing_usage_preview_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsagePreviewResponse"}}}}}}},"/api/v1/billing/subscription-status":{"get":{"tags":["billing"],"summary":"Get Subscription Status","description":"Say whether a LIVE Stripe subscription backs the locally stored plan.\n\nEl plan guardado en `metadata_` es una foto que puede quedarse rancia (un\nwebhook perdido, datos de test borrados, punteros a otro customer). El\nfrontend usa esta respuesta para decidir entre Customer Portal (hay\nsuscripcion que modificar) y Checkout (no hay: hay que suscribirse), en vez\nde deducirlo del plan local y dejar al cliente sin ninguna via de pago.\n\n`verified=False` significa \"no se pudo comprobar\": el frontend mantiene el\nportal. Ver `_find_manageable_subscription` para la direccion de fallo.","operationId":"get_subscription_status_api_v1_billing_subscription_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Subscription Status Api V1 Billing Subscription Status Get"}}}}}}},"/api/v1/billing/portal-url":{"get":{"tags":["billing"],"summary":"Get Portal Url","description":"Generate a Stripe Customer Portal URL for managing subscription.","operationId":"get_portal_url_api_v1_billing_portal_url_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Portal Url Api V1 Billing Portal Url Get"}}}}}}},"/api/v1/contact":{"post":{"tags":["contact"],"summary":"Submit Contact","description":"Submit a contact/sales inquiry. Rate limited to 3 per hour per IP.","operationId":"submit_contact_api_v1_contact_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactFormResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/verify":{"post":{"tags":["verification"],"summary":"Start Verification","description":"Start a new identity verification session.","operationId":"start_verification_api_v1_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/verify/{session_id}":{"get":{"tags":["verification"],"summary":"Get Verification","description":"Get the status and result of a verification session.","operationId":"get_verification_api_v1_verify__session_id__get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"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"}}}}}}},"/api/v1/session/create":{"post":{"tags":["session"],"summary":"Create Session","description":"Create a new verification session from the desktop.","operationId":"create_session_api_v1_session_create_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/status":{"get":{"tags":["session"],"summary":"Get Session Status","description":"Poll the current state of a session (called by desktop).","operationId":"get_session_status_api_v1_session__session_id__status_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/link-device":{"post":{"tags":["session"],"summary":"Link Device","description":"Link a mobile device to the session (called by mobile after QR scan).","operationId":"link_device_api_v1_session__session_id__link_device_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkDeviceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Link Device Api V1 Session  Session Id  Link Device Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/consent":{"post":{"tags":["session"],"summary":"Submit Consent","description":"Record GDPR consent for the session.\n\nConsent is persisted both in cache (for session flow) and in\naudit_logs (for legal proof of consent — GDPR Art. 7).","operationId":"submit_consent_api_v1_session__session_id__consent_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConsentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Submit Consent Api V1 Session  Session Id  Consent Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/document/front":{"post":{"tags":["session"],"summary":"Upload Document Front","description":"Upload the front side of the identity document.","operationId":"upload_document_front_api_v1_session__session_id__document_front_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/document/back":{"post":{"tags":["session"],"summary":"Upload Document Back","description":"Upload the back side of the identity document.","operationId":"upload_document_back_api_v1_session__session_id__document_back_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/selfie":{"post":{"tags":["session"],"summary":"Upload Selfie","description":"Upload selfie frames for liveness and face matching.","operationId":"upload_selfie_api_v1_session__session_id__selfie_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SelfieUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/verify":{"post":{"tags":["session"],"summary":"Start Verification","description":"Trigger the verification pipeline after all images are uploaded.","operationId":"start_verification_api_v1_session__session_id__verify_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Start Verification Api V1 Session  Session Id  Verify Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/expire":{"post":{"tags":["session"],"summary":"Expire Session","description":"Mark a session as expired (e.g., capture timeout on mobile).","operationId":"expire_session_api_v1_session__session_id__expire_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Expire Session Api V1 Session  Session Id  Expire Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/session/{session_id}/result":{"get":{"tags":["session"],"summary":"Get Result","description":"Get the final verification result.\n\n`extracted_data` (PII del documento) SOLO viaja a la API key duena de la\nsesion; el flujo hospedado anonimo, que tambien llama aqui, ve el veredicto\ny `null`.","operationId":"get_result_api_v1_session__session_id__result_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerificationResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/gdpr/session/{session_id}/data":{"delete":{"tags":["gdpr"],"summary":"Right to be forgotten — erase all data for a session","description":"GDPR Art. 17 — Right to erasure.\n\nPermanently deletes:\n- VerificationSession record (+ cascades to VerificationResults)\n- All associated AuditLog entries\n- Any remaining images in Redis cache","operationId":"delete_session_data_api_v1_gdpr_session__session_id__data_delete","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Session Data Api V1 Gdpr Session  Session Id  Data Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["gdpr"],"summary":"Data portability — export all data for a session","description":"GDPR Art. 20 — Right to data portability.\n\nReturns all stored data for a session in structured JSON format.\nDoes NOT include biometric images (already deleted after processing).","operationId":"export_session_data_api_v1_gdpr_session__session_id__data_get","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Export Session Data Api V1 Gdpr Session  Session Id  Data Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/configure":{"post":{"tags":["webhooks"],"summary":"Configure Webhook","description":"Register a webhook URL for the authenticated developer.\n\nReturns a signing secret that the client must use to verify\nthe HMAC-SHA256 signature on incoming webhook payloads.","operationId":"configure_webhook_api_v1_webhooks_configure_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/webhooks/config":{"get":{"tags":["webhooks"],"summary":"Get Webhook Config","description":"Get the current webhook configuration (secret is masked).","operationId":"get_webhook_config_api_v1_webhooks_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookConfigResponse"},{"type":"null"}],"title":"Response Get Webhook Config Api V1 Webhooks Config Get"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete Webhook","description":"Remove the authenticated developer's webhook configuration.","operationId":"delete_webhook_api_v1_webhooks_config_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete Webhook Api V1 Webhooks Config Delete"}}}}}}},"/api/v1/webhooks/test":{"post":{"tags":["webhooks"],"summary":"Test Webhook","description":"Send a test webhook to the authenticated developer's configured URL.","operationId":"test_webhook_api_v1_webhooks_test_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}}}}}},"/api/v1/webhooks/logs":{"get":{"tags":["webhooks"],"summary":"Get Webhook Logs","description":"Get the last 20 webhook delivery logs for the authenticated developer.","operationId":"get_webhook_logs_api_v1_webhooks_logs_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Response Get Webhook Logs Api V1 Webhooks Logs Get"}}}}}},"delete":{"tags":["webhooks"],"summary":"Delete Webhook Logs","description":"Clear all webhook delivery logs for the authenticated developer.","operationId":"delete_webhook_logs_api_v1_webhooks_logs_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Delete Webhook Logs Api V1 Webhooks Logs Delete"}}}}}}},"/internal/purge-images":{"post":{"tags":["maintenance"],"summary":"Purge Images","description":"Remove expired images from storage (GDPR compliance).\n\nReplaces the Celery Beat task 'purge_expired_images' (every 5 minutes).","operationId":"purge_images_internal_purge_images_post","parameters":[{"name":"x-scheduler-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Scheduler-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Purge Images Internal Purge Images Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/purge-sessions":{"post":{"tags":["maintenance"],"summary":"Purge Sessions","description":"Remove PII from old sessions and purge expired data (GDPR compliance).\n\nReplaces the Celery Beat task 'purge_expired_sessions' (every hour).\n1. Nullify metadata for sessions completed > 24h ago\n2. Delete sessions older than 90 days\n3. Purge audit logs older than 365 days","operationId":"purge_sessions_internal_purge_sessions_post","parameters":[{"name":"x-scheduler-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Scheduler-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"integer"},"title":"Response Purge Sessions Internal Purge Sessions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/review/pending":{"get":{"tags":["review"],"summary":"Pending Reviews","description":"Verificaciones de este cliente que esperan una decision humana.","operationId":"pending_reviews_api_v1_review_pending_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewQueue"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/review/{session_id}/resolve":{"post":{"tags":["review"],"summary":"Resolve Review","description":"Registra la decision del cliente sobre una verificacion en revision.\n\nLa pertenencia se comprueba EN LA CONSULTA: una sesion de otro cliente es un\n404 y no se toca. Ocultarla en la lista sin cerrar este endpoint solo\nesconderia el agujero.","operationId":"resolve_review_api_v1_review__session_id__resolve_post","parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":8,"title":"Current Password"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan","default":"starter"}},"type":"object","title":"CheckoutRequest"},"CheckoutResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"},"session_id":{"type":"string","title":"Session Id"}},"type":"object","required":["checkout_url","session_id"],"title":"CheckoutResponse"},"ConfirmRecoveryRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"ConfirmRecoveryRequest"},"ConfirmRecoveryResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"email":{"type":"string","title":"Email"}},"type":"object","required":["email"],"title":"ConfirmRecoveryResponse"},"ConsentRequest":{"properties":{"accepted":{"type":"boolean","title":"Accepted"},"improvement_consent":{"type":"boolean","title":"Improvement Consent","default":false},"timestamp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timestamp"}},"type":"object","required":["accepted"],"title":"ConsentRequest"},"ContactFormRequest":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"company":{"type":"string","maxLength":200,"minLength":1,"title":"Company"},"plan":{"type":"string","maxLength":50,"title":"Plan","default":"starter"},"message":{"type":"string","maxLength":5000,"minLength":10,"title":"Message"}},"type":"object","required":["name","email","company","message"],"title":"ContactFormRequest"},"ContactFormResponse":{"properties":{"id":{"type":"string","title":"Id"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","message"],"title":"ContactFormResponse"},"CreateSessionRequest":{"properties":{"user_data":{"$ref":"#/components/schemas/UserDataInput"},"document_type":{"$ref":"#/components/schemas/DocumentType","default":"national_id"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["user_data"],"title":"CreateSessionRequest"},"CreateSessionResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"device_token":{"type":"string","title":"Device Token"},"qr_url":{"type":"string","title":"Qr Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["session_id","device_token","qr_url","expires_at"],"title":"CreateSessionResponse"},"DeleteAccountRequest":{"properties":{"current_password":{"type":"string","maxLength":128,"minLength":1,"title":"Current Password"}},"type":"object","required":["current_password"],"title":"DeleteAccountRequest"},"DeleteAccountResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"deleted_at":{"type":"string","format":"date-time","title":"Deleted At"},"scheduled_hard_delete_at":{"type":"string","format":"date-time","title":"Scheduled Hard Delete At"},"recovery_window_days":{"type":"integer","title":"Recovery Window Days","default":30}},"type":"object","required":["deleted_at","scheduled_hard_delete_at"],"title":"DeleteAccountResponse"},"DeveloperInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"}},"type":"object","required":["id","email","company_name"],"title":"DeveloperInfo"},"DocumentType":{"type":"string","enum":["passport","driving_license","national_id","foreigner_id","long_term_residence"],"title":"DocumentType"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest"},"ForgotPasswordResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"ForgotPasswordResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"checks":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Checks"}},"type":"object","required":["status"],"title":"HealthResponse","description":"Health check response."},"ImageUploadRequest":{"properties":{"image":{"type":"string","title":"Image","description":"Base64-encoded JPEG image"},"frames":{"items":{"type":"string"},"type":"array","title":"Frames","description":"Fotogramas opcionales del documento inclinandose"}},"type":"object","required":["image"],"title":"ImageUploadRequest"},"ImageUploadResponse":{"properties":{"accepted":{"type":"boolean","title":"Accepted"},"quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Quality"},"message":{"type":"string","title":"Message","default":""}},"type":"object","required":["accepted"],"title":"ImageUploadResponse"},"LinkDeviceRequest":{"properties":{"device_token":{"type":"string","title":"Device Token"},"device_fingerprint":{"type":"string","title":"Device Fingerprint"}},"type":"object","required":["device_token","device_fingerprint"],"title":"LinkDeviceRequest"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"developer":{"$ref":"#/components/schemas/DeveloperInfo"}},"type":"object","required":["access_token","developer"],"title":"LoginResponse"},"MeResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"api_key_live":{"type":"string","title":"Api Key Live"},"api_key_test":{"type":"string","title":"Api Key Test"},"plan":{"type":"string","title":"Plan"},"usage_this_month":{"type":"integer","title":"Usage This Month"},"usage_limit":{"type":"integer","title":"Usage Limit"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"cancel_at_period_end":{"type":"boolean","title":"Cancel At Period End","default":false},"cancel_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancel At"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"},"plan_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Source"},"subscription_cancelling":{"type":"boolean","title":"Subscription Cancelling","default":false}},"type":"object","required":["id","email","company_name","api_key_live","api_key_test","plan","usage_this_month","usage_limit","created_at"],"title":"MeResponse"},"OverageCapRequest":{"properties":{"overage_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Overage Enabled"},"overage_cap_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Overage Cap Percent"}},"type":"object","title":"OverageCapRequest","description":"V2.1 — body for PATCH /me/overage-cap."},"OverageCapResponse":{"properties":{"overage_enabled":{"type":"boolean","title":"Overage Enabled"},"overage_cap_percent":{"type":"integer","title":"Overage Cap Percent"},"plan":{"type":"string","title":"Plan"},"included":{"type":"integer","title":"Included"},"hard_cap":{"type":"integer","title":"Hard Cap"}},"type":"object","required":["overage_enabled","overage_cap_percent","plan","included","hard_cap"],"title":"OverageCapResponse"},"RecoveryRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"RecoveryRequest"},"RecoveryResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true},"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"RecoveryResponse"},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":8,"title":"Password"},"company_name":{"type":"string","maxLength":200,"minLength":1,"title":"Company Name"},"captcha_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captcha Token"}},"type":"object","required":["email","password","company_name"],"title":"RegisterRequest"},"RegisterResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"},"api_key_live":{"type":"string","title":"Api Key Live"},"api_key_test":{"type":"string","title":"Api Key Test"},"access_token":{"type":"string","title":"Access Token"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","company_name","api_key_live","api_key_test","access_token","created_at"],"title":"RegisterResponse"},"ResetPasswordRequest":{"properties":{"token":{"type":"string","maxLength":2048,"minLength":10,"title":"Token"},"new_password":{"type":"string","maxLength":128,"minLength":8,"title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest"},"ResetPasswordResponse":{"properties":{"ok":{"type":"boolean","title":"Ok","default":true}},"type":"object","title":"ResetPasswordResponse"},"ResolveRequest":{"properties":{"decision":{"type":"string","enum":["approved","rejected"],"title":"Decision"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["decision","reason"],"title":"ResolveRequest"},"ResolveResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"decision":{"type":"string","title":"Decision"},"resolved_by":{"type":"string","title":"Resolved By"},"resolved_at":{"type":"string","format":"date-time","title":"Resolved At"},"verifid_status":{"type":"string","title":"Verifid Status"}},"type":"object","required":["session_id","decision","resolved_by","resolved_at","verifid_status"],"title":"ResolveResponse"},"ReviewItem":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"confidence_score":{"type":"number","title":"Confidence Score","default":0.0},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"data_match":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data Match"},"sandbox":{"type":"boolean","title":"Sandbox","default":false}},"type":"object","required":["session_id","created_at"],"title":"ReviewItem","description":"Una verificacion esperando decision.\n\nLleva las SENALES con las que decidir -puntuacion, motivos, el cruce de\ndatos- y NUNCA la PII del documento: `extracted_data` tiene su propio gate\npor clave duena en `/result` y no se cuela por aqui."},"ReviewQueue":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"ReviewQueue"},"RotateKeysResponse":{"properties":{"api_key_live":{"type":"string","title":"Api Key Live"},"api_key_test":{"type":"string","title":"Api Key Test"}},"type":"object","required":["api_key_live","api_key_test"],"title":"RotateKeysResponse"},"SelfieUploadRequest":{"properties":{"frames":{"items":{"type":"string"},"type":"array","title":"Frames","description":"Base64-encoded JPEG frames"},"challenges":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Challenges"}},"type":"object","required":["frames"],"title":"SelfieUploadRequest"},"SessionStatus":{"type":"string","enum":["pending","linked","capturing","processing","completed","failed","expired"],"title":"SessionStatus"},"SessionStatusResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"status":{"$ref":"#/components/schemas/SessionStatus"},"device_linked":{"type":"boolean","title":"Device Linked","default":false},"current_phase":{"type":"string","title":"Current Phase","default":""},"completed_phases":{"items":{"type":"string"},"type":"array","title":"Completed Phases"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"}},"type":"object","required":["session_id","status"],"title":"SessionStatusResponse"},"UpdateProfileRequest":{"properties":{"company_name":{"type":"string","maxLength":200,"minLength":1,"title":"Company Name"}},"type":"object","required":["company_name"],"title":"UpdateProfileRequest"},"UpdateProfileResponse":{"properties":{"email":{"type":"string","title":"Email"},"company_name":{"type":"string","title":"Company Name"}},"type":"object","required":["email","company_name"],"title":"UpdateProfileResponse"},"UsagePreviewResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"included":{"type":"integer","title":"Included"},"used":{"type":"integer","title":"Used"},"overage_used":{"type":"integer","title":"Overage Used"},"overage_enabled":{"type":"boolean","title":"Overage Enabled"},"overage_cap_percent":{"type":"integer","title":"Overage Cap Percent"},"hard_cap":{"type":"integer","title":"Hard Cap"},"overage_rate_cents":{"type":"integer","title":"Overage Rate Cents"},"overage_amount_cents":{"type":"integer","title":"Overage Amount Cents"},"base_amount_cents":{"type":"integer","title":"Base Amount Cents"},"estimated_total_cents":{"type":"integer","title":"Estimated Total Cents"},"currency":{"type":"string","title":"Currency"},"period":{"type":"string","title":"Period"},"last_invoice":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Last Invoice"}},"type":"object","required":["plan","included","used","overage_used","overage_enabled","overage_cap_percent","hard_cap","overage_rate_cents","overage_amount_cents","base_amount_cents","estimated_total_cents","currency","period","last_invoice"],"title":"UsagePreviewResponse","description":"V2.1 — overage-aware usage preview for the dashboard."},"UsageResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"limit":{"type":"integer","title":"Limit"},"used":{"type":"integer","title":"Used"},"remaining":{"type":"integer","title":"Remaining"},"period":{"type":"string","title":"Period"}},"type":"object","required":["plan","limit","used","remaining","period"],"title":"UsageResponse"},"UserDataInput":{"properties":{"full_name":{"type":"string","title":"Full Name","default":""},"date_of_birth":{"type":"string","title":"Date Of Birth","default":""},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"nif":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nif"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"citizenship":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Citizenship"},"document_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Number"}},"type":"object","title":"UserDataInput"},"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"},"VerificationCreated":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"status":{"$ref":"#/components/schemas/VerificationStatus","default":"pending"},"message":{"type":"string","title":"Message","default":"Verification session created"}},"type":"object","title":"VerificationCreated","description":"Response when a verification session is created."},"VerificationHistoryItem":{"properties":{"session_id":{"type":"string","title":"Session Id"},"status":{"type":"string","title":"Status"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processing Time Ms"},"document_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Type"},"document_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Number"},"full_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Full Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"sandbox":{"type":"boolean","title":"Sandbox","default":false}},"type":"object","required":["session_id","status","confidence_score","processing_time_ms","document_type","document_number","full_name","created_at"],"title":"VerificationHistoryItem"},"VerificationRequest":{"properties":{"selfie_image":{"type":"string","title":"Selfie Image","description":"Base64-encoded selfie image"},"document_image":{"type":"string","title":"Document Image","description":"Base64-encoded document image"},"device_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Fingerprint","description":"SHA256 hash of device info"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Additional client metadata"}},"type":"object","required":["selfie_image","document_image"],"title":"VerificationRequest","description":"Request to start a verification session."},"VerificationResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"status":{"$ref":"#/components/schemas/VerificationStatus"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"modules_scores":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Modules Scores"},"processing_time_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Processing Time Ms"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","required":["session_id","status"],"title":"VerificationResponse","description":"Response from a verification session."},"VerificationResultResponse":{"properties":{"session_id":{"type":"string","format":"uuid","title":"Session Id"},"status":{"type":"string","title":"Status"},"confidence_score":{"type":"number","title":"Confidence Score","default":0.0},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"processing_time_ms":{"type":"integer","title":"Processing Time Ms","default":0},"data_match":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data Match"},"extracted_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extracted Data"},"sandbox":{"type":"boolean","title":"Sandbox","default":false}},"type":"object","required":["session_id","status"],"title":"VerificationResultResponse"},"VerificationStatus":{"type":"string","enum":["pending","processing","verified","rejected","manual_review","error"],"title":"VerificationStatus"},"WebhookConfigRequest":{"properties":{"url":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Url"},"events":{"items":{"type":"string"},"type":"array","title":"Events","default":["verification.verified","verification.rejected"]}},"type":"object","required":["url"],"title":"WebhookConfigRequest","description":"Register or update a webhook endpoint."},"WebhookConfigResponse":{"properties":{"url":{"type":"string","title":"Url"},"secret":{"type":"string","title":"Secret"},"events":{"items":{"type":"string"},"type":"array","title":"Events"},"message":{"type":"string","title":"Message"}},"type":"object","required":["url","secret","events","message"],"title":"WebhookConfigResponse","description":"Webhook configuration with signing secret."},"WebhookTestResponse":{"properties":{"delivered":{"type":"boolean","title":"Delivered"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"elapsed_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Elapsed Ms"}},"type":"object","required":["delivered"],"title":"WebhookTestResponse","description":"Result of a webhook test delivery."}}}}