{"openapi":"3.1.0","info":{"title":"CompanyLens API","description":"Business data enrichment API. Given a domain, returns company profile, tech stack, social profiles, WHOIS, and DNS data.","version":"4.0.0"},"paths":{"/v1/pixel":{"get":{"tags":["tracking"],"summary":"Site-visit tracking pixel","description":"Returns a 1x1 transparent GIF and records the visit (page, IP, user-agent, referrer, country) in `site_visits`. Fired on every page load via `<img>` or `<link rel=preload>`; no authentication required.","operationId":"tracking_pixel_v1_pixel_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"string","description":"Page path that fired the pixel, e.g. `/pricing`.","default":"unknown","title":"Page"},"description":"Page path that fired the pixel, e.g. `/pricing`."}],"responses":{"200":{"description":"1x1 transparent GIF (43 bytes). Cache-Control: no-store.","content":{"image/gif":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/signup":{"post":{"tags":["Auth"],"summary":"Signup","description":"Issue a magic link. Same shape and response as login (idempotent).","operationId":"signup_api_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/login":{"post":{"tags":["Auth"],"summary":"Login","description":"Issue a magic link to an existing or new email.","operationId":"login_api_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/verify":{"post":{"tags":["Auth"],"summary":"Verify","description":"Consume a magic-link token; set ``cl_user_session`` on success.\n\nReturns 200 + session cookie on a valid token.\nReturns 400 when the token is unknown, expired, or already consumed.\nReturns 422 for structurally invalid tokens (min_length=8 validator).","operationId":"verify_api_auth_verify_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/logout":{"post":{"tags":["Auth"],"summary":"Logout","description":"Revoke the current session row and clear the cookie. Idempotent.","operationId":"logout_api_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/auth/me":{"get":{"tags":["Auth"],"summary":"Me","description":"Return the active user; refresh the rolling 30-day expiry on success.","operationId":"me_api_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}}}}},"/api/auth/active-workspace":{"post":{"tags":["Auth"],"summary":"Set Active Workspace","description":"Switch the active workspace cookie. Validates existence + membership and\ncollapses both miss cases to 404 — same id-enumeration-resistant pattern\nas the rest of ``/api/workspaces`` (don't let a non-member tell unknown\nids apart from forbidden ones). On success returns a refreshed\n``MeResponse`` so the client can ``setActiveWorkspace`` without a\nfollow-up GET.","operationId":"set_active_workspace_api_auth_active_workspace_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveWorkspaceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/keys":{"get":{"tags":["Account"],"summary":"List Keys","description":"List the caller's keys, scoped to the active workspace (COM-44).\n\nResolution: read ``cl_active_workspace`` cookie; if absent or pointing at\na workspace the user no longer belongs to, fall back to their owner-default\nworkspace. This preserves backwards compat for dashboard sessions that\npre-date the cookie, since every user has had a Personal workspace since\nCOM-43.","operationId":"list_keys_api_account_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Account"],"summary":"Create Key","operationId":"create_key_api_account_keys_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateKeyRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/keys/{key_id}/rotate":{"post":{"tags":["Account"],"summary":"Rotate Key","operationId":"rotate_key_api_account_keys__key_id__rotate_post","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/keys/{key_id}":{"delete":{"tags":["Account"],"summary":"Revoke Key","operationId":"revoke_key_api_account_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/keys/{key_id}/audit":{"get":{"tags":["Account"],"summary":"List Key Audit","description":"Newest-first audit trail for the caller's key. Mirrors the ownership\nsemantics of the rest of /api/account/keys/* — cross-user reads return\n404, never 403.","operationId":"list_key_audit_api_account_keys__key_id__audit_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/keys/{key_id}/usage":{"get":{"tags":["Account"],"summary":"Get Key Usage","description":"Lightweight usage counters for the caller's key (COM-37).\n\nShape matches the ``AccountKeyUsage`` schema in\n``companylens-openapi.yaml`` — combines the key's tier/rate-limit and\nlifetime counter with rolling aggregations over ``request_logs``::\n\n    {\n      \"id\": \"<api_keys.id>\",\n      \"tier\": \"free|paid|admin\",\n      \"rate_limit\": \"<slug>\",                    # e.g. \"100/minute\"\n      \"rate_limit_per_minute\": <int|null>,       # parsed integer when slug is per-minute\n      \"request_count\": <int>,                    # lifetime authenticated-request counter\n      \"last_used_at\": \"<ISO-8601>|null\",\n      \"calls_last_hour\": <int>,                  # rolling 60-min window\n      \"calls_today\": <int>,                      # since UTC midnight\n      \"status_buckets\": {                        # status buckets, today\n        \"2xx\": <int>, \"4xx\": <int>, \"429\": <int>, \"5xx\": <int>\n      }\n    }\n\nOwnership: the same 404-on-mismatch semantics as the rest of\n``/api/account/keys/*`` — cross-user reads never reveal existence.\nCompanion to ``X-RateLimit-*`` headers emitted by the enrichment\nroutes; together they let the dashboard render rate-limit/usage\nvisibility without polling admin-only stats.","operationId":"get_key_usage_api_account_keys__key_id__usage_get","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/account/profile":{"get":{"tags":["Account"],"summary":"Get Profile","operationId":"get_profile_api_account_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"patch":{"tags":["Account"],"summary":"Update Profile","operationId":"update_profile_api_account_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces":{"get":{"tags":["Workspaces"],"summary":"List Workspaces","operationId":"list_workspaces_api_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Workspaces"],"summary":"Create Workspace","operationId":"create_workspace_api_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","operationId":"get_workspace_api_workspaces__workspace_id__get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workspaces"],"summary":"Patch Workspace","operationId":"patch_workspace_api_workspaces__workspace_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete Workspace","description":"Hard delete (per COM-46 contract addendum). Owner-only.\n\nIf the deleted workspace was the caller's active workspace, the cookie is\nrewritten to their next default workspace (or a freshly-created Personal\none if they just deleted their last workspace). The new id ships back in\nthe body so clients can update local state without a follow-up ``/me``.","operationId":"delete_workspace_api_workspaces__workspace_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/members":{"get":{"tags":["Workspaces"],"summary":"Get Members","operationId":"get_members_api_workspaces__workspace_id__members_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/members/{member_user_id}":{"patch":{"tags":["Workspaces"],"summary":"Patch Member Role","operationId":"patch_member_role_api_workspaces__workspace_id__members__member_user_id__patch","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete Member","description":"Remove a member from the workspace.\n\n- Self-leave is allowed for any role *unless* the caller is the last owner\n  (409). That edge case is the one the COM-44 acceptance tests pin down.\n- Removing another member requires owner.\n- Cross-workspace / unknown ids return 404 — same contract as the rest.","operationId":"delete_member_api_workspaces__workspace_id__members__member_user_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/usage":{"get":{"tags":["Workspaces"],"summary":"Get Workspace Usage","description":"Return the current-period usage summary for a workspace.\n\nAuth: workspace member (member/admin/owner).\nResponse cached 10 s per workspace to absorb dashboard polling.","operationId":"get_workspace_usage_api_workspaces__workspace_id__usage_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/invites":{"post":{"tags":["Workspace Invites"],"summary":"Create Invite","description":"Issue an invite. Owner/admin only. Re-invite supersedes the prior pending row.","operationId":"create_invite_api_workspaces__workspace_id__invites_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Workspace Invites"],"summary":"List Invites","description":"Any workspace member can list pending invites (transparency).","operationId":"list_invites_api_workspaces__workspace_id__invites_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/invites/{invite_id}":{"delete":{"tags":["Workspace Invites"],"summary":"Revoke Invite","description":"Hard-delete a pending invite. Owner/admin only.","operationId":"revoke_invite_api_workspaces__workspace_id__invites__invite_id__delete","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/invites/{token}/accept":{"post":{"tags":["Workspace Invites"],"summary":"Accept Invite","description":"Accept an invite by raw token. Locked response codes:\n\n- ``200 {workspace_id, role}``               — success\n- ``401``                                    — handled by ``require_user``\n- ``403 invite_email_mismatch``              — token valid but caller's\n                                               email differs\n- ``410 invite_expired``                     — past ``expires_at``\n- ``410 invite_revoked``                     — token unknown OR already\n                                               accepted (single-use)","operationId":"accept_invite_api_invites__token__accept_post","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/billing/checkout":{"post":{"tags":["Billing"],"summary":"Billing Checkout","description":"Create a Stripe Checkout session. Owner-only.","operationId":"billing_checkout_api_workspaces__workspace_id__billing_checkout_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/billing/portal":{"post":{"tags":["Billing"],"summary":"Billing Portal","description":"Create a Stripe Billing Portal session. Owner-only.","operationId":"billing_portal_api_workspaces__workspace_id__billing_portal_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/workspaces/{workspace_id}/billing/subscription":{"get":{"tags":["Billing"],"summary":"Billing Subscription","description":"Return current subscription info. Any workspace member may read.","operationId":"billing_subscription_api_workspaces__workspace_id__billing_subscription_get","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/billing/webhooks/stripe":{"post":{"tags":["Billing"],"summary":"Stripe Webhook","description":"Receive and process Stripe webhook events.\n\nSignature is verified against STRIPE_WEBHOOK_SECRET.\nEach event_id is committed to stripe_webhook_events before processing;\nduplicate deliveries are silently accepted (return 200) without re-processing.\n\nLocal replay:\n  stripe listen --forward-to localhost:8000/api/billing/webhooks/stripe\n  stripe trigger customer.subscription.updated","operationId":"stripe_webhook_api_billing_webhooks_stripe_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/health":{"get":{"tags":["System"],"summary":"Liveness probe","operationId":"health_api_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthCheckResponse"}}}}}}},"/v1/health":{"get":{"tags":["System"],"summary":"Health check","description":"Returns service health status including Redis and database connectivity.","operationId":"health_check_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/v1/enrich/company":{"get":{"tags":["Enrichment"],"summary":"Full company enrichment","description":"Full company data enrichment.\n\nReturns company name, description, industry, location, employee count range,\nsocial profiles, tech stack, contact email pattern, website meta,\nWHOIS data, and DNS records.\n\nData is cached for 7 days. Use `refresh=true` to bypass cache.\n\nSurfaces ``X-RateLimit-Limit`` / ``X-RateLimit-Remaining`` /\n``X-RateLimit-Reset`` on every response so callers can self-throttle.","operationId":"enrich_company_endpoint_v1_enrich_company_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Domain name to enrich, e.g. example.com","title":"Domain"},"description":"Domain name to enrich, e.g. example.com"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force refresh even if cached","default":false,"title":"Refresh"},"description":"Force refresh even if cached"},{"name":"min_confidence","in":"query","required":false,"schema":{"type":"number","maximum":1,"minimum":0,"description":"Minimum confidence threshold (0.0-1.0). Fields below this are returned as null.","default":0.3,"title":"Min Confidence"},"description":"Minimum confidence threshold (0.0-1.0). Fields below this are returned as null."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyEnrichResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"}}}},"/v1/enrich/tech":{"get":{"tags":["Enrichment"],"summary":"Tech stack detection","description":"Tech stack detection only.\n\nReturns detected frameworks, CMS, analytics, payment processors,\nCDN/hosting providers, email providers, and chat/support tools.\nAnalyzes HTTP headers, HTML content patterns, and DNS MX records.\n\nEmits ``X-RateLimit-*`` headers (see ``enrich_company_endpoint``).","operationId":"enrich_tech_endpoint_v1_enrich_tech_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Domain to analyze","title":"Domain"},"description":"Domain to analyze"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force refresh","default":false,"title":"Refresh"},"description":"Force refresh"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechEnrichResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"}}}},"/v1/enrich/social":{"get":{"tags":["Enrichment"],"summary":"Social profile discovery","description":"Social profile discovery.\n\nFinds LinkedIn, Twitter/X, Facebook, GitHub, YouTube, Instagram, and Crunchbase\nprofiles by scraping the website and probing common URL patterns.\n\nEmits ``X-RateLimit-*`` headers (see ``enrich_company_endpoint``).","operationId":"enrich_social_endpoint_v1_enrich_social_get","parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string","description":"Domain to find social profiles for","title":"Domain"},"description":"Domain to find social profiles for"},{"name":"refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force refresh","default":false,"title":"Refresh"},"description":"Force refresh"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialEnrichResponse"}}}},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Unprocessable Entity"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Too Many Requests"}}}},"/v1/enrich/bulk":{"post":{"tags":["Enrichment"],"summary":"Bulk company enrichment","description":"Bulk company enrichment — enrich up to 10 domains concurrently.\n\nAccepts a JSON body with a list of domains. Returns an array of results.\nEach result includes success/failure status and enriched data.\n\nExample request body:\n```json\n{\"domains\": [\"stripe.com\", \"vercel.com\", \"linear.app\"]}\n```\n\nEmits ``X-RateLimit-*`` headers (see ``enrich_company_endpoint``).","operationId":"enrich_bulk_endpoint_v1_enrich_bulk_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEnrichRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkEnrichResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ActiveWorkspaceRequest":{"properties":{"workspace_id":{"type":"string","maxLength":64,"minLength":1,"title":"Workspace Id"}},"type":"object","required":["workspace_id"],"title":"ActiveWorkspaceRequest"},"BulkEnrichRequest":{"properties":{"domains":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Domains","description":"List of domains to enrich (max 10)"},"refresh":{"type":"boolean","title":"Refresh","description":"Force refresh even if cached","default":false}},"type":"object","required":["domains"],"title":"BulkEnrichRequest"},"BulkEnrichResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/BulkEnrichResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"succeeded":{"type":"integer","title":"Succeeded"},"failed":{"type":"integer","title":"Failed"},"last_updated":{"type":"string","title":"Last Updated"}},"type":"object","required":["results","total","succeeded","failed"],"title":"BulkEnrichResponse"},"BulkEnrichResult":{"properties":{"domain":{"type":"string","title":"Domain"},"success":{"type":"boolean","title":"Success"},"data":{"anyOf":[{"$ref":"#/components/schemas/CompanyEnrichResponse"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["domain","success"],"title":"BulkEnrichResult"},"CheckoutRequest":{"properties":{"plan":{"type":"string","title":"Plan"}},"type":"object","required":["plan"],"title":"CheckoutRequest"},"CompanyEnrichResponse":{"properties":{"domain":{"type":"string","title":"Domain"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"industry":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Industry"},"employee_count_range":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Count Range"},"founded_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Founded Year"},"location":{"anyOf":[{"$ref":"#/components/schemas/Location"},{"type":"null"}]},"social_profiles":{"anyOf":[{"$ref":"#/components/schemas/SocialProfiles"},{"type":"null"}]},"tech_stack":{"items":{"type":"string"},"type":"array","title":"Tech Stack"},"tech_stack_detailed":{"anyOf":[{"$ref":"#/components/schemas/TechStackData"},{"type":"null"}]},"contact_email_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Email Pattern"},"email_pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Pattern"},"company_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Phone"},"company_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Email"},"ceo_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ceo Name"},"website_meta":{"anyOf":[{"$ref":"#/components/schemas/WebsiteMeta"},{"type":"null"}]},"whois":{"anyOf":[{"$ref":"#/components/schemas/WhoisData"},{"type":"null"}]},"dns":{"anyOf":[{"$ref":"#/components/schemas/DnsData"},{"type":"null"}]},"last_updated":{"type":"string","title":"Last Updated"},"data_sources":{"items":{"type":"string"},"type":"array","title":"Data Sources"},"errors":{"additionalProperties":{"type":"string"},"type":"object","title":"Errors"},"confidence":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Confidence"},"overall_confidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Confidence"},"data_quality":{"type":"string","title":"Data Quality","description":"'full' when website was accessible, 'limited' when website scrape failed (Cloudflare block, timeout, empty response)","default":"full"},"step_timings":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Step Timings","description":"Per-step actual timing in milliseconds"}},"type":"object","required":["domain"],"title":"CompanyEnrichResponse"},"CreateInviteRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"}},"type":"object","required":["email","role"],"title":"CreateInviteRequest"},"CreateKeyRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"environment":{"type":"string","enum":["production","test"],"title":"Environment","default":"production"}},"type":"object","title":"CreateKeyRequest"},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateWorkspaceRequest"},"DnsData":{"properties":{"mx_records":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mx Records"},"txt_records":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Txt Records"},"ns_records":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ns Records"},"a_records":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"A Records"},"cname_records":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cname Records"}},"type":"object","title":"DnsData"},"EmailRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"next_url":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Next Url"},"signup_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Source"}},"type":"object","required":["email"],"title":"EmailRequest"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"status_code":{"type":"integer","title":"Status Code"}},"type":"object","required":["error","status_code"],"title":"ErrorResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthCheckResponse":{"properties":{"status":{"type":"string","enum":["ok","degraded"],"title":"Status"},"version":{"type":"string","title":"Version"},"db":{"type":"string","enum":["ok","error"],"title":"Db"},"db_latency_ms":{"type":"integer","title":"Db Latency Ms"},"git_sha":{"type":"string","title":"Git Sha"},"redis":{"type":"string","enum":["ok","error","disabled"],"title":"Redis"}},"type":"object","required":["status","version","db","db_latency_ms","git_sha","redis"],"title":"HealthCheckResponse"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"redis_connected":{"type":"boolean","title":"Redis Connected"},"database_connected":{"type":"boolean","title":"Database Connected"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["status","version","redis_connected","database_connected"],"title":"HealthResponse"},"Location":{"properties":{"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw"}},"type":"object","title":"Location"},"MeResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"type":"string","title":"Email"},"active_workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Workspace Id"},"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceSummary"},"type":"array","title":"Workspaces"}},"type":"object","required":["user_id","email"],"title":"MeResponse"},"SocialEnrichResponse":{"properties":{"domain":{"type":"string","title":"Domain"},"social_profiles":{"$ref":"#/components/schemas/SocialProfiles"},"sources":{"items":{"type":"string"},"type":"array","title":"Sources"},"last_updated":{"type":"string","title":"Last Updated"},"errors":{"additionalProperties":{"type":"string"},"type":"object","title":"Errors"}},"type":"object","required":["domain","social_profiles"],"title":"SocialEnrichResponse"},"SocialProfiles":{"properties":{"linkedin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkedin"},"twitter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Twitter"},"facebook":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Facebook"},"github":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Github"},"youtube":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Youtube"},"instagram":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instagram"},"tiktok":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tiktok"},"crunchbase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crunchbase"}},"type":"object","title":"SocialProfiles"},"TechEnrichResponse":{"properties":{"domain":{"type":"string","title":"Domain"},"tech_stack":{"$ref":"#/components/schemas/TechStackData"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers"},"dns":{"anyOf":[{"$ref":"#/components/schemas/DnsData"},{"type":"null"}]},"last_updated":{"type":"string","title":"Last Updated"},"errors":{"additionalProperties":{"type":"string"},"type":"object","title":"Errors"}},"type":"object","required":["domain","tech_stack"],"title":"TechEnrichResponse"},"TechStackData":{"properties":{"frameworks":{"items":{"type":"string"},"type":"array","title":"Frameworks"},"cms":{"items":{"type":"string"},"type":"array","title":"Cms"},"analytics":{"items":{"type":"string"},"type":"array","title":"Analytics"},"payment":{"items":{"type":"string"},"type":"array","title":"Payment"},"cdn_hosting":{"items":{"type":"string"},"type":"array","title":"Cdn Hosting"},"email_provider":{"items":{"type":"string"},"type":"array","title":"Email Provider"},"chat_support":{"items":{"type":"string"},"type":"array","title":"Chat Support"},"other":{"items":{"type":"string"},"type":"array","title":"Other"}},"type":"object","title":"TechStackData"},"UpdateMemberRoleRequest":{"properties":{"role":{"type":"string","enum":["owner","admin","member"],"title":"Role"}},"type":"object","required":["role"],"title":"UpdateMemberRoleRequest"},"UpdateProfileRequest":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Display Name"}},"type":"object","title":"UpdateProfileRequest"},"UpdateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"UpdateWorkspaceRequest"},"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"},"VerifyRequest":{"properties":{"token":{"type":"string","maxLength":512,"minLength":8,"title":"Token"}},"type":"object","required":["token"],"title":"VerifyRequest"},"WebsiteMeta":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"og_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Og Title"},"og_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Og Description"},"og_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Og Image"},"og_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Og Type"},"canonical_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Canonical Url"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"keywords":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Keywords"},"structured_data":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Structured Data"}},"type":"object","title":"WebsiteMeta"},"WhoisData":{"properties":{"registrar":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrar"},"registrant_org":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Org"},"registrant_country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registrant Country"},"created_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Date"},"expires_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires Date"},"updated_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated Date"},"name_servers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Name Servers"},"status":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Status"}},"type":"object","title":"WhoisData"},"WorkspaceSummary":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"role":{"type":"string","title":"Role"},"is_personal":{"type":"boolean","title":"Is Personal"}},"type":"object","required":["id","name","slug","role","is_personal"],"title":"WorkspaceSummary"}}}}