{"openapi":"3.1.0","info":{"title":"Invenitor API","description":"Connecting people. Send a LinkedIn or GitHub profile link. A name helps too. Get emails, phones, and links when we have them.","version":"2.0.0"},"paths":{"/internal/identity/vet":{"post":{"summary":"Vet","description":"Decide whether a signup may proceed. Called before the user is created.","operationId":"vet_internal_identity_vet_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/session":{"post":{"summary":"Track Session","description":"Record a session heartbeat and block concurrent sessions from other IPs.","operationId":"track_session_internal_identity_session_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTrackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/register":{"post":{"summary":"Register","description":"Claim every handle for a newly created account.","operationId":"register_internal_identity_register_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/locked":{"post":{"summary":"Locked","description":"Is this principal locked? Called on every sign-in and session check.","operationId":"locked_internal_identity_locked_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockedRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Locked Get","description":"Same payload as POST. Query fields; never reason or signals.","operationId":"locked_get_internal_identity_locked_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","default":"","title":"Provider"}},{"name":"provider_user_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Provider User Id"}},{"name":"ip","in":"query","required":false,"schema":{"type":"string","default":"","title":"Ip"}},{"name":"account_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/onboarding/start":{"post":{"summary":"Onboarding Start","description":"Save invoice fields and mark the session mailbox as Google-proved.\n\n``body.email`` must be the Next.js session address, never a client-chosen\nmailbox. No 6-digit email OTP is minted or mailed (ADR-0017).","operationId":"onboarding_start_internal_identity_onboarding_start_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/onboarding/verify-email":{"post":{"summary":"Onboarding Verify Email","operationId":"onboarding_verify_email_internal_identity_onboarding_verify_email_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/onboarding/status":{"get":{"summary":"Onboarding Status","operationId":"onboarding_status_internal_identity_onboarding_status_get","parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/business-profile":{"patch":{"summary":"Update Business Profile","description":"Edit name/address/GSTIN after onboarding. Verified email/WhatsApp are\nnot editable through this endpoint.","operationId":"update_business_profile_internal_identity_business_profile_patch","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessProfilePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/locks":{"post":{"summary":"Create Lock","operationId":"create_lock_api_v1_admin_locks_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Lock","operationId":"delete_lock_api_v1_admin_locks_delete","parameters":[{"name":"subject_type","in":"query","required":true,"schema":{"type":"string","title":"Subject Type"}},{"name":"subject","in":"query","required":true,"schema":{"type":"string","title":"Subject"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get Locks","operationId":"get_locks_api_v1_admin_locks_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"include_expired","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Expired"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/locks/unlock":{"post":{"summary":"Unlock Lock","description":"Lift a lock. Prefer this over DELETE when proxies drop the body or verb.","operationId":"unlock_lock_api_v1_admin_locks_unlock_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/abuse/attempts":{"get":{"summary":"Recent Attempts","description":"Recent signup attempts — the evidence behind any refusal.","operationId":"recent_attempts_api_v1_admin_abuse_attempts_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/whatsapp/status":{"post":{"summary":"Whatsapp Status","operationId":"whatsapp_status_internal_identity_whatsapp_status_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppAccount"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/whatsapp/pending":{"post":{"summary":"Whatsapp Pending","description":"Record a number with no OTP round-trip. Only meaningful while\n``PF_WHATSAPP_REQUIRED=false`` (Meta review window) — see\n`whatsapp.record_pending`.","operationId":"whatsapp_pending_internal_identity_whatsapp_pending_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/whatsapp/start":{"post":{"summary":"Whatsapp Start","operationId":"whatsapp_start_internal_identity_whatsapp_start_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppStartRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/identity/whatsapp/confirm":{"post":{"summary":"Whatsapp Confirm","operationId":"whatsapp_confirm_internal_identity_whatsapp_confirm_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/whatsapp/unbind":{"post":{"summary":"Whatsapp Unbind","description":"Ops/support only. Customers cannot unlink. Writes an audit row.","operationId":"whatsapp_unbind_api_v1_admin_whatsapp_unbind_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Admin-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhatsAppUnbindRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/identity/whatsapp/webhook":{"get":{"summary":"Whatsapp Webhook Verify","description":"Meta's callback URL handshake — GET with hub.mode/hub.verify_token/hub.challenge.\n\nCalled directly by Meta, not through the dashboard, so it is public and\ncannot carry ``x-internal-secret``. Meta requires this handshake to\nsucceed before a Cloud API app can send or receive WhatsApp messages,\neven in test/dev mode — separate from ``PF_INTERNAL_SECRET``.","operationId":"whatsapp_webhook_verify_api_v1_identity_whatsapp_webhook_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Whatsapp Webhook Event","description":"Meta's event delivery callback (message status, inbound replies).\n\nWe only ever push OTPs and verify them against a user-typed code\n(``whatsapp.confirm``) — nothing here reads inbound message content.\nThis exists to satisfy Meta's webhook subscription requirement and\nacknowledge events so Meta does not retry or flag the endpoint down.\nSignature is verified fail-closed: an unset app secret rejects every\nevent rather than skipping verification.","operationId":"whatsapp_webhook_event_api_v1_identity_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/plans":{"get":{"summary":"Get Plans","operationId":"get_plans_api_v1_billing_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/billing/checkout":{"post":{"summary":"Create Checkout","description":"Start a checkout for a plan. No account required — none exists yet.","operationId":"create_checkout_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":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/claim-token":{"get":{"summary":"Get Claim Token","description":"Poll: has the webhook for this payment landed yet?\n\nThe success-redirect page calls this right after the provider sends the\ncustomer back, before OAuth. `payment_reference` is the order or\nsubscription id the checkout call already returned to this same\ncustomer — it is not a secret, but it is also not guessable.","operationId":"get_claim_token_api_v1_billing_claim_token_get","parameters":[{"name":"payment_reference","in":"query","required":true,"schema":{"type":"string","title":"Payment Reference"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/billing/webhook/{provider_name}":{"post":{"summary":"Webhook","operationId":"webhook_api_v1_billing_webhook__provider_name__post","parameters":[{"name":"provider_name","in":"path","required":true,"schema":{"type":"string","title":"Provider Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/claim":{"post":{"summary":"Claim","operationId":"claim_internal_billing_claim_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/mcp-status/{account_id}":{"get":{"summary":"Mcp Status","description":"Live MCP gate for the dashboard. Same decide_mcp as POST /mcp.","operationId":"mcp_status_internal_billing_mcp_status__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/balance/{account_id}":{"get":{"summary":"Balance","operationId":"balance_internal_billing_balance__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/history/{account_id}":{"get":{"summary":"History","description":"Every credit grant and spend for an account — the invoice trail.\n\nThere is no rendered PDF invoice yet (see 06-pricing-and-billing.md);\nthis is the underlying ledger data a receipts page would be built on.","operationId":"history_internal_billing_history__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/checkout":{"post":{"summary":"Create Account Checkout","description":"Start a checkout for a signed-in, onboarded account.\n\nUnlike the public `/api/v1/billing/checkout`, this requires the account\nto have already completed onboarding (verified email + WhatsApp +\nbusiness profile) — an account with zero credits and no verified\nidentity must not be able to buy credits.","operationId":"create_account_checkout_internal_billing_checkout_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/payments/{account_id}":{"get":{"summary":"Payments For Account","description":"The payment ledger: one row per money movement, separate from the\ncredit usage ledger (`/internal/billing/history/{account_id}`).","operationId":"payments_for_account_internal_billing_payments__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/billing/invoice/{account_id}":{"get":{"summary":"Invoice Pdf","description":"Render an invoice PDF on demand for a completed payment.","operationId":"invoice_pdf_internal_billing_invoice__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"provider_payment_id","in":"query","required":true,"schema":{"type":"string","title":"Provider Payment Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/key/by-account/{account_id}":{"get":{"summary":"Key By Account","description":"The API key belonging to an account, for the dashboard.\n\nReturns the key metadata (prefix, plan, rate limit, status) — never the\nraw key, which is not recoverable after creation. The dashboard shows\nthe prefix and lets the customer regenerate if they need a new raw key.","operationId":"key_by_account_internal_key_by_account__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/keys/by-account/{account_id}":{"get":{"summary":"Keys By Account","description":"Prefix-only keys for the signed-in account. Never the raw secret.","operationId":"keys_by_account_internal_keys_by_account__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/find":{"post":{"summary":"Internal Session Find","description":"Run find as this account's key. Dashboard session + internal secret only.","operationId":"internal_session_find_internal_find_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalFindBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/key/ensure/{account_id}":{"post":{"summary":"Ensure Key For Account","description":"Mint the account's key if it does not have one yet.\n\nCredits are not required. A find still spends the ledger; this only\nremoves the extra step of creating a key before the playground.\nReturns the raw key only when a new one is created. Existing keys return\nprefix-only — the secret cannot be recovered.","operationId":"ensure_key_for_account_internal_key_ensure__account_id__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnsureKeyBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/usage/by-account/{account_id}":{"get":{"summary":"Usage By Account","description":"This account's usage only — never global ops totals.\n\n`usage_24h` stays last-24h for Overview. `summary`, `daily`, and `events`\nuse `start`/`end` (default last 7 days, max 90).","operationId":"usage_by_account_internal_usage_by_account__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"start","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start"}},{"name":"end","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kind"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/key/regenerate/{account_id}":{"post":{"summary":"Regenerate Key","description":"Issue a new raw key for an account, invalidating the old one.\n\nThe old key is immediately banned (not deleted — the audit trail stays).\nA new key is minted and returned exactly once. The account's credits\nand subscription are untouched: only the credential rotates.","operationId":"regenerate_key_internal_key_regenerate__account_id__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateKeyBody","default":{"expires_in_days":90}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/plan-features":{"get":{"summary":"Get Plan Features","operationId":"get_plan_features_api_v1_admin_plan_features_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Plan Features","operationId":"patch_plan_features_api_v1_admin_plan_features_patch","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanFeaturePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/account-features":{"get":{"summary":"Get Account Features","operationId":"get_account_features_api_v1_admin_account_features_get","parameters":[{"name":"account_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Account Id"}},{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Account Features","operationId":"patch_account_features_api_v1_admin_account_features_patch","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountFeaturePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/growth/active":{"get":{"summary":"Active Campaigns","description":"Public banners and popups. No secrets, no unused promo inventory.","operationId":"active_campaigns_api_v1_growth_active_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/internal/growth/redeem":{"post":{"summary":"Redeem","operationId":"redeem_internal_growth_redeem_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/growth/preview-promo":{"post":{"summary":"Preview Promo","operationId":"preview_promo_internal_growth_preview_promo_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewPromoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/campaigns":{"get":{"summary":"Admin List Campaigns","operationId":"admin_list_campaigns_api_v1_admin_growth_campaigns_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Admin Upsert Campaign","operationId":"admin_upsert_campaign_api_v1_admin_growth_campaigns_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"type":"string","default":"ops","title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/campaigns/{campaign_id}/archive":{"post":{"summary":"Admin Archive Campaign","operationId":"admin_archive_campaign_api_v1_admin_growth_campaigns__campaign_id__archive_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","title":"Campaign Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/promos":{"get":{"summary":"Admin List Promos","operationId":"admin_list_promos_api_v1_admin_growth_promos_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Admin Upsert Promo","operationId":"admin_upsert_promo_api_v1_admin_growth_promos_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"type":"string","default":"ops","title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/credits":{"post":{"summary":"Admin Grant Credits","operationId":"admin_grant_credits_api_v1_admin_growth_credits_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"type":"string","default":"ops","title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrantBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Admin List Grants","operationId":"admin_list_grants_api_v1_admin_growth_credits_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/redemptions":{"get":{"summary":"Admin List Redemptions","operationId":"admin_list_redemptions_api_v1_admin_growth_redemptions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/accounts":{"get":{"summary":"Admin Lookup Account","operationId":"admin_lookup_account_api_v1_admin_growth_accounts_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"account_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Account Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","default":"","title":"Q"}},{"name":"locked","in":"query","required":false,"schema":{"type":"string","default":"","title":"Locked"}},{"name":"rpm","in":"query","required":false,"schema":{"type":"string","default":"","title":"Rpm"}},{"name":"whatsapp","in":"query","required":false,"schema":{"type":"string","default":"","title":"Whatsapp"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/accounts/rate":{"patch":{"summary":"Admin Set Account Rate","operationId":"admin_set_account_rate_api_v1_admin_growth_accounts_rate_patch","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"type":"string","default":"ops","title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountRateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/growth/journey":{"get":{"summary":"Admin Customer Journey","description":"Timestamped customer journey from Cloud SQL. No Amplitude. No Mixpanel.","operationId":"admin_customer_journey_api_v1_admin_growth_journey_get","parameters":[{"name":"email","in":"query","required":false,"schema":{"type":"string","default":"","title":"Email"}},{"name":"account_id","in":"query","required":false,"schema":{"type":"string","default":"","title":"Account Id"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/extension/session":{"post":{"summary":"Internal Mint Session","operationId":"internal_mint_session_internal_extension_session_post","parameters":[{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/jobs/{account_id}":{"get":{"summary":"Internal List Jobs","operationId":"internal_list_jobs_internal_jobs__account_id__get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"opened_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened From"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Internal Create Job","operationId":"internal_create_job_internal_jobs__account_id__post","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalJobCreateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/jobs/{account_id}/{job_id}/csv":{"get":{"summary":"Internal Job Csv","operationId":"internal_job_csv_internal_jobs__account_id___job_id__csv_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"x-internal-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Internal-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status":{"get":{"summary":"Public Status","description":"Unauthenticated. No actor emails, versions, SQL, or secret names.","operationId":"public_status_api_v1_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/admin/platform":{"get":{"summary":"Get Platform","operationId":"get_platform_api_v1_admin_platform_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch Platform","operationId":"patch_platform_api_v1_admin_platform_patch","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/platform/rollback":{"post":{"summary":"Rollback Platform","operationId":"rollback_platform_api_v1_admin_platform_rollback_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}},{"name":"x-ops-actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Ops-Actor"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-protected-resource/mcp":{"get":{"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"summary":"Oauth Protected Resource","operationId":"oauth_protected_resource__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/mcp.json":{"get":{"summary":"Mcp Well Known Manifest","operationId":"mcp_well_known_manifest__well_known_mcp_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/mcp":{"get":{"summary":"Mcp Get","description":"No SSE stream. Spec: 405 is the correct signal.","operationId":"mcp_get_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"summary":"Mcp Post","operationId":"mcp_post_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"delete":{"summary":"Mcp Delete","description":"Stateless server — clients may DELETE; we do not keep sessions.","operationId":"mcp_delete_mcp_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/extension/session":{"get":{"summary":"Extension Session","operationId":"extension_session_api_v1_extension_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/extension/refresh":{"post":{"summary":"Extension Refresh","operationId":"extension_refresh_api_v1_extension_refresh_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/jobs":{"post":{"summary":"Create Job","operationId":"create_job_api_v1_jobs_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreateBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List Jobs","operationId":"list_jobs_api_v1_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"opened_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Opened From"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_job_api_v1_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}/csv":{"get":{"summary":"Get Job Csv","operationId":"get_job_csv_api_v1_jobs__job_id__csv_get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Landing Page","operationId":"landing_page__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/pricing":{"get":{"summary":"Get Pricing","operationId":"get_pricing_api_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/docs":{"get":{"summary":"Ai Agent Docs","operationId":"ai_agent_docs_api_docs_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/health":{"get":{"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/find":{"post":{"summary":"Find Contacts Endpoint","operationId":"find_contacts_endpoint_api_v1_find_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FindRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/usage":{"get":{"summary":"Get Usage","operationId":"get_usage_api_v1_usage_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/key/info":{"get":{"summary":"Key Info","operationId":"key_info_api_v1_key_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/keys/create":{"post":{"summary":"Create Key","operationId":"create_key_api_v1_keys_create_post","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/keys/list":{"get":{"summary":"List Keys","operationId":"list_keys_api_v1_keys_list_get","parameters":[{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/usage":{"get":{"summary":"Admin Usage","description":"Real aggregate usage for the dashboard.\n\nThe dashboard previously had no endpoint for this and returned\nhardcoded zeros.","operationId":"admin_usage_api_v1_admin_usage_get","parameters":[{"name":"hours","in":"query","required":false,"schema":{"type":"integer","default":24,"title":"Hours"}},{"name":"x-admin-secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountCheckoutRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"account_id":{"type":"string","title":"Account Id"},"notify_email":{"type":"string","maxLength":320,"title":"Notify Email","default":""}},"type":"object","required":["plan_id","account_id"],"title":"AccountCheckoutRequest"},"AccountFeaturePatch":{"properties":{"account_id":{"type":"string","title":"Account Id","default":""},"email":{"type":"string","maxLength":320,"title":"Email","default":""},"mcp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mcp"},"inherit":{"type":"boolean","title":"Inherit","default":false},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"AccountFeaturePatch"},"AccountRateBody":{"properties":{"account_id":{"type":"string","title":"Account Id","default":""},"email":{"type":"string","title":"Email","default":""},"rpm":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rpm"},"message":{"type":"string","title":"Message","default":""}},"type":"object","title":"AccountRateBody"},"BusinessProfilePatch":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"first_name":{"type":"string","maxLength":200,"title":"First Name"},"last_name":{"type":"string","maxLength":200,"title":"Last Name"},"address_line1":{"type":"string","maxLength":300,"title":"Address Line1"},"address_line2":{"type":"string","maxLength":300,"title":"Address Line2","default":""},"city":{"type":"string","maxLength":120,"title":"City"},"state":{"type":"string","maxLength":120,"title":"State"},"pincode":{"type":"string","maxLength":12,"title":"Pincode"},"gstin":{"type":"string","maxLength":15,"title":"Gstin","default":""}},"type":"object","required":["account_id","first_name","last_name","address_line1","city","state","pincode"],"title":"BusinessProfilePatch"},"CampaignBody":{"properties":{"id":{"type":"string","title":"Id","default":""},"slug":{"type":"string","title":"Slug","default":""},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status","default":"draft"},"starts_at":{"type":"string","title":"Starts At","default":""},"ends_at":{"type":"string","title":"Ends At","default":""},"banner_enabled":{"type":"boolean","title":"Banner Enabled","default":false},"banner_text":{"type":"string","title":"Banner Text","default":""},"banner_href":{"type":"string","title":"Banner Href","default":""},"banner_cta":{"type":"string","title":"Banner Cta","default":""},"banner_theme":{"type":"string","title":"Banner Theme","default":"info"},"banner_bg":{"type":"string","title":"Banner Bg","default":""},"banner_fg":{"type":"string","title":"Banner Fg","default":""},"banner_surfaces":{"items":{"type":"string"},"type":"array","title":"Banner Surfaces"},"modal_enabled":{"type":"boolean","title":"Modal Enabled","default":false},"modal_title":{"type":"string","title":"Modal Title","default":""},"modal_body":{"type":"string","title":"Modal Body","default":""},"modal_image_url":{"type":"string","title":"Modal Image Url","default":""},"modal_cta_label":{"type":"string","title":"Modal Cta Label","default":""},"modal_cta_href":{"type":"string","title":"Modal Cta Href","default":""},"modal_secondary_label":{"type":"string","title":"Modal Secondary Label","default":""},"modal_secondary_href":{"type":"string","title":"Modal Secondary Href","default":""},"modal_audience":{"type":"string","title":"Modal Audience","default":"first_visit"},"promo_code":{"type":"string","title":"Promo Code","default":""},"promo_credits":{"type":"integer","title":"Promo Credits","default":0},"promo_max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Promo Max Uses"},"promo_message":{"type":"string","title":"Promo Message","default":""}},"type":"object","required":["name"],"title":"CampaignBody"},"CheckoutRequest":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"notify_email":{"type":"string","maxLength":320,"title":"Notify Email","default":""}},"type":"object","required":["plan_id"],"title":"CheckoutRequest"},"ClaimRequest":{"properties":{"token":{"type":"string","title":"Token"},"account_id":{"type":"string","title":"Account Id"},"email":{"type":"string","maxLength":320,"title":"Email","default":""}},"type":"object","required":["token","account_id"],"title":"ClaimRequest"},"CreateKeyRequest":{"properties":{"email":{"type":"string","title":"Email"},"plan":{"type":"string","title":"Plan","default":"credits_25"},"credits":{"type":"integer","title":"Credits","default":0},"rate_limit_per_min":{"type":"integer","title":"Rate Limit Per Min","default":0},"allowed_ips":{"type":"string","title":"Allowed Ips","default":""},"customer_name":{"type":"string","title":"Customer Name","default":""},"notes":{"type":"string","title":"Notes","default":""},"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days","default":90},"expires_at":{"type":"string","title":"Expires At","default":""}},"type":"object","required":["email"],"title":"CreateKeyRequest","description":"Request body for creating a new API key (admin only)."},"EnsureKeyBody":{"properties":{"email":{"type":"string","title":"Email","default":""},"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days","default":90}},"type":"object","title":"EnsureKeyBody"},"FindRequest":{"properties":{"full_name":{"type":"string","maxLength":200,"title":"Full Name","description":"Person's full name (recommended)","default":""},"github_url":{"type":"string","title":"Github Url","description":"GitHub profile URL","default":""},"linkedin_url":{"type":"string","title":"Linkedin Url","description":"LinkedIn profile URL","default":""},"company":{"type":"string","title":"Company","description":"Current company name (optional)","default":""},"location":{"type":"string","title":"Location","description":"Location hint (optional)","default":""},"include_social":{"type":"boolean","title":"Include Social","description":"Whether to discover social links","default":true},"include_company_email":{"type":"boolean","title":"Include Company Email","description":"Whether to search for company emails","default":false},"opened_from":{"type":"string","title":"Opened From","description":"extension | dashboard | api | mcp","default":"api"}},"type":"object","title":"FindRequest","description":"Request body for the find contacts endpoint."},"GrantBody":{"properties":{"credits":{"type":"integer","title":"Credits","default":0},"message":{"type":"string","title":"Message"},"scope":{"type":"string","title":"Scope","default":"user"},"email":{"type":"string","title":"Email","default":""},"account_id":{"type":"string","title":"Account Id","default":""},"account_ids":{"items":{"type":"string"},"type":"array","title":"Account Ids"},"action":{"type":"string","title":"Action","default":"grant"},"confirm":{"type":"string","title":"Confirm","default":""}},"type":"object","required":["message"],"title":"GrantBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InternalFindBody":{"properties":{"account_id":{"type":"string","maxLength":200,"minLength":1,"title":"Account Id"},"key_prefix":{"type":"string","maxLength":64,"title":"Key Prefix","default":""},"full_name":{"type":"string","title":"Full Name","default":""},"github_url":{"type":"string","title":"Github Url","default":""},"linkedin_url":{"type":"string","title":"Linkedin Url","default":""},"company":{"type":"string","title":"Company","default":""},"location":{"type":"string","title":"Location","default":""},"include_social":{"type":"boolean","title":"Include Social","default":true},"include_company_email":{"type":"boolean","title":"Include Company Email","default":false},"opened_from":{"type":"string","title":"Opened From","default":"dashboard"}},"type":"object","required":["account_id"],"title":"InternalFindBody"},"InternalJobCreateBody":{"properties":{"people":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"People"},"opened_from":{"type":"string","maxLength":32,"title":"Opened From","default":"dashboard"}},"type":"object","title":"InternalJobCreateBody"},"JobCreateBody":{"properties":{"people":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"People"},"opened_from":{"type":"string","maxLength":32,"title":"Opened From","default":"extension"}},"type":"object","title":"JobCreateBody"},"LockRequest":{"properties":{"subject_type":{"type":"string","title":"Subject Type"},"subject":{"type":"string","title":"Subject"},"reason":{"type":"string","title":"Reason","default":"manual"},"detail":{"type":"string","title":"Detail","default":""},"expires_in_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Seconds"}},"type":"object","required":["subject_type","subject"],"title":"LockRequest"},"LockedRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"provider":{"type":"string","maxLength":40,"title":"Provider"},"provider_user_id":{"type":"string","maxLength":200,"title":"Provider User Id"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""},"account_id":{"type":"string","maxLength":200,"title":"Account Id","default":""}},"type":"object","required":["email","provider","provider_user_id"],"title":"LockedRequest"},"MintBody":{"properties":{"account_id":{"type":"string","maxLength":200,"minLength":1,"title":"Account Id"},"email":{"type":"string","maxLength":320,"title":"Email","default":""}},"type":"object","required":["account_id"],"title":"MintBody"},"OnboardingStartRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"email":{"type":"string","maxLength":320,"title":"Email"},"first_name":{"type":"string","maxLength":200,"title":"First Name"},"last_name":{"type":"string","maxLength":200,"title":"Last Name"},"address_line1":{"type":"string","maxLength":300,"title":"Address Line1"},"address_line2":{"type":"string","maxLength":300,"title":"Address Line2","default":""},"city":{"type":"string","maxLength":120,"title":"City"},"state":{"type":"string","maxLength":120,"title":"State"},"pincode":{"type":"string","maxLength":12,"title":"Pincode"},"gstin":{"type":"string","maxLength":15,"title":"Gstin","default":""},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""}},"type":"object","required":["account_id","email","first_name","last_name","address_line1","city","state","pincode"],"title":"OnboardingStartRequest"},"OnboardingVerifyRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"code":{"type":"string","maxLength":10,"title":"Code"}},"type":"object","required":["account_id","code"],"title":"OnboardingVerifyRequest"},"PlanFeaturePatch":{"properties":{"plan_id":{"type":"string","title":"Plan Id"},"mcp":{"type":"boolean","title":"Mcp"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["plan_id","mcp","reason"],"title":"PlanFeaturePatch"},"PlatformPatch":{"properties":{"scope":{"type":"string","title":"Scope"},"desired_state":{"type":"string","title":"Desired State"},"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"},"version":{"type":"integer","title":"Version"},"traffic_percent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Traffic Percent"},"expires_at":{"type":"string","title":"Expires At","default":""},"confirm":{"type":"string","title":"Confirm","default":""}},"type":"object","required":["scope","desired_state","reason","version"],"title":"PlatformPatch"},"PreviewPromoRequest":{"properties":{"code":{"type":"string","maxLength":40,"title":"Code"},"account_id":{"type":"string","maxLength":200,"title":"Account Id"}},"type":"object","required":["code","account_id"],"title":"PreviewPromoRequest"},"PromoBody":{"properties":{"code":{"type":"string","title":"Code"},"credits":{"type":"integer","title":"Credits"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"starts_at":{"type":"string","title":"Starts At","default":""},"expires_at":{"type":"string","title":"Expires At","default":""},"message":{"type":"string","title":"Message","default":""},"disabled":{"type":"boolean","title":"Disabled","default":false},"campaign_id":{"type":"string","title":"Campaign Id","default":""},"kind":{"type":"string","title":"Kind","default":"credits"},"percent_off":{"type":"integer","title":"Percent Off","default":0},"fixed_paise":{"type":"integer","title":"Fixed Paise","default":0},"plan_ids":{"type":"string","title":"Plan Ids","default":""}},"type":"object","required":["code","credits"],"title":"PromoBody"},"RedeemRequest":{"properties":{"code":{"type":"string","maxLength":40,"title":"Code"},"account_id":{"type":"string","maxLength":200,"title":"Account Id"}},"type":"object","required":["code","account_id"],"title":"RedeemRequest"},"RegenerateKeyBody":{"properties":{"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days","default":90}},"type":"object","title":"RegenerateKeyBody"},"RegisterRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"provider":{"type":"string","maxLength":40,"title":"Provider"},"provider_user_id":{"type":"string","maxLength":200,"title":"Provider User Id"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""},"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"provisioned_by":{"type":"string","maxLength":200,"title":"Provisioned By","default":""}},"type":"object","required":["email","provider","provider_user_id","account_id"],"title":"RegisterRequest"},"RollbackBody":{"properties":{"reason":{"type":"string","maxLength":500,"title":"Reason","default":"rollback to Online"}},"type":"object","title":"RollbackBody"},"SessionTrackRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"session_id":{"type":"string","maxLength":200,"title":"Session Id"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""}},"type":"object","required":["account_id","session_id"],"title":"SessionTrackRequest"},"UnlockRequest":{"properties":{"subject_type":{"type":"string","title":"Subject Type"},"subject":{"type":"string","title":"Subject"}},"type":"object","required":["subject_type","subject"],"title":"UnlockRequest"},"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"},"VetRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"provider":{"type":"string","maxLength":40,"title":"Provider"},"provider_user_id":{"type":"string","maxLength":200,"title":"Provider User Id"},"ip":{"type":"string","maxLength":64,"title":"Ip","default":""}},"type":"object","required":["email","provider","provider_user_id"],"title":"VetRequest"},"WhatsAppAccount":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"}},"type":"object","required":["account_id"],"title":"WhatsAppAccount"},"WhatsAppConfirmRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"phone":{"type":"string","maxLength":32,"title":"Phone"},"code":{"type":"string","maxLength":8,"title":"Code"}},"type":"object","required":["account_id","phone","code"],"title":"WhatsAppConfirmRequest"},"WhatsAppStartRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"phone":{"type":"string","maxLength":32,"title":"Phone"}},"type":"object","required":["account_id","phone"],"title":"WhatsAppStartRequest"},"WhatsAppUnbindRequest":{"properties":{"account_id":{"type":"string","maxLength":200,"title":"Account Id"},"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["account_id","reason"],"title":"WhatsAppUnbindRequest"}},"securitySchemes":{"InvenitorApiKey":{"type":"http","scheme":"bearer","bearerFormat":"pf_live","description":"Dashboard-issued API key. One secret grants find, usage, key info, and MCP tools. REST does not use OAuth scope tokens."}}},"security":[{"InvenitorApiKey":[]}]}