{"openapi":"3.1.0","info":{"title":"SalesMap API","version":"1"},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"Supabase JWT"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]},"NewApiKey":{"allOf":[{"$ref":"#/components/schemas/ApiKey"},{"type":"object","properties":{"key":{"type":"string","description":"The key itself, shown this once; only its hash is stored"}},"required":["key"]}]},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"prefix":{"type":"string"},"createdAt":{"type":"string"},"lastUsedAt":{"type":["string","null"]},"revokedAt":{"type":["string","null"]},"termsVersion":{"type":["string","null"]},"termsAcceptedAt":{"type":["string","null"]}},"required":["id","name","prefix","createdAt","lastUsedAt","revokedAt","termsVersion","termsAcceptedAt"]},"TermsStatus":{"type":"object","properties":{"accepted":{"type":"boolean"},"termsVersion":{"type":"string"}},"required":["accepted","termsVersion"]},"TermsAcceptance":{"type":"object","properties":{"termsVersion":{"type":"string"},"acceptedAt":{"type":"string"}},"required":["termsVersion","acceptedAt"]},"LimitsStatus":{"type":"object","properties":{"windows":{"type":"object","properties":{"monthly":{"type":"object","properties":{"limitCredits":{"type":["integer","null"]},"spentCredits":{"type":"integer","description":"Settled charges; open holds are in reservedCredits"},"reservedCredits":{"type":"integer","description":"Held for searches still running: released or charged when each finishes"},"leftCredits":{"type":["integer","null"]}},"required":["limitCredits","spentCredits","reservedCredits","leftCredits"]}},"required":["monthly"]},"credits":{"type":"integer"},"canSpendCredits":{"type":"integer"},"lowCredits":{"type":"boolean","description":"The balance is under one company’s price (l7)"},"bought":{"type":"boolean","description":"s245: the workspace has bought credits before (a top-up)"},"frozen":{"type":"boolean"},"confirmCredits":{"type":["integer","null"],"description":"Paid calls quoted over this many credits ask first; 0 asks every time, null never"},"weeklyDiscover":{"type":"boolean","description":"s70/s246: the free list rerun every Monday, emailing the signed-in user only new companies (opt-in, off by default)"}},"required":["windows","credits","canSpendCredits","lowCredits","bought","frozen","confirmCredits","weeklyDiscover"]},"SellerProfile":{"type":"object","properties":{"seller":{"type":["string","null"]},"context":{"type":["object","null"],"properties":{"user":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"role":{"type":"string","maxLength":120},"linkedinUrl":{"type":"string","pattern":"^https?:\\/\\/([a-z]{2,3}\\.)?linkedin\\.com\\/in\\/[^/?#\\s]+\\/?$/i","description":"The user's own LinkedIn profile URL; kept in the workspace, never sent to a model"}},"description":"Who the user is: their name, role at the seller and LinkedIn profile URL"},"company":{"type":"string","maxLength":200,"description":"The seller company's name"},"product":{"type":"string","maxLength":1000,"description":"What the seller sells, in a sentence or two"},"icp":{"type":"string","maxLength":1000,"description":"Who the ideal customer is: company type, industry, size, stage, region"},"employees":{"type":"object","properties":{"min":{"type":"integer","minimum":1},"max":{"type":"integer","minimum":1}},"description":"Headcount band the seller can close, when the user has said"},"hard":{"type":"array","items":{"type":"string","enum":["size","fit","intent","disqualifier"]},"maxItems":4,"description":"Strict cut-offs the user chose: \"size\" drops companies without a sourced size inside the band, \"fit\" drops those without a source-supported use case, \"intent\" drops those with no buying signal or way in, \"disqualifier\" drops those a source shows meet one of `disqualifiers`. Unnamed ones only rank and flag. Ask once at onboarding; a call's own `hard` overrides it"},"buyerRoles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Roles that buy or own the problem, e.g. \"Head of RevOps\", \"CISO\""},"segments":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Kinds of company the seller sells to, e.g. \"Marketing agencies\", \"B2B SaaS\""},"customers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Current customers, as domains (acme.com) or names: never targeted"},"competitors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Competitors, as domains or names: never targeted"},"won":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals won (domains or names): the pattern to find more of"},"lost":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals lost or churned (domains or names), with why if known"},"openDeals":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies in an open deal (domains): left out"},"regions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Regions or countries the seller sells into"},"city":{"type":"string","maxLength":120,"description":"The user's own city, for events near them (in person within 50 km); never narrows who discover looks for"},"exclusions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies or kinds of company to leave out"},"disqualifiers":{"type":"array","items":{"type":"string","minLength":3,"maxLength":160},"maxItems":8,"description":"Conditions that rule a company out even inside the ICP, each a few words, e.g. \"already uses a competitor's product\", \"has an in-house data team\", \"public sector\". Discover checks each against the sources it reads: one a quoted source shows is flagged in checkFirst and ranked lower (dropped under hard \"disqualifier\") and never billed; one no source shows is \"not checked\", never assumed"},"doNotContact":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies the user said never to contact (domains)"},"investors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Optional: the seller's own investors (firms or angels), e.g. \"Sequoia Capital\", beside the ones discover finds and confirms from public pages itself; matched in code against each account's pages, funding news and the investors' portfolio pages, never sent to a model"},"ycBatch":{"type":"string","maxLength":40,"description":"The seller's Y Combinator batch, e.g. \"W23\"; read from the seller's YC page when left out"},"warmPaths":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string","minLength":3,"maxLength":200},"path":{"type":"string","minLength":1,"maxLength":300},"confirmedAt":{"type":"string","format":"date"}},"required":["company","path"]},"maxItems":500,"description":"Warm paths the user confirmed: company domain and who or how, e.g. \"Jane Doe (VP Ops), via Sam Lee\". A save replaces the whole list. Stays local; never sent to a model"},"needPatterns":{"type":"array","items":{"type":"object","properties":{"need":{"type":"string","minLength":3,"maxLength":160},"where":{"type":"array","items":{"type":"string","enum":["jobs","tools","news","site","ai_adoption"]},"minItems":1,"maxItems":5},"proof":{"type":"string","minLength":3,"maxLength":300},"family":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"titles":{"type":"array","items":{"type":"string","minLength":3,"maxLength":60},"maxItems":8},"segments":{"type":"array","items":{"type":"string","minLength":2,"maxLength":200},"maxItems":8}},"required":["need","where","proof"]},"minItems":1,"maxItems":24,"description":"What a buying need for the seller's offer looks like: each a need, where it shows (jobs, tools, news, site, ai_adoption) and the proof that counts. The drafted ones the user kept plus any they described in their own words. Discover drafts them when left out and returns them to review; only signals matching one rank"},"signalTypes":{"type":"array","items":{"type":"string","enum":["job_posting_buyer_role","job_posting_mentions_tool","hiring_surge_function","headcount_growth","role_reopened","layoffs","hiring_freeze","function_attrition","employee_sentiment_drop","funding_round","funding_use_of_funds_match","debt_financing","ipo_filing","acquires_company","company_acquired","spin_off_carve_out","geo_expansion","partnership_announced","partnership_ended","prospect_loses_client","revenue_decline","distress_bankruptcy","earnings_call_mention","annual_report_insight","company_register_change","product_launch","ad_campaign_launch","website_relaunch","site_section_added","pricing_change","legal_page_change","new_public_repo_by_topic","own_incident_spike","public_symptom_visible","own_customer_reviews_negative","event_sponsorship","compliance_pursuit","regulation_deadline","regulatory_exposure","platform_policy_change","data_breach","peer_company_incident","litigation","positive_media","negative_media","award_recognition","tech_adoption_adjacent","competitor_installed","competitor_newly_adopted","overlapping_tools_in_category","recent_software_purchases","outbound_domains_registered","mcp_server_published","hf_org_paid_plan","bug_bounty_ai_scope","new_exec_buyer_role","exec_departure","first_hire_in_function","competitor_outage_deprecation","competitor_acquired_closed","competitor_logo_removed","competitor_positioning_change","competitor_banned_or_sanctioned","social_post_about_problem","podcast_or_talk_appearance","exec_public_appearance","named_project_underway","customer_peer_reference"]},"maxItems":15,"description":"Catalog signal types the user added from the \"add more\" list, by id (seller_profile's `signals.addMore`); discover looks for each as a need pattern on top of `needPatterns`, or of its drafted ones when there are none"},"signalFamilies":{"type":"array","items":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"minItems":1,"maxItems":8,"description":"The signal families the user switched on (the families of `signals.addMore`, by id). Discover drafts 2 or 3 need patterns for each, worded for the seller's offer, and drops patterns in a family switched off; left out, it drafts 5 to 8 across all"},"notes":{"type":"string","maxLength":2000,"description":"Anything else the user said that should shape the list"}}},"updatedAt":{"type":["string","null"]},"signalOptions":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"label":{"type":"string"},"types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]}}},"required":["family","label","types"]}}},"required":["seller","context","updatedAt","signalOptions"]},"SellerProfiles":{"type":"object","properties":{"active":{"type":["string","null"]},"sellers":{"type":"array","items":{"type":"object","properties":{"seller":{"type":"string"},"company":{"type":["string","null"]},"setUp":{"type":"boolean"},"updatedAt":{"type":"string"},"active":{"type":"boolean"}},"required":["seller","company","setUp","updatedAt","active"]}},"addsLeft":{"type":"integer"}},"required":["active","sellers","addsLeft"]},"ProfileDraft":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"context":{"type":["object","null"],"properties":{"user":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"role":{"type":"string","maxLength":120},"linkedinUrl":{"type":"string","pattern":"^https?:\\/\\/([a-z]{2,3}\\.)?linkedin\\.com\\/in\\/[^/?#\\s]+\\/?$/i","description":"The user's own LinkedIn profile URL; kept in the workspace, never sent to a model"}},"description":"Who the user is: their name, role at the seller and LinkedIn profile URL"},"company":{"type":"string","maxLength":200,"description":"The seller company's name"},"product":{"type":"string","maxLength":1000,"description":"What the seller sells, in a sentence or two"},"icp":{"type":"string","maxLength":1000,"description":"Who the ideal customer is: company type, industry, size, stage, region"},"employees":{"type":"object","properties":{"min":{"type":"integer","minimum":1},"max":{"type":"integer","minimum":1}},"description":"Headcount band the seller can close, when the user has said"},"hard":{"type":"array","items":{"type":"string","enum":["size","fit","intent","disqualifier"]},"maxItems":4,"description":"Strict cut-offs the user chose: \"size\" drops companies without a sourced size inside the band, \"fit\" drops those without a source-supported use case, \"intent\" drops those with no buying signal or way in, \"disqualifier\" drops those a source shows meet one of `disqualifiers`. Unnamed ones only rank and flag. Ask once at onboarding; a call's own `hard` overrides it"},"buyerRoles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Roles that buy or own the problem, e.g. \"Head of RevOps\", \"CISO\""},"segments":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Kinds of company the seller sells to, e.g. \"Marketing agencies\", \"B2B SaaS\""},"customers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Current customers, as domains (acme.com) or names: never targeted"},"competitors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Competitors, as domains or names: never targeted"},"won":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals won (domains or names): the pattern to find more of"},"lost":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals lost or churned (domains or names), with why if known"},"openDeals":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies in an open deal (domains): left out"},"regions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Regions or countries the seller sells into"},"city":{"type":"string","maxLength":120,"description":"The user's own city, for events near them (in person within 50 km); never narrows who discover looks for"},"exclusions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies or kinds of company to leave out"},"disqualifiers":{"type":"array","items":{"type":"string","minLength":3,"maxLength":160},"maxItems":8,"description":"Conditions that rule a company out even inside the ICP, each a few words, e.g. \"already uses a competitor's product\", \"has an in-house data team\", \"public sector\". Discover checks each against the sources it reads: one a quoted source shows is flagged in checkFirst and ranked lower (dropped under hard \"disqualifier\") and never billed; one no source shows is \"not checked\", never assumed"},"doNotContact":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies the user said never to contact (domains)"},"investors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Optional: the seller's own investors (firms or angels), e.g. \"Sequoia Capital\", beside the ones discover finds and confirms from public pages itself; matched in code against each account's pages, funding news and the investors' portfolio pages, never sent to a model"},"ycBatch":{"type":"string","maxLength":40,"description":"The seller's Y Combinator batch, e.g. \"W23\"; read from the seller's YC page when left out"},"warmPaths":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string","minLength":3,"maxLength":200},"path":{"type":"string","minLength":1,"maxLength":300},"confirmedAt":{"type":"string","format":"date"}},"required":["company","path"]},"maxItems":500,"description":"Warm paths the user confirmed: company domain and who or how, e.g. \"Jane Doe (VP Ops), via Sam Lee\". A save replaces the whole list. Stays local; never sent to a model"},"needPatterns":{"type":"array","items":{"type":"object","properties":{"need":{"type":"string","minLength":3,"maxLength":160},"where":{"type":"array","items":{"type":"string","enum":["jobs","tools","news","site","ai_adoption"]},"minItems":1,"maxItems":5},"proof":{"type":"string","minLength":3,"maxLength":300},"family":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"titles":{"type":"array","items":{"type":"string","minLength":3,"maxLength":60},"maxItems":8},"segments":{"type":"array","items":{"type":"string","minLength":2,"maxLength":200},"maxItems":8}},"required":["need","where","proof"]},"minItems":1,"maxItems":24,"description":"What a buying need for the seller's offer looks like: each a need, where it shows (jobs, tools, news, site, ai_adoption) and the proof that counts. The drafted ones the user kept plus any they described in their own words. Discover drafts them when left out and returns them to review; only signals matching one rank"},"signalTypes":{"type":"array","items":{"type":"string","enum":["job_posting_buyer_role","job_posting_mentions_tool","hiring_surge_function","headcount_growth","role_reopened","layoffs","hiring_freeze","function_attrition","employee_sentiment_drop","funding_round","funding_use_of_funds_match","debt_financing","ipo_filing","acquires_company","company_acquired","spin_off_carve_out","geo_expansion","partnership_announced","partnership_ended","prospect_loses_client","revenue_decline","distress_bankruptcy","earnings_call_mention","annual_report_insight","company_register_change","product_launch","ad_campaign_launch","website_relaunch","site_section_added","pricing_change","legal_page_change","new_public_repo_by_topic","own_incident_spike","public_symptom_visible","own_customer_reviews_negative","event_sponsorship","compliance_pursuit","regulation_deadline","regulatory_exposure","platform_policy_change","data_breach","peer_company_incident","litigation","positive_media","negative_media","award_recognition","tech_adoption_adjacent","competitor_installed","competitor_newly_adopted","overlapping_tools_in_category","recent_software_purchases","outbound_domains_registered","mcp_server_published","hf_org_paid_plan","bug_bounty_ai_scope","new_exec_buyer_role","exec_departure","first_hire_in_function","competitor_outage_deprecation","competitor_acquired_closed","competitor_logo_removed","competitor_positioning_change","competitor_banned_or_sanctioned","social_post_about_problem","podcast_or_talk_appearance","exec_public_appearance","named_project_underway","customer_peer_reference"]},"maxItems":15,"description":"Catalog signal types the user added from the \"add more\" list, by id (seller_profile's `signals.addMore`); discover looks for each as a need pattern on top of `needPatterns`, or of its drafted ones when there are none"},"signalFamilies":{"type":"array","items":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"minItems":1,"maxItems":8,"description":"The signal families the user switched on (the families of `signals.addMore`, by id). Discover drafts 2 or 3 need patterns for each, worded for the seller's offer, and drops patterns in a family switched off; left out, it drafts 5 to 8 across all"},"notes":{"type":"string","maxLength":2000,"description":"Anything else the user said that should shape the list"}}},"error":{"type":["string","null"]}},"required":["id","status","context","error"]},"NetworkSummary":{"type":"object","properties":{"count":{"type":"number"},"companies":{"type":"number"},"exportedAt":{"type":["string","null"]}},"required":["count","companies","exportedAt"]},"ResearchRun":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"domains":{"type":"array","items":{"type":"string"}},"top":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[10]},{"type":"null"}]},"limit":{"type":"integer"},"reservedCredits":{"type":"integer"},"progress":{"type":["string","null"]},"chargedCredits":{"type":["integer","null"]},"error":{"type":["string","null"]},"results":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"researched":{"type":["boolean","null"]},"delivered":{"type":["boolean","null"]},"stopped":{"type":["string","null"],"enum":["recent","excluded","size","fit",null]},"reason":{"type":["string","null"]}},"required":["domain","researched","delivered","stopped","reason"]}}},"required":["id","status","domains","top","limit","reservedCredits","progress","chargedCredits","error","results"]},"DiscoverRun":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running","done","failed"]},"progress":{"type":["string","null"]},"existing":{"type":"boolean"},"listed":{"type":["integer","null"]},"error":{"type":["string","null"]}},"required":["id","status","progress","existing","listed","error"]},"CrmPush":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string","enum":["hubspot","salesforce"]},"status":{"type":"string","enum":["queued","running","done","failed"]},"results":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"outcome":{"type":"string","enum":["created","updated","matched","skipped","failed"]},"externalId":{"type":"string"},"reason":{"type":"string"}},"required":["domain","outcome"]}},"error":{"type":["string","null"]}},"required":["id","provider","status","results","error"]},"AgentTrial":{"type":"object","properties":{"api_key":{"type":"string","description":"The trial `smk_` key, shown this once; only its hash is stored"},"claim_url":{"type":"string","description":"Give this to your human: they open it and sign in"},"claim_code":{"type":"string","description":"Or they enter this at app.salesmap.site/claim"},"expires_at":{"type":"string","description":"The key stops working then unless a human claims it"},"limits":{"type":"object","properties":{"data":{"type":"string","enum":["company-level only"]},"accounts_per_run":{"type":"number"},"signups_per_ip_per_day":{"type":"number"}},"required":["data","accounts_per_run","signups_per_ip_per_day"]},"mcp_url":{"type":"string"},"terms_url":{"type":"string"}},"required":["api_key","claim_url","claim_code","expires_at","limits","mcp_url","terms_url"]},"Billing":{"type":"object","properties":{"credits":{"type":"integer"},"frozen":{"type":"boolean"},"buy":{"type":"object","properties":{"creditUsd":{"type":"number"},"companyCredits":{"type":"integer"},"min":{"type":"integer"},"max":{"type":"integer"},"presets":{"type":"array","items":{"type":"object","properties":{"credits":{"type":"number"},"usd":{"type":"number"}},"required":["credits","usd"]}}},"required":["creditUsd","companyCredits","min","max","presets"]}},"required":["credits","frozen","buy"]}},"parameters":{}},"paths":{"/health":{"get":{"responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}}}}},"/v1/me":{"get":{"tags":["me"],"summary":"Current user and workspace (created on first sign-in)","security":[{"bearer":[]}],"responses":{"200":{"description":"Current user and workspace","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1},"email":{"type":"string","format":"email"}},"required":["id","email"]},"workspace":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"role":{"type":"string","enum":["owner","admin","member"]}},"required":["user","workspace","role"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys":{"post":{"tags":["keys"],"summary":"Create an API key for the hosted MCP (returned once)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80,"default":"MCP"},"acceptTerms":{"type":"string","enum":["2026-10-21"],"description":"Accepts the customer terms at https://salesmap.site/terms (this version); a key needs it"}},"required":["acceptTerms"]}}}},"responses":{"201":{"description":"Key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApiKey"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["keys"],"summary":"The workspace's API keys (never the keys themselves)","security":[{"bearer":[]}],"responses":{"200":{"description":"Keys, newest first","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/keys/{id}":{"delete":{"tags":["keys"],"summary":"Revoke an API key: it stops working at once","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/terms":{"get":{"tags":["terms"],"summary":"Whether the workspace has accepted the current customer terms","security":[{"bearer":[]}],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["terms"],"summary":"Accept the customer terms (this version) for the workspace","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"acceptTerms":{"type":"string","enum":["2026-10-21"],"description":"Accepts the customer terms at https://salesmap.site/terms (this version)"}},"required":["acceptTerms"]}}}},"responses":{"201":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TermsAcceptance"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/limits":{"get":{"tags":["limits"],"summary":"Monthly credit limit, credits used in it, the balance, and what one call can spend now","security":[{"bearer":[]}],"responses":{"200":{"description":"Limits and spend","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["limits"],"summary":"Set the monthly credit limit (over a rolling 30 days; null = none) and the weekly discover email (s70)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyCredits":{"type":["integer","null"],"exclusiveMinimum":0,"description":"Credits over a rolling 30 days; null removes it; omit to keep it"},"weeklyDiscover":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Limits saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LimitsStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile":{"get":{"tags":["profile"],"summary":"The workspace's active seller profile, or nulls before onboarding","security":[{"bearer":[]}],"responses":{"200":{"description":"Seller profile","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerProfile"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["profile"],"summary":"Save the seller profile and make it the active one: given fields replace the saved ones, `clear` empties the ones named, others are kept (free; a new seller site counts toward the 3 a day)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253},"context":{"type":"object","properties":{"user":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"role":{"type":"string","maxLength":120},"linkedinUrl":{"type":"string","pattern":"^https?:\\/\\/([a-z]{2,3}\\.)?linkedin\\.com\\/in\\/[^/?#\\s]+\\/?$/i","description":"The user's own LinkedIn profile URL; kept in the workspace, never sent to a model"}},"description":"Who the user is: their name, role at the seller and LinkedIn profile URL"},"company":{"type":"string","maxLength":200,"description":"The seller company's name"},"product":{"type":"string","maxLength":1000,"description":"What the seller sells, in a sentence or two"},"icp":{"type":"string","maxLength":1000,"description":"Who the ideal customer is: company type, industry, size, stage, region"},"employees":{"type":"object","properties":{"min":{"type":"integer","minimum":1},"max":{"type":"integer","minimum":1}},"description":"Headcount band the seller can close, when the user has said"},"hard":{"type":"array","items":{"type":"string","enum":["size","fit","intent","disqualifier"]},"maxItems":4,"description":"Strict cut-offs the user chose: \"size\" drops companies without a sourced size inside the band, \"fit\" drops those without a source-supported use case, \"intent\" drops those with no buying signal or way in, \"disqualifier\" drops those a source shows meet one of `disqualifiers`. Unnamed ones only rank and flag. Ask once at onboarding; a call's own `hard` overrides it"},"buyerRoles":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Roles that buy or own the problem, e.g. \"Head of RevOps\", \"CISO\""},"segments":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Kinds of company the seller sells to, e.g. \"Marketing agencies\", \"B2B SaaS\""},"customers":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Current customers, as domains (acme.com) or names: never targeted"},"competitors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Competitors, as domains or names: never targeted"},"won":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals won (domains or names): the pattern to find more of"},"lost":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Deals lost or churned (domains or names), with why if known"},"openDeals":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies in an open deal (domains): left out"},"regions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Regions or countries the seller sells into"},"city":{"type":"string","maxLength":120,"description":"The user's own city, for events near them (in person within 50 km); never narrows who discover looks for"},"exclusions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies or kinds of company to leave out"},"disqualifiers":{"type":"array","items":{"type":"string","minLength":3,"maxLength":160},"maxItems":8,"description":"Conditions that rule a company out even inside the ICP, each a few words, e.g. \"already uses a competitor's product\", \"has an in-house data team\", \"public sector\". Discover checks each against the sources it reads: one a quoted source shows is flagged in checkFirst and ranked lower (dropped under hard \"disqualifier\") and never billed; one no source shows is \"not checked\", never assumed"},"doNotContact":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Companies the user said never to contact (domains)"},"investors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":500,"description":"Optional: the seller's own investors (firms or angels), e.g. \"Sequoia Capital\", beside the ones discover finds and confirms from public pages itself; matched in code against each account's pages, funding news and the investors' portfolio pages, never sent to a model"},"ycBatch":{"type":"string","maxLength":40,"description":"The seller's Y Combinator batch, e.g. \"W23\"; read from the seller's YC page when left out"},"warmPaths":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string","minLength":3,"maxLength":200},"path":{"type":"string","minLength":1,"maxLength":300},"confirmedAt":{"type":"string","format":"date"}},"required":["company","path"]},"maxItems":500,"description":"Warm paths the user confirmed: company domain and who or how, e.g. \"Jane Doe (VP Ops), via Sam Lee\". A save replaces the whole list. Stays local; never sent to a model"},"needPatterns":{"type":"array","items":{"type":"object","properties":{"need":{"type":"string","minLength":3,"maxLength":160},"where":{"type":"array","items":{"type":"string","enum":["jobs","tools","news","site","ai_adoption"]},"minItems":1,"maxItems":5},"proof":{"type":"string","minLength":3,"maxLength":300},"family":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"titles":{"type":"array","items":{"type":"string","minLength":3,"maxLength":60},"maxItems":8},"segments":{"type":"array","items":{"type":"string","minLength":2,"maxLength":200},"maxItems":8}},"required":["need","where","proof"]},"minItems":1,"maxItems":24,"description":"What a buying need for the seller's offer looks like: each a need, where it shows (jobs, tools, news, site, ai_adoption) and the proof that counts. The drafted ones the user kept plus any they described in their own words. Discover drafts them when left out and returns them to review; only signals matching one rank"},"signalTypes":{"type":"array","items":{"type":"string","enum":["job_posting_buyer_role","job_posting_mentions_tool","hiring_surge_function","headcount_growth","role_reopened","layoffs","hiring_freeze","function_attrition","employee_sentiment_drop","funding_round","funding_use_of_funds_match","debt_financing","ipo_filing","acquires_company","company_acquired","spin_off_carve_out","geo_expansion","partnership_announced","partnership_ended","prospect_loses_client","revenue_decline","distress_bankruptcy","earnings_call_mention","annual_report_insight","company_register_change","product_launch","ad_campaign_launch","website_relaunch","site_section_added","pricing_change","legal_page_change","new_public_repo_by_topic","own_incident_spike","public_symptom_visible","own_customer_reviews_negative","event_sponsorship","compliance_pursuit","regulation_deadline","regulatory_exposure","platform_policy_change","data_breach","peer_company_incident","litigation","positive_media","negative_media","award_recognition","tech_adoption_adjacent","competitor_installed","competitor_newly_adopted","overlapping_tools_in_category","recent_software_purchases","outbound_domains_registered","mcp_server_published","hf_org_paid_plan","bug_bounty_ai_scope","new_exec_buyer_role","exec_departure","first_hire_in_function","competitor_outage_deprecation","competitor_acquired_closed","competitor_logo_removed","competitor_positioning_change","competitor_banned_or_sanctioned","social_post_about_problem","podcast_or_talk_appearance","exec_public_appearance","named_project_underway","customer_peer_reference"]},"maxItems":15,"description":"Catalog signal types the user added from the \"add more\" list, by id (seller_profile's `signals.addMore`); discover looks for each as a need pattern on top of `needPatterns`, or of its drafted ones when there are none"},"signalFamilies":{"type":"array","items":{"type":"string","enum":["hiring","company_events","product_site","news_compliance","tools","people_moves","competitor_events","public_intent"]},"minItems":1,"maxItems":8,"description":"The signal families the user switched on (the families of `signals.addMore`, by id). Discover drafts 2 or 3 need patterns for each, worded for the seller's offer, and drops patterns in a family switched off; left out, it drafts 5 to 8 across all"},"notes":{"type":"string","maxLength":2000,"description":"Anything else the user said that should shape the list"}}},"clear":{"type":"array","items":{"type":"string","enum":["segments","exclusions","disqualifiers","competitors","won","needPatterns","signalTypes","signalFamilies","notes"]},"maxItems":9}},"required":["seller","context"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerProfile"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"A new seller site past today’s cap: nothing saved","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile/draft":{"post":{"tags":["profile"],"summary":"Draft the ICP from the seller's site (free; 10 a day per workspace); poll GET /profile/draft/{id}","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253},"offer":{"type":"string","maxLength":1000}},"required":["seller"]}}}},"responses":{"202":{"description":"Draft queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many drafts today: nothing ran","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile/sellers":{"get":{"tags":["profile"],"summary":"The workspace's seller profiles and which one is active (the profile and accounts page show it)","security":[{"bearer":[]}],"responses":{"200":{"description":"Seller profiles","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellerProfiles"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["profile"],"summary":"Add a seller site and make it active (3 new sites a day per workspace), with the active profile's user; onboarding then drafts its buyers. With `replaces` (s195), that seller is removed first, as DELETE /profile/sellers/{seller} does, once the cap allows the add","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253},"replaces":{"type":"string","minLength":3,"maxLength":253}},"required":["seller"]}}}},"responses":{"200":{"description":"Already saved: switched","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"string"}},"required":["active"]}}}},"201":{"description":"Added and active","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"string"}},"required":["active"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`replaces` isn’t one of the workspace’s sellers","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Past today’s cap: nothing added or removed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile/active":{"put":{"tags":["profile"],"summary":"Switch the active seller profile (free, any time; each seller keeps its own profile and saved list)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253}},"required":["seller"]}}}},"responses":{"200":{"description":"Switched","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"string"}},"required":["active"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of the workspace’s sellers","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile/sellers/{seller}":{"delete":{"tags":["profile"],"summary":"Remove a seller from the workspace (s195): its profile, buyers, signals, saved ranked list and events are deleted; opt-outs, credits, usage logs and the user's connections stay","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":253},"required":true,"name":"seller","in":"path"}],"responses":{"200":{"description":"Removed; `active` is the seller the profile now shows, null with none left","content":{"application/json":{"schema":{"type":"object","properties":{"removed":{"type":"string"},"active":{"type":["string","null"]}},"required":["removed","active"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not one of the workspace’s sellers","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/profile/draft/{id}":{"get":{"tags":["profile"],"summary":"An ICP draft: its status and the drafted fields","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Draft","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileDraft"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/network":{"get":{"tags":["network"],"summary":"How many connections the signed-in user has uploaded","security":[{"bearer":[]}],"responses":{"200":{"description":"Summary","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkSummary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"tags":["network"],"summary":"Upload LinkedIn's Connections.csv: replaces the user's previous upload","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":10000000}},"required":["csv"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkSummary"}}}},"400":{"description":"Not a Connections.csv","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["network"],"summary":"Delete the user's connections and the cached results that hold matched names","security":[{"bearer":[]}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NetworkSummary"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked":{"get":{"tags":["ranked"],"summary":"The seller's saved ranked list, researched accounts first","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":253},"required":false,"name":"seller","in":"query"}],"responses":{"200":{"description":"Ranked list","content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string"},"rankedAt":{"type":["string","null"],"format":"date-time"},"rows":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["researched","screened","listed"]},"rank":{"type":"integer"},"score":{"type":"number"},"source":{"type":"string"},"reason":{"type":"string"},"unchecked":{"type":["string","null"]},"size":{"type":"object","properties":{"employees":{"type":"number"},"source":{"type":"string"},"estimate":{"type":"boolean"}},"required":["employees","source","estimate"]},"rankedAt":{"type":"string","format":"date-time"},"contactedAt":{"type":["string","null"],"format":"date"},"researchedAt":{"type":"string","format":"date-time"},"research":{"type":"object","properties":{"employees":{"type":["number","null"]},"headcount":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"},"source":{"type":"string"},"observedAt":{"type":"string"},"estimate":{"type":"boolean"}},"required":["min","max","source","observedAt","estimate"]},"headcountMatch":{"type":"boolean"},"readyNow":{"type":"boolean"},"cluster":{"type":"array","items":{"type":"string"}},"signals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"family":{"type":"string"},"date":{"type":"string"},"claim":{"type":"string"},"url":{"type":["string","null"]},"source":{"type":"string"},"check":{"type":"string"},"quote":{"type":["string","null"]},"need":{"type":"boolean"},"standing":{"type":"boolean"}},"required":["id","family","date","claim","url","source","check"]}},"access":{"type":"object","properties":{"state":{"type":"string"},"connections":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","properties":{"rung":{"type":"string"},"fact":{"type":"string"},"person":{"type":"string"},"profileUrl":{"type":"string"}},"required":["rung","fact"]}}},"required":["state"]},"roleSearch":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"url":{"type":"string"}},"required":["role","url"]}},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"},"title":{"type":"string"},"source":{"type":"string","enum":["company page","search result","preview"]},"url":{"type":"string"},"foundAt":{"type":"string"},"champion":{"type":"object","properties":{"quote":{"type":"string"},"from":{"type":"string","enum":["title","profile","post","page"]},"url":{"type":"string"},"date":{"type":"string"}},"required":["quote","from"]}},"required":["name","role","source","foundAt"]}},"fit":{"type":"string"},"fits":{"type":"boolean"},"buyerRole":{"type":"string"},"angle":{"type":"string"},"watchOut":{"type":"array","items":{"type":"string"}},"checkFirst":{"type":"array","items":{"type":"string"}}},"required":["employees","headcount","headcountMatch","readyNow","cluster","signals","access","roleSearch","fit","fits","buyerRole","angle","watchOut","checkFirst"]},"crm":{"type":"object","properties":{"provider":{"type":"string","enum":["hubspot","salesforce"]},"status":{"type":"string","enum":["customer","open_deal","churned","lost","known"]},"stage":{"type":"string"},"owner":{"type":"string"},"url":{"type":"string"}},"required":["provider","status"]},"feedback":{"type":"string","enum":["good_fit","not_fit","already_talking"]},"feedbackReason":{"type":"string","enum":["competitor","existing_customer","too_small","too_big","wrong_industry","no_need","bad_timing","other"]}},"required":["domain","name","tier","rank","score","source","reason","unchecked","rankedAt"]}},"researchCredits":{"type":"integer"},"connectionsUploaded":{"type":"boolean"},"crm":{"type":"object","properties":{"provider":{"type":"string","enum":["hubspot","salesforce"]}},"required":["provider"]},"researching":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"top":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[10]},{"type":"null"}]}},"required":["id","domains","top"]}},"discovering":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running"]},"progress":{"type":["string","null"]}},"required":["id","status","progress"]},"nextListAt":{"type":["string","null"],"format":"date-time"},"listNote":{"type":["string","null"]},"lastDiscover":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["failed"]},"error":{"type":"string"},"at":{"type":"string","format":"date-time"}},"required":["id","status","error","at"]},"eventsRefreshing":{"type":"boolean"},"eventsCity":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"date":{"type":"string"},"city":{"type":["string","null"]},"online":{"type":"boolean"},"url":{"type":"string"},"why":{"type":"string"},"fit":{"type":"string","enum":["high","medium"]},"audience":{"type":"string"},"companies":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"domain":{"type":"string"},"role":{"type":"string"}},"required":["company","domain","role"]}},"near":{"type":"string","enum":["nearby","far","online"]}},"required":["name","date","city","online","url","why"]}}},"required":["seller","rankedAt","rows"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/research":{"post":{"tags":["ranked"],"summary":"Research saved companies: `domains` (1–10) or the `top` 5 or 10 unresearched rows (each 1 credit, charged only when it qualifies); poll GET /ranked/research/{id}. s194: a company stops before any paid step on an exclusion, a known size outside the band or a failed fit screen, or when researched in the last week; `force` (Research anyway) skips the size, fit and recent checks","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253},"domains":{"type":"array","items":{"type":"string","minLength":3,"maxLength":253},"minItems":1,"maxItems":10},"top":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[10]}]},"force":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Every company was researched in the last week: its saved research stands, nothing held or charged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"202":{"description":"Queued, or the one already open","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Out of credit or over a limit: nothing ran","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["budget"]},"message":{"type":"string"},"shortfallCredits":{"type":"integer"},"buyUrl":{"type":"string"}},"required":["code","message","shortfallCredits"]}},"required":["error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/research/{id}":{"get":{"tags":["ranked"],"summary":"A research run: its progress, then each company and the charge","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Research run","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRun"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/discover":{"post":{"tags":["ranked"],"summary":"s242: the seller's free list (one new list a workspace per UTC day, no credits): the ranked companies stream into GET /ranked; poll GET /ranked/discover/{id}","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253}}}}}},"responses":{"200":{"description":"Today's list stands: nothing ran or was counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRun"}}}},"202":{"description":"Queued, or the list already open","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRun"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No ICP and buyer roles saved yet: nothing ran","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"429":{"description":"Today’s new list went to another of the workspace’s companies: nothing ran","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["daily_cap"]},"message":{"type":"string"},"nextAt":{"type":"string"}},"required":["code","message","nextAt"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/discover/{id}":{"get":{"tags":["ranked"],"summary":"A free list: its progress, then the rows it ranked","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Free list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverRun"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/feedback":{"put":{"tags":["ranked"],"summary":"l8: the user's verdict on a company (good fit, not a fit, already talking), the latest wins; not a fit leaves later discovers. Free","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253},"verdict":{"type":"string","enum":["good_fit","not_fit","already_talking"]},"reason":{"type":"string","enum":["competitor","existing_customer","too_small","too_big","wrong_industry","no_need","bad_timing","other"]}},"required":["domain","verdict"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string"},"verdict":{"type":"string","enum":["good_fit","not_fit","already_talking"]},"reason":{"type":["string","null"],"enum":["competitor","existing_customer","too_small","too_big","wrong_industry","no_need","bad_timing","other",null]},"updatedAt":{"type":"string","format":"date-time"}},"required":["domain","verdict","reason","updatedAt"]}}}},"400":{"description":"Not a company domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["ranked"],"summary":"l8: takes the user's verdict on a company back, so it can come back in later discovers","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":3,"maxLength":253},"required":true,"name":"domain","in":"query"}],"responses":{"204":{"description":"Cleared, or there was none"},"400":{"description":"Not a company domain","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/share":{"post":{"tags":["ranked"],"summary":"s199: a public, name-free link to 1–10 researched accounts of the saved list (a frozen copy; free)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string","minLength":3,"maxLength":253},"domains":{"type":"array","items":{"type":"string","minLength":3,"maxLength":253},"minItems":1,"maxItems":10}},"required":["domains"]}}}},"responses":{"201":{"description":"Shared","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"seller":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"views":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","seller","domains","views","createdAt"]}}}},"400":{"description":"None of those is a researched account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/shares":{"get":{"tags":["ranked"],"summary":"s199: the workspace's share links, newest first","security":[{"bearer":[]}],"responses":{"200":{"description":"Share links","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seller":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"views":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","seller","domains","views","createdAt"]}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/share/{id}":{"delete":{"tags":["ranked"],"summary":"s199: turns a share link off at once","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/ranked/events":{"post":{"tags":["ranked"],"summary":"Search the seller's events again, near the profile's city and online (free; once a day per workspace)","security":[{"bearer":[]}],"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Already refreshed in the last day: nothing ran","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/crm/push":{"post":{"tags":["crm"],"summary":"Add saved accounts to the connected CRM (≤25, after the confirm); poll GET /crm/push/{id}","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string","minLength":3,"maxLength":253},"minItems":1,"maxItems":25},"confirm":{"type":"boolean","enum":[true]},"seller":{"type":"string","minLength":3,"maxLength":253}},"required":["domains","confirm"]}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPush"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/crm/push/{id}":{"get":{"tags":["crm"],"summary":"A CRM push: its status and each account's result","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"CRM push","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmPush"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections":{"post":{"tags":["connections"],"summary":"Store a Monid API key (encrypted; never returned)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["monid"]},"apiKey":{"type":"string","minLength":1}},"required":["provider","apiKey"]}}}},"responses":{"201":{"description":"Connection stored","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["apollo","monid","hubspot","salesforce"]},"status":{"type":"string","enum":["connected","invalid"]},"connectedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"crm":{"type":"object","properties":{"companies":{"type":"integer"},"customers":{"type":"integer"},"openDeals":{"type":"integer"},"lost":{"type":"integer"},"unassociatedOpenDeals":{"type":"integer"},"syncedAt":{"type":"string","format":"date-time"},"syncing":{"type":"boolean"},"lastError":{"type":"string"}},"required":["companies","customers","openDeals","lost","unassociatedOpenDeals","syncing"]}},"required":["provider","status","connectedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["connections"],"summary":"Connected providers and status (no secrets)","security":[{"bearer":[]}],"responses":{"200":{"description":"Connections","content":{"application/json":{"schema":{"type":"object","properties":{"connections":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["apollo","monid","hubspot","salesforce"]},"status":{"type":"string","enum":["connected","invalid"]},"connectedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"crm":{"type":"object","properties":{"companies":{"type":"integer"},"customers":{"type":"integer"},"openDeals":{"type":"integer"},"lost":{"type":"integer"},"unassociatedOpenDeals":{"type":"integer"},"syncedAt":{"type":"string","format":"date-time"},"syncing":{"type":"boolean"},"lastError":{"type":"string"}},"required":["companies","customers","openDeals","lost","unassociatedOpenDeals","syncing"]}},"required":["provider","status","connectedAt"]}}},"required":["connections"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/apollo/authorize":{"post":{"tags":["connections"],"summary":"Apollo's OAuth sign-in URL for this user and workspace","security":[{"bearer":[]}],"responses":{"200":{"description":"Send the browser here","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Apollo sign-in not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/apollo/callback":{"post":{"tags":["connections"],"summary":"Finish Apollo's OAuth sign-in: store the access token encrypted (never returned)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":2048},"state":{"type":"string","minLength":1,"maxLength":2048}},"required":["code","state"]}}}},"responses":{"201":{"description":"Apollo connected","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["apollo","monid","hubspot","salesforce"]},"status":{"type":"string","enum":["connected","invalid"]},"connectedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"crm":{"type":"object","properties":{"companies":{"type":"integer"},"customers":{"type":"integer"},"openDeals":{"type":"integer"},"lost":{"type":"integer"},"unassociatedOpenDeals":{"type":"integer"},"syncedAt":{"type":"string","format":"date-time"},"syncing":{"type":"boolean"},"lastError":{"type":"string"}},"required":["companies","customers","openDeals","lost","unassociatedOpenDeals","syncing"]}},"required":["provider","status","connectedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Apollo sign-in failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Apollo sign-in not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{provider}/connect":{"post":{"tags":["connections"],"summary":"s180: Pipedream's hosted connect page for HubSpot or Salesforce; it returns to /account","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["hubspot","salesforce"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Send the browser here","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{provider}/callback":{"post":{"tags":["connections"],"summary":"Finish a CRM connect: store its Pipedream account id encrypted (never returned)","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["hubspot","salesforce"]},"required":true,"name":"provider","in":"path"}],"responses":{"201":{"description":"CRM connected","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","enum":["apollo","monid","hubspot","salesforce"]},"status":{"type":"string","enum":["connected","invalid"]},"connectedAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"crm":{"type":"object","properties":{"companies":{"type":"integer"},"customers":{"type":"integer"},"openDeals":{"type":"integer"},"lost":{"type":"integer"},"unassociatedOpenDeals":{"type":"integer"},"syncedAt":{"type":"string","format":"date-time"},"syncing":{"type":"boolean"},"lastError":{"type":"string"}},"required":["companies","customers","openDeals","lost","unassociatedOpenDeals","syncing"]}},"required":["provider","status","connectedAt"]}}}},"400":{"description":"No connected account found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Pipedream unreachable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"CRM connections not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{provider}/sync":{"post":{"tags":["connections"],"summary":"s181: Sync now: queue a CRM sync (free)","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["hubspot","salesforce"]},"required":true,"name":"provider","in":"path"}],"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"boolean"}},"required":["queued"]}}}},"400":{"description":"Not connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{provider}/watch-lost":{"post":{"tags":["connections"],"summary":"s181: watch the CRM's 25 most recent lost deals (the watchlist's schedule stays opt-in)","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["hubspot","salesforce"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Added to the watchlist","content":{"application/json":{"schema":{"type":"object","properties":{"added":{"type":"integer"}},"required":["added"]}}}},"400":{"description":"Not connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/connections/{provider}":{"delete":{"tags":["connections"],"summary":"Disconnect a provider: a CRM's Pipedream account and every row synced from it are deleted","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string","enum":["apollo","monid","hubspot","salesforce"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Disconnected","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}},"required":["deleted"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shared/{id}":{"get":{"tags":["shared"],"summary":"A shared Sales Play (public; the link id is the credential)","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Shared Sales Play","content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain":{"type":"string","minLength":1}},"required":["name","domain"]},"play":{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"accountId":{"type":"string","minLength":1},"runId":{"type":"string","minLength":1},"strategyId":{"type":"string","minLength":1},"version":{"type":"integer","minimum":1},"rank":{"type":"integer","minimum":1},"opening":{"type":"string","minLength":1},"whyNow":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["claim","evidenceIds"]}},"alreadyHave":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["claim","evidenceIds"]}},"evidence":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string","minLength":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["claim","evidenceIds"]}},"buyerMap":{"type":"array","items":{"type":"object","properties":{"personaId":{"type":["string","null"],"minLength":1},"personId":{"type":["string","null"],"minLength":1},"role":{"type":"string","minLength":1},"recommendedRoleInPlay":{"type":"string","minLength":1},"foundVia":{"type":"object","properties":{"provider":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["provider","url"]}},"required":["personaId","personId","role","recommendedRoleInPlay"]}},"whoToFind":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"priority":{"type":"integer","minimum":1},"reason":{"type":"string"}},"required":["title","priority","reason"]},"default":[]},"approach":{"type":"object","properties":{"channelSequence":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"angle":{"type":"string","minLength":1},"problem":{"type":"string","minLength":1},"proof":{"type":["string","null"]},"cta":{"type":"string","minLength":1}},"required":["channelSequence","angle","proof","cta"]},"failureConditions":{"type":"array","items":{"type":"object","properties":{"condition":{"type":"string"},"effect":{"type":"string"},"verificationStep":{"type":["string","null"]}},"required":["condition","effect","verificationStep"]}},"approaches":{"type":"array","items":{"type":"object","properties":{"strategyId":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"angle":{"type":"string","minLength":1},"theory":{"type":"string","minLength":1},"channels":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"rank":{"type":"integer","minimum":1},"simulationScore":{"type":"number","minimum":0,"maximum":10},"scoreVersion":{"type":"number","enum":[2]},"scenarios":{"type":"integer","minimum":0},"scenarioWins":{"type":"integer","minimum":0},"scenarioTies":{"type":"integer","minimum":0},"reactions":{"type":"integer","minimum":0},"milestones":{"type":"object","properties":{"ignored":{"type":"integer","minimum":0},"researches_seller":{"type":"integer","minimum":0},"internal_forward":{"type":"integer","minimum":0},"substantive_reply":{"type":"integer","minimum":0},"qualified_conversation":{"type":"integer","minimum":0},"meeting":{"type":"integer","minimum":0},"hard_decline":{"type":"integer","minimum":0},"unsubscribe":{"type":"integer","minimum":0}}},"passedOver":{"type":"string","minLength":1}},"required":["strategyId","name","angle","theory","channels","rank","simulationScore","scoreVersion","scenarios","scenarioWins","scenarioTies","reactions","milestones"]},"minItems":1},"seller":{"type":"object","properties":{"name":{"type":"string","minLength":1},"domain":{"type":"string"},"desiredCustomer":{"type":"string","minLength":1}},"required":["name","desiredCustomer"]},"outreach":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"channel":{"type":"string","minLength":1},"step":{"type":"integer","minimum":1},"delayDays":{"type":["number","null"],"minimum":0},"condition":{"type":"string","enum":["IGNORE","NOTICE","OPEN","RESEARCH_SELLER","VIEW_PROOF","FORWARD_INTERNAL","ASK_COLLEAGUE","REPLY_QUESTION","REPLY_OBJECTION","REPLY_POSITIVE","DEFER","DECLINE","BOOK_MEETING","UNSUBSCRIBE","ACCEPT_CONNECTION","IGNORE_CONNECTION","APPROVE_PURCHASE"]},"subject":{"type":["string","null"]},"targetPersonId":{"type":["string","null"],"minLength":1},"targetRole":{"type":["string","null"]},"editable":{"type":"boolean","enum":[true]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}},"kind":{"type":"string","enum":["email_opener"]},"body":{"type":"string","minLength":1}},"required":["channel","step","delayDays","subject","targetPersonId","targetRole","editable","evidenceIds","kind","body"]},{"type":"object","properties":{"channel":{"type":"string","minLength":1},"step":{"type":"integer","minimum":1},"delayDays":{"type":["number","null"],"minimum":0},"condition":{"type":"string","enum":["IGNORE","NOTICE","OPEN","RESEARCH_SELLER","VIEW_PROOF","FORWARD_INTERNAL","ASK_COLLEAGUE","REPLY_QUESTION","REPLY_OBJECTION","REPLY_POSITIVE","DEFER","DECLINE","BOOK_MEETING","UNSUBSCRIBE","ACCEPT_CONNECTION","IGNORE_CONNECTION","APPROVE_PURCHASE"]},"subject":{"type":["string","null"]},"targetPersonId":{"type":["string","null"],"minLength":1},"targetRole":{"type":["string","null"]},"editable":{"type":"boolean","enum":[true]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}},"kind":{"type":"string","enum":["email_followup"]},"body":{"type":"string","minLength":1}},"required":["channel","step","delayDays","subject","targetPersonId","targetRole","editable","evidenceIds","kind","body"]},{"type":"object","properties":{"channel":{"type":"string","minLength":1},"step":{"type":"integer","minimum":1},"delayDays":{"type":["number","null"],"minimum":0},"condition":{"type":"string","enum":["IGNORE","NOTICE","OPEN","RESEARCH_SELLER","VIEW_PROOF","FORWARD_INTERNAL","ASK_COLLEAGUE","REPLY_QUESTION","REPLY_OBJECTION","REPLY_POSITIVE","DEFER","DECLINE","BOOK_MEETING","UNSUBSCRIBE","ACCEPT_CONNECTION","IGNORE_CONNECTION","APPROVE_PURCHASE"]},"subject":{"type":["string","null"]},"targetPersonId":{"type":["string","null"],"minLength":1},"targetRole":{"type":["string","null"]},"editable":{"type":"boolean","enum":[true]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}},"kind":{"type":"string","enum":["linkedin_connection_note"]},"body":{"type":"string","minLength":1,"maxLength":300}},"required":["channel","step","delayDays","subject","targetPersonId","targetRole","editable","evidenceIds","kind","body"]},{"type":"object","properties":{"channel":{"type":"string","minLength":1},"step":{"type":"integer","minimum":1},"delayDays":{"type":["number","null"],"minimum":0},"condition":{"type":"string","enum":["IGNORE","NOTICE","OPEN","RESEARCH_SELLER","VIEW_PROOF","FORWARD_INTERNAL","ASK_COLLEAGUE","REPLY_QUESTION","REPLY_OBJECTION","REPLY_POSITIVE","DEFER","DECLINE","BOOK_MEETING","UNSUBSCRIBE","ACCEPT_CONNECTION","IGNORE_CONNECTION","APPROVE_PURCHASE"]},"subject":{"type":["string","null"]},"targetPersonId":{"type":["string","null"],"minLength":1},"targetRole":{"type":["string","null"]},"editable":{"type":"boolean","enum":[true]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}},"kind":{"type":"string","enum":["linkedin_message"]},"body":{"type":"string","minLength":1}},"required":["channel","step","delayDays","subject","targetPersonId","targetRole","editable","evidenceIds","kind","body"]}]},"minItems":1},"simulationSummary":{"type":"object","properties":{"scenarios":{"type":"integer","minimum":0},"scenarioWins":{"type":"integer","minimum":0},"medianUtility":{"type":"number"},"robustness":{"type":"number"},"negativeOutcomeRate":{"type":"number","minimum":0,"maximum":1},"stressTests":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"level":{"type":"string","minLength":1},"scenarios":{"type":"integer","minimum":1},"held":{"type":"boolean"}},"required":["label","level","scenarios","held"]}},"totalRehearsals":{"type":"integer","minimum":0},"buyerDecisions":{"type":"integer","minimum":0}},"required":["scenarios","scenarioWins","medianUtility","robustness","negativeOutcomeRate","stressTests"]},"why":{"type":"string","minLength":1},"story":{"type":"string","minLength":1},"callPlan":{"type":"object","properties":{"questions":{"type":"array","items":{"type":"object","properties":{"step":{"type":"string","enum":["why_change","readiness_scale","why_not_lower","picture_solved","why_it_matters","play_back","next_step"]},"question":{"type":"string","minLength":1},"purpose":{"type":"string","minLength":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["step","question","purpose","evidenceIds"]}}},"required":["questions"]},"flaggedClaims":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":1},"claim":{"type":"string","minLength":1}},"required":["step","claim"]}},"revision":{"type":"object","properties":{"kept":{"type":"boolean"},"reason":{"type":"string","minLength":1},"rehearsals":{"type":"integer","minimum":1},"wins":{"type":"integer","minimum":0},"moreDeclines":{"type":"boolean"},"otherDraft":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":1},"subject":{"type":["string","null"]},"body":{"type":"string","minLength":1}},"required":["step","subject","body"]},"minItems":1}},"required":["kept","reason","rehearsals","wins","moreDeclines","otherDraft"]},"review":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"object","properties":{"check":{"type":"string","minLength":1},"why":{"type":"string","minLength":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}},"strategyIds":{"type":"array","items":{"type":"string","minLength":1}},"steps":{"type":"array","items":{"type":"integer","minimum":1}}},"required":["check","why","evidenceIds","strategyIds","steps"]},"maxItems":4}},"required":["checks"]},"reviewEdits":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":1},"body":{"type":"string","minLength":1},"checks":{"type":"array","items":{"type":"string","minLength":1},"minItems":1}},"required":["step","body","checks"]}},"timing":{"oneOf":[{"type":"object","properties":{"verdict":{"type":"string","enum":["now"]},"trigger":{"type":"object","properties":{"claim":{"type":"string","minLength":1},"date":{"type":"string","format":"date"},"evidenceId":{"type":"string","minLength":1}},"required":["claim","date","evidenceId"]},"sendOn":{"type":"string","format":"date"},"timeZone":{"type":"string"},"sendHour":{"type":"integer","minimum":0,"maximum":23},"state":{"type":"string","enum":["simulated"]}},"required":["verdict","trigger","sendOn","sendHour","state"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["wait"]},"until":{"type":"string","format":"date"},"trigger":{"type":"object","properties":{"claim":{"type":"string","minLength":1},"date":{"type":["string","null"],"format":"date"},"evidenceId":{"type":"string","minLength":1}},"required":["claim","date","evidenceId"]},"timeZone":{"type":"string"},"sendHour":{"type":"integer","minimum":0,"maximum":23},"comparison":{"type":"object","properties":{"scenarios":{"type":"integer","minimum":1},"nowWins":{"type":"integer","minimum":0},"waitWins":{"type":"integer","minimum":0}},"required":["scenarios","nowWins","waitWins"]},"state":{"type":"string","enum":["simulated"]}},"required":["verdict","until","trigger","sendHour","comparison","state"]},{"type":"object","properties":{"verdict":{"type":"string","enum":["no_trigger"]},"watchFor":{"type":"array","items":{"type":"string","minLength":1}},"state":{"type":"string","enum":["simulated"]}},"required":["verdict","watchFor","state"]}]},"subjectTest":{"type":"object","properties":{"step":{"type":"integer","minimum":1},"original":{"type":"string","minLength":1},"chosen":{"type":"string","minLength":1},"candidates":{"type":"array","items":{"type":"object","properties":{"subject":{"type":"string","minLength":1},"jevWins":{"type":"integer","minimum":0},"opusWins":{"type":"integer","minimum":0},"matchups":{"type":"integer","minimum":1}},"required":["subject","jevWins","opusWins","matchups"]},"minItems":2},"judges":{"type":"array","items":{"type":"string","enum":["jev","opus"]},"minItems":1},"agree":{"type":["boolean","null"]},"state":{"type":"string","enum":["simulated"]}},"required":["step","original","chosen","candidates","judges","agree","state"]},"contactStyle":{"type":"object","properties":{"personId":{"type":"string","minLength":1},"measured":{"type":"string","minLength":1,"maxLength":500},"posts":{"type":"integer","minimum":1},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"sources":{"type":"array","items":{"type":"object","properties":{"network":{"type":"string","enum":["LinkedIn","X"]},"url":{"type":"string","format":"uri"}},"required":["network","url"]},"minItems":1},"delivery":{"type":"string","minLength":1,"maxLength":500}},"required":["personId","measured","posts","evidenceIds","sources","delivery"]},"hook":{"type":"object","properties":{"prompt":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"subject":{"type":["string","null"]},"reply":{"type":"string","minLength":1},"citations":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"title":{"type":"string"},"citedText":{"type":"string"}},"required":["url","title","citedText"]}},"unsupported":{"type":"array","items":{"type":"string","minLength":1}},"supportedSources":{"type":"integer","minimum":0}},"required":["prompt","model","subject","reply","citations","unsupported","supportedSources"]},"sampleReply":{"type":"object","properties":{"role":{"type":"string","minLength":1},"text":{"type":"string","minLength":1},"milestone":{"type":"string","enum":["ignored","researches_seller","internal_forward","substantive_reply","qualified_conversation","meeting","hard_decline","unsubscribe"]},"step":{"type":"integer","minimum":1}},"required":["role","text","milestone"]},"buyerReplies":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","minLength":1},"replied":{"type":"integer","minimum":0},"of":{"type":"integer","exclusiveMinimum":0},"text":{"type":"string","minLength":1}},"required":["role","replied","of"]}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","workspaceId","accountId","runId","strategyId","version","rank","opening","whyNow","evidence","buyerMap","approach","failureConditions","approaches","seller","outreach","simulationSummary","why","createdAt"]},"people":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"fullName":{"type":"string","minLength":1}},"required":["id","fullName"]}},"evidence":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["seller","competitor","account","person"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"accountId":{"type":"string","minLength":1},"personId":{"type":"string","minLength":1},"claim":{"type":"string","minLength":1},"evidenceType":{"type":"string","enum":["company_fact","person_fact","job_post","technology","funding","content","product_change","hiring_change","social_activity","relationship","pricing","case_study","positioning","competitor_usage","ad","other"]},"source":{"type":"object","properties":{"provider":{"type":"string"},"url":{"type":"string","format":"uri"},"documentId":{"type":"string","minLength":1}}},"excerpt":{"type":"string"},"eventDate":{"type":"string","format":"date"},"collectedAt":{"type":"string","format":"date-time"},"sourceConfidence":{"type":"number","minimum":0,"maximum":1},"rawHash":{"type":"string"},"state":{"type":"string","enum":["inferred"]},"inference":{"type":"object","properties":{"derivedFrom":{"type":"array","items":{"type":"string","minLength":1},"minItems":1},"explanation":{"type":"string"},"alternatives":{"type":"array","items":{"type":"string"}}},"required":["derivedFrom","explanation","alternatives"]}},"required":["id","workspaceId","subject","claim","evidenceType","source","collectedAt","sourceConfidence","state","inference"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["seller","competitor","account","person"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"accountId":{"type":"string","minLength":1},"personId":{"type":"string","minLength":1},"claim":{"type":"string","minLength":1},"evidenceType":{"type":"string","enum":["company_fact","person_fact","job_post","technology","funding","content","product_change","hiring_change","social_activity","relationship","pricing","case_study","positioning","competitor_usage","ad","other"]},"source":{"type":"object","properties":{"provider":{"type":"string"},"url":{"type":"string","format":"uri"},"documentId":{"type":"string","minLength":1}}},"excerpt":{"type":"string"},"eventDate":{"type":"string","format":"date"},"collectedAt":{"type":"string","format":"date-time"},"sourceConfidence":{"type":"number","minimum":0,"maximum":1},"rawHash":{"type":"string"},"state":{"type":"string","enum":["observed","customer_supplied"]}},"required":["id","workspaceId","subject","claim","evidenceType","source","collectedAt","sourceConfidence","state"]},{"type":"object","properties":{"id":{"type":"string","minLength":1},"workspaceId":{"type":"string","minLength":1},"subject":{"type":"object","properties":{"kind":{"type":"string","enum":["seller","competitor","account","person"]},"id":{"type":"string","minLength":1}},"required":["kind","id"]},"accountId":{"type":"string","minLength":1},"personId":{"type":"string","minLength":1},"claim":{"type":"string","minLength":1},"evidenceType":{"type":"string","enum":["company_fact","person_fact","job_post","technology","funding","content","product_change","hiring_change","social_activity","relationship","pricing","case_study","positioning","competitor_usage","ad","other"]},"source":{"type":"object","properties":{"provider":{"type":"string"},"url":{"type":"string","format":"uri"},"documentId":{"type":"string","minLength":1}}},"excerpt":{"type":"string"},"eventDate":{"type":"string","format":"date"},"collectedAt":{"type":"string","format":"date-time"},"sourceConfidence":{"type":"number","minimum":0,"maximum":1},"rawHash":{"type":"string"},"state":{"type":"string","enum":["unknown","simulated"]}},"required":["id","workspaceId","subject","claim","evidenceType","source","collectedAt","sourceConfidence","state"]}]}},"competitors":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"state":{"type":"string","enum":["observed","inferred"]},"evidenceIds":{"type":"array","items":{"type":"string","minLength":1}}},"required":["name","state","evidenceIds"]}},"receipts":{"type":"object","properties":{"sources":{"type":"integer","minimum":0},"datedFacts":{"type":"integer","minimum":0},"rehearsals":{"type":"integer","minimum":0}},"required":["sources","datedFacts","rehearsals"]},"sharedAt":{"type":"string","format":"date-time"}},"required":["account","play","people","evidence","competitors","receipts","sharedAt"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shared/{id}/views":{"post":{"tags":["shared"],"summary":"Count one open of a shared Sales Play (public; sent by the page in the browser)","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Counted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shared/ranked/{id}":{"get":{"tags":["shared"],"summary":"s199: a shared ranked list (public; the link id is the credential, no names)","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Shared accounts","content":{"application/json":{"schema":{"type":"object","properties":{"seller":{"type":"string"},"sharedAt":{"type":"string","format":"date-time"},"accounts":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"employees":{"type":["number","null"]},"buyerRole":{"type":"string"},"angle":{"type":"string"},"fit":{"type":"string"},"checkFirst":{"type":"array","items":{"type":"string"}},"signals":{"type":"array","items":{"type":"object","properties":{"family":{"type":"string"},"date":{"type":"string"},"claim":{"type":"string"},"url":{"type":"string"},"source":{"type":"string"}},"required":["family","date","claim","url","source"]}}},"required":["domain","name","employees","buyerRole","angle","fit","checkFirst","signals"]}}},"required":["seller","sharedAt","accounts"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/shared/ranked/{id}/views":{"post":{"tags":["shared"],"summary":"Count one open of a shared ranked list (public; sent by the page in the browser)","parameters":[{"schema":{"type":"string","minLength":1},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Counted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/signup":{"post":{"tags":["signup"],"summary":"Sign up for SalesMap (public; we send an invitation once approved)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string","minLength":1,"maxLength":100},"lastName":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email"},"website":{"type":"string","maxLength":500}},"required":["firstName","lastName","email"]}}}},"responses":{"204":{"description":"Signed up"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/demo":{"post":{"tags":["signup"],"summary":"Demo sign-in: a session token for the demo account, no email sent","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"Sign-in token","content":{"application/json":{"schema":{"type":"object","properties":{"tokenHash":{"type":"string"}},"required":["tokenHash"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not the demo email","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agent/signup":{"post":{"tags":["agent"],"summary":"Sign up as an agent: a 72-hour trial key (the free list) that a human claims to keep it (returned once)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","maxLength":80,"description":"Which agent is asking, e.g. \"claude-code\""},"use":{"type":"string","maxLength":500,"description":"What the key is for, in a sentence"}}}}}},"responses":{"201":{"description":"Trial key created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentTrial"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"This IP made 5 signups in the last 24 hours","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agent/claim":{"get":{"tags":["agent"],"summary":"The customer-terms version a claim accepts","security":[{"bearer":[]}],"responses":{"200":{"description":"Terms","content":{"application/json":{"schema":{"type":"object","properties":{"termsVersion":{"type":"string"},"termsUrl":{"type":"string"}},"required":["termsVersion","termsUrl"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"tags":["agent"],"summary":"Claim an agent's trial key: it keeps working; research is bought with credits","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"claim":{"type":"string","minLength":8,"maxLength":200,"description":"The claim link's token or the claim code"},"acceptTerms":{"type":"string","enum":["2026-10-21"],"description":"Accepts the customer terms at https://salesmap.site/terms (this version)"}},"required":["claim","acceptTerms"]}}}},"responses":{"200":{"description":"Claimed","content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"type":"string"}},"required":["workspaceId"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Someone else already claimed that trial","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"That trial expired: the agent can sign up again","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/opt-out":{"post":{"tags":["opt-out"],"summary":"Opt out of SalesMap output (public; drops you from every result)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":500}}}}}},"responses":{"204":{"description":"Opted out"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing":{"get":{"tags":["billing"],"summary":"Credit balance and how credits are sold","security":[{"bearer":[]}],"responses":{"200":{"description":"Billing state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"A Stripe Checkout link to buy credits at the list price","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer","minimum":5,"maximum":1000},"returnTo":{"type":"string","maxLength":200,"pattern":"^\\/[^\\s\\\\]*$"}},"required":["credits"]}}}},"responses":{"200":{"description":"Checkout link","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/ledger":{"get":{"tags":["billing"],"summary":"Usage history, newest first: each paid call (tool, results, charged, refunded), top-ups and grants","security":[{"bearer":[]}],"parameters":[{"schema":{"type":["integer","null"],"minimum":0,"default":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Ledger page","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reason":{"type":"string","enum":["topup","grant","charge","refund","payment_refund","dispute_hold","dispute_release"]},"createdAt":{"type":"string","format":"date-time"},"credits":{"type":"integer"},"tool":{"type":["string","null"]},"results":{"type":["integer","null"]},"chargedCredits":{"type":["integer","null"]},"refundedCredits":{"type":["integer","null"]},"hasReceipt":{"type":"boolean"}},"required":["id","reason","createdAt","credits","tool","results","chargedCredits","refundedCredits","hasReceipt"]}},"next":{"type":["integer","null"]}},"required":["entries","next"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/billing/ledger/{id}/receipt":{"get":{"tags":["billing"],"summary":"A top-up's Stripe receipt link","security":[{"bearer":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Receipt link","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No receipt","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspace/export":{"get":{"tags":["workspace"],"summary":"Your data as JSON: seller profiles, ranked lists, uploaded connections, the credits ledger","security":[{"bearer":[]}],"responses":{"200":{"description":"Workspace export","content":{"application/json":{"schema":{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"profiles":{"type":"array","items":{"type":"object","properties":{"seller":{"type":"string"},"context":{"type":"object","additionalProperties":{}},"updatedAt":{"type":"string","format":"date-time"}},"required":["seller","context","updatedAt"]}},"ranked":{"type":"array","items":{"type":"object","properties":{"seller":{"type":"string"},"rankedAt":{"type":["string","null"],"format":"date-time"},"rows":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"},"name":{"type":"string"},"tier":{"type":"string","enum":["researched","screened","listed"]},"rank":{"type":"integer"},"score":{"type":"number"},"source":{"type":"string"},"reason":{"type":"string"},"unchecked":{"type":["string","null"]},"size":{"type":"object","properties":{"employees":{"type":"number"},"source":{"type":"string"},"estimate":{"type":"boolean"}},"required":["employees","source","estimate"]},"rankedAt":{"type":"string","format":"date-time"},"contactedAt":{"type":["string","null"],"format":"date"},"researchedAt":{"type":"string","format":"date-time"},"research":{"type":"object","properties":{"employees":{"type":["number","null"]},"headcount":{"type":["object","null"],"properties":{"min":{"type":"number"},"max":{"type":"number"},"source":{"type":"string"},"observedAt":{"type":"string"},"estimate":{"type":"boolean"}},"required":["min","max","source","observedAt","estimate"]},"headcountMatch":{"type":"boolean"},"readyNow":{"type":"boolean"},"cluster":{"type":"array","items":{"type":"string"}},"signals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"family":{"type":"string"},"date":{"type":"string"},"claim":{"type":"string"},"url":{"type":["string","null"]},"source":{"type":"string"},"check":{"type":"string"},"quote":{"type":["string","null"]},"need":{"type":"boolean"},"standing":{"type":"boolean"}},"required":["id","family","date","claim","url","source","check"]}},"access":{"type":"object","properties":{"state":{"type":"string"},"connections":{"type":"boolean"},"paths":{"type":"array","items":{"type":"object","properties":{"rung":{"type":"string"},"fact":{"type":"string"},"person":{"type":"string"},"profileUrl":{"type":"string"}},"required":["rung","fact"]}}},"required":["state"]},"roleSearch":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"url":{"type":"string"}},"required":["role","url"]}},"contacts":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"},"title":{"type":"string"},"source":{"type":"string","enum":["company page","search result","preview"]},"url":{"type":"string"},"foundAt":{"type":"string"},"champion":{"type":"object","properties":{"quote":{"type":"string"},"from":{"type":"string","enum":["title","profile","post","page"]},"url":{"type":"string"},"date":{"type":"string"}},"required":["quote","from"]}},"required":["name","role","source","foundAt"]}},"fit":{"type":"string"},"fits":{"type":"boolean"},"buyerRole":{"type":"string"},"angle":{"type":"string"},"watchOut":{"type":"array","items":{"type":"string"}},"checkFirst":{"type":"array","items":{"type":"string"}}},"required":["employees","headcount","headcountMatch","readyNow","cluster","signals","access","roleSearch","fit","fits","buyerRole","angle","watchOut","checkFirst"]},"crm":{"type":"object","properties":{"provider":{"type":"string","enum":["hubspot","salesforce"]},"status":{"type":"string","enum":["customer","open_deal","churned","lost","known"]},"stage":{"type":"string"},"owner":{"type":"string"},"url":{"type":"string"}},"required":["provider","status"]},"feedback":{"type":"string","enum":["good_fit","not_fit","already_talking"]},"feedbackReason":{"type":"string","enum":["competitor","existing_customer","too_small","too_big","wrong_industry","no_need","bad_timing","other"]}},"required":["domain","name","tier","rank","score","source","reason","unchecked","rankedAt"]}},"researchCredits":{"type":"integer"},"connectionsUploaded":{"type":"boolean"},"crm":{"type":"object","properties":{"provider":{"type":"string","enum":["hubspot","salesforce"]}},"required":["provider"]},"researching":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domains":{"type":"array","items":{"type":"string"}},"top":{"anyOf":[{"type":"number","enum":[5]},{"type":"number","enum":[10]},{"type":"null"}]}},"required":["id","domains","top"]}},"discovering":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["queued","running"]},"progress":{"type":["string","null"]}},"required":["id","status","progress"]},"nextListAt":{"type":["string","null"],"format":"date-time"},"listNote":{"type":["string","null"]},"lastDiscover":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["failed"]},"error":{"type":"string"},"at":{"type":"string","format":"date-time"}},"required":["id","status","error","at"]},"eventsRefreshing":{"type":"boolean"},"eventsCity":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"date":{"type":"string"},"city":{"type":["string","null"]},"online":{"type":"boolean"},"url":{"type":"string"},"why":{"type":"string"},"fit":{"type":"string","enum":["high","medium"]},"audience":{"type":"string"},"companies":{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"domain":{"type":"string"},"role":{"type":"string"}},"required":["company","domain","role"]}},"near":{"type":"string","enum":["nearby","far","online"]}},"required":["name","date","city","online","url","why"]}}},"required":["seller","rankedAt","rows"]}},"connections":{"type":"array","items":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"profileUrl":{"type":["string","null"]},"company":{"type":["string","null"]},"position":{"type":["string","null"]},"connectedOn":{"type":["string","null"]},"exportedAt":{"type":"string"}},"required":["firstName","lastName","profileUrl","company","position","connectedOn","exportedAt"]}},"integrations":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["provider","status","createdAt"]}},"ledger":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"credits":{"type":"integer"},"reason":{"type":"string"},"details":{"type":"object","additionalProperties":{}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","credits","reason","details","createdAt"]}}},"required":["exportedAt","workspace","profiles","ranked","connections","integrations","ledger"]}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/workspace":{"delete":{"tags":["workspace"],"summary":"Delete the workspace, its data and API keys, and your sign-in (the credits ledger is kept for tax, without personal details)","security":[{"bearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","enum":["delete my account"],"description":"Type \"delete my account\""}},"required":["confirm"]}}}},"responses":{"204":{"description":"Deleted"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Only the owner can delete the workspace","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A search is still running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Not implemented yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{}}