Subsequent Events [Abstract] Subsequent Events Subsequent Events [Text Block] Income Tax Disclosure [Abstract] Components of loss before provision for income taxes Schedule of Income before Income Tax, Domestic and Foreign [Table Text Block] Components of the provision for income taxes Schedule of Components of Income Tax Expense (Benefit) [Table Text Block] Schedule of effective income tax rate reconciliation Schedule of Effective Income Tax Rate Reconciliation [Table Text Block] Components of deferred tax assets for federal and state income taxes Schedule of Deferred Tax Assets and Liabilities [Table Text Block] Summary of activity within unrecognized gross tax benefits Schedule of Unrecognized Tax Benefits Roll Forward [Table Text Block] Commitments and Contingencies Disclosure [Abstract] Accrual for contingencies Loss Contingency Accrual Share-based Payment Arrangement [Abstract] Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table] Schedule of Share-based Compensation Arrangements by Share-based Payment Award [Table] Award Type [Axis] Award Type [Axis] Award Type [Domain] Award Type [Domain] Stock Appreciation Rights (SARs) Stock Appreciation Rights (SARs) [Member] Vesting [Axis] Vesting [Axis] Vesting [Domain] Vesting [Domain] One Year Anniversary Share-based Payment Arrangement, Tranche One [Member] 25 to 36 Months Share-based Payment Arrangement, Tranche Two [Member] Share-based Compensation Arrangement by Share-based Payment Award [Line Items] Share-based Compensation Arrangement by Share-based Payment Award [Line Items] Award vesting period Share-based Compensation Arrangement by Share-based Payment Award, Award Vesting Period Vesting rights percentage Share-based Compensation Arrangement by Share-based Payment Award, Award Vesting Rights, Percentage Awards granted (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Non-Option Equity Instruments, Granted Exercise price of awards granted (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value Awards vested (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Vested in Period Stock-based compensation expense Share-based Payment Arrangement, Expense Cash paid for exercise of SARs Share-Based Payment Arrangement, Cash Paid For Exercise Of Stock Appreciation Rights Share-Based Payment Arrangement, Cash Paid For Exercise Of Stock Appreciation Rights SARs exercised (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Non-Option Equity Instruments, Exercised Accounting Policies [Abstract] Basis of Presentation Basis of Accounting, Policy [Policy Text Block] Use of Estimates Use of Estimates, Policy [Policy Text Block] Foreign Currency Foreign Currency Transactions and Translations Policy [Policy Text Block] Comprehensive Loss Comprehensive Income, Policy [Policy Text Block] Cash and Cash Equivalents Cash and Cash Equivalents, Unrestricted Cash and Cash Equivalents, Policy [Policy Text Block] Marketable Securities Marketable Securities, Policy [Policy Text Block] Restricted Cash Cash and Cash Equivalents, Restricted Cash and Cash Equivalents, Policy [Policy Text Block] Fair Value of Financial Instruments Fair Value of Financial Instruments, Policy [Policy Text Block] Concentration of Credit Risk Concentration Risk, Credit Risk, Policy [Policy Text Block] Capitalized Software Costs Software to be Sold, Leased, or Otherwise Marketed, Policy [Policy Text Block] Property and Equipment Property, Plant and Equipment, Policy [Policy Text Block] Business Combinations Business Combinations Policy [Policy Text Block] Leases Lessee, Leases [Policy Text Block] Long-Lived Assets, Including Other Acquired Intangible Assets Impairment or Disposal of Long-Lived Assets, Including Intangible Assets, Policy [Policy Text Block] Goodwill Goodwill and Intangible Assets, Goodwill, Policy [Policy Text Block] Revenue Recognition Revenue from Contract with Customer [Policy Text Block] Deferred Revenue Revenue Recognition, Deferred Revenue [Policy Text Block] Accounts Receivable and Allowance for Doubtful Accounts Accounts Receivable [Policy Text Block] Convertible Senior Notes Debt, Policy [Policy Text Block] Research and Development Research and Development Expense, Policy [Policy Text Block] Advertising Advertising Cost [Policy Text Block] Stock-Based Compensation Share-based Payment Arrangement [Policy Text Block] Net Loss Per Share Earnings Per Share, Policy [Policy Text Block] Segment Information Segment Reporting, Policy [Policy Text Block] Income Taxes Income Tax, Policy [Policy Text Block] Related Party Transactions Related Party Transactions, Policy [Policy Text Block] Related Party Transactions, Policy [Policy Text Block] Recently Adopted and New Accounting Pronouncements Not Yet Adopted New Accounting Pronouncements, Policy [Policy Text Block] Leases [Abstract] Finance lease cost: Lease, Cost [Abstract] Amortization of finance lease right-of-use assets Finance Lease, Right-of-Use Asset, Amortization Interest on finance lease liabilities Finance Lease, Interest On Lease Liability Finance Lease, Interest On Lease Liability Operating lease cost Operating Lease, Cost Short-term lease cost Short-term Lease, Cost Total lease cost Lease, Cost Early Exercised Employee Stock Option Early Exercised Employee Stock Option [Member] Early Exercised Employee Stock Option [Member] Issuance of common stock (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period Stock repurchased (in shares) Stock Repurchased During Period, Shares Common stock subject to repurchase (in shares) Share-based Compensation Arrangements by Share-based Payment Award, Options, Common Stock Subject to Repurchase, Shares Share-based Compensation Arrangements by Share-based Payment Award, Options, Common Stock Subject to Repurchase, Shares Fair value of shares subject to repurchase Share-based Compensation Arrangements by Share-based Payment Award, Options, Fair Value of Shares Subject to Repurchase Share-based Compensation Arrangements by Share-based Payment Award, Options, Fair Value of Shares Subject to Repurchase Property, Plant and Equipment [Abstract] Property and Equipment, Net Property, Plant and Equipment Disclosure [Text Block] Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] Unrecognized tax benefits at beginning of year Unrecognized Tax Benefits Increase in tax positions in prior years Unrecognized Tax Benefits, Increase Resulting from Prior Period Tax Positions Decrease in tax positions in prior years Unrecognized Tax Benefits, Decrease Resulting from Prior Period Tax Positions Additions based on tax positions in the current year Unrecognized Tax Benefits, Increase Resulting from Current Period Tax Positions Unrecognized tax benefits at end of year Fair Value Disclosures [Abstract] Fair Value Measurements Fair Value Disclosures [Text Block] Deferred tax assets: Deferred Tax Assets, Net [Abstract] Net operating loss carryforwards Deferred Tax Assets, Operating Loss Carryforwards Deferred revenue Deferred Tax Assets, Deferred Income Finance and operating lease liabilities Deferred Tax Asset, Finance And Operating Lease Liabilities Deferred Tax Asset, Finance And Operating Lease Liabilities Other reserves Deferred Tax Assets, Tax Deferred Expense, Reserves and Accruals, Other Gross deferred tax assets Deferred Tax Assets, Gross Valuation allowance Deferred Tax Assets, Valuation Allowance Total deferred tax assets, net of valuation allowance Deferred Tax Assets, Net of Valuation Allowance Deferred tax liability: Deferred Tax Liabilities, Net [Abstract] Goodwill Deferred Tax Liabilities, Goodwill Depreciable assets Deferred Tax Liabilities, Property, Plant and Equipment Finance and operating lease right-of-use assets Deferred Tax Liability, Finance And Operating Lease Right Of Use Assets Deferred Tax Liability, Finance And Operating Lease Right Of Use Assets Convertible senior notes Deferred Tax Liabilities, Convertible Debt Instruments Deferred Tax Liabilities, Convertible Debt Instruments Other liabilities and accruals Deferred Tax Liabilities, Deferred Expense, Reserves and Accruals Other liabilities and accruals Deferred Tax Assets, Tax Deferred Expense, Reserves and Accruals, Reserves Total deferred tax liability Deferred Tax Liabilities, Gross Net deferred tax liabilities Deferred Tax Liabilities, Net Net deferred tax assets Deferred Tax Assets, Net Equity [Abstract] Schedule of Stock by Class [Table] Schedule of Stock by Class [Table] Class of Stock [Axis] Class of Stock [Axis] Class of Stock [Domain] Class of Stock [Domain] Class A Common Stock Common Class A [Member] Class B Common Stock Common Class B [Member] Class of Stock [Line Items] Class of Stock [Line Items] Number of class of common stock Number of Class of Common Stock Number of Class of Common Stock Number of votes Common Stock, Voting Rights, Number Of Votes Common Stock, Voting Rights, Number Of Votes Period of automatic conversion after death of founder Common Stock, Conversion Feature, Period Of Automatic Conversion After Death Of Founder Common Stock, Conversion Feature, Period Of Automatic Conversion After Death Of Founder Percent of outstanding stock Common Stock, Conversion Feature, Percent of Outstanding Stock Common Stock, Conversion Feature, Percent of Outstanding Stock Common stock authorized (in shares) Common Stock, Shares Authorized Common stock, par value (in dollars per share) Common Stock, Par or Stated Value Per Share Common stock issued (in shares) Common Stock, Shares, Issued Common stock outstanding (in shares) Common Stock, Shares, Outstanding Revenue from Contract with Customer [Abstract] Revenue Revenue from Contract with Customer [Text Block] Operating Loss Carryforwards [Table] Operating Loss Carryforwards [Table] Geographical [Axis] Geographical [Axis] Geographical [Domain] Geographical [Domain] Ireland IRELAND United Kingdom UNITED KINGDOM Tax Credit Carryforward [Axis] Tax Credit Carryforward [Axis] Tax Credit Carryforward, Name [Domain] Tax Credit Carryforward, Name [Domain] Research Tax Credit Carryforward Research Tax Credit Carryforward [Member] Income Tax Authority [Axis] Income Tax Authority [Axis] Income Tax Authority [Domain] Income Tax Authority [Domain] Domestic Tax Authority Domestic Tax Authority [Member] State and Local Jurisdiction State and Local Jurisdiction [Member] Foreign Tax Authority Foreign Tax Authority [Member] Operating Loss Carryforwards [Line Items] Operating Loss Carryforwards [Line Items] Valuation allowance Operating loss carryforwards Operating Loss Carryforwards Tax credit carryforward, amount Tax Credit Carryforward, Amount Unrecognized tax benefits that would impact effective tax rate Unrecognized Tax Benefits that Would Impact Effective Tax Rate Undistributed earnings of foreign subsidiaries Undistributed Earnings of Foreign Subsidiaries Unrecognized deferred tax liability related to undistributed earnings of foreign subsidiaries Deferred Tax Liability Not Recognized, Amount of Unrecognized Deferred Tax Liability, Undistributed Earnings of Foreign Subsidiaries Significant change in unrecognized tax benefits within the next twelve months Significant Change in Unrecognized Tax Benefits is Reasonably Possible, Amount of Unrecorded Benefit 2021 Other Commitment, Due in Next Twelve Months 2022 Other Commitment, Due in Second Year 2023 Other Commitment, Due in Third Year 2024 Other Commitment, Due in Fourth Year 2025 Other Commitment, Due in Fifth Year Thereafter Other Commitment, Due after Fifth Year Total minimum payments Other Commitment Goodwill and Intangible Assets Disclosure [Abstract] Goodwill [Roll Forward] Goodwill [Roll Forward] Balance, beginning of the year Goodwill Increase in goodwill related to business combinations Goodwill, Acquired During Period Balance, end of the year Business Combinations [Abstract] Business Combinations Business Combination Disclosure [Text Block] Debt Disclosure [Abstract] Schedule of Long-term Debt Instruments [Table] Schedule of Long-term Debt Instruments [Table] Debt Instrument [Axis] Debt Instrument [Axis] Debt Instrument, Name [Domain] Debt Instrument, Name [Domain] 2024 Notes Convertible Notes Due 2024 [Member] Convertible Notes Due 2024 [Member] 2024 Notes Partial Repurchase 2024 Notes Partial Repurchase [Member] 2024 Notes Partial Repurchase [Member] Convertible Senior Notes, Liability Component Convertible Senior Notes, Liability Component [Member] Convertible Senior Notes, Liability Component [Member] 2026 Notes Convertible Notes Due 2026 [Member] Convertible Notes Due 2026 [Member] Long-term Debt, Type [Axis] Long-term Debt, Type [Axis] Long-term Debt, Type [Domain] Long-term Debt, Type [Domain] Convertible Debt Convertible Debt [Member] Debt Instrument [Line Items] Debt Instrument [Line Items] Principal Long-term Debt, Gross Unamortized debt discount Debt Instrument, Unamortized Discount Unamortized debt issuance costs Debt Issuance Costs, Gross Net carrying amount Long-term Debt Proceeds from borrowings on convertible senior notes, net of issuance costs Proceeds from Convertible Debt Less: Net carrying amount of the liability component associated with the 2024 Notes Partial Repurchase Debt Instrument, Convertible, Carrying Amount Of Liability Component Debt Instrument, Convertible, Carrying Amount Of Liability Component Loss from 2024 Notes Partial Repurchase Gain (Loss) on Extinguishment of Debt Remaining performance obligation, amount Revenue, Remaining Performance Obligation, Amount Remaining performance obligation, percentage Revenue, Remaining Performance Obligation, Percentage Performance obligation, expected timing of satisfaction, period Revenue, Remaining Performance Obligation, Expected Timing of Satisfaction, Period Schedule of Business Acquisitions, by Acquisition [Table] Schedule of Business Acquisitions, by Acquisition [Table] Finite-Lived Intangible Assets by Major Class [Axis] Finite-Lived Intangible Assets by Major Class [Axis] Finite-Lived Intangible Assets, Major Class Name [Domain] Finite-Lived Intangible Assets, Major Class Name [Domain] Developed Technology Technology-Based Intangible Assets [Member] Customer relationships Customer Relationships [Member] Business Acquisition [Axis] Business Acquisition [Axis] Business Acquisition, Acquiree [Domain] Business Acquisition, Acquiree [Domain] Realm Kingdom Merger Sub, Inc And Tightdb, Inc. Merger [Member] Kingdom Merger Sub, Inc and Tightdb, Inc. Merger Business Acquisition [Line Items] Business Acquisition [Line Items] Financial and tangible assets, net Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Financial And Tangible Assets Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Financial And Tangible Assets Identifiable intangible assets Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Intangible Assets, Other than Goodwill Deferred revenue Business Combination, Recognized Identifiable Assets Acquired and Liabilities Assumed, Current Liabilities, Deferred Revenue Goodwill (excluding deferred tax liability impact) Total purchase price Business Combination, Recognized Identifiable Assets Acquired, Goodwill, and Liabilities Assumed, Net Capitalized contract costs Capitalized Contract Cost, Net Capitalized contract cost, amortization Capitalized Contract Cost, Amortization Impairment loss for capitalized costs Capitalized Contract Cost, Impairment Loss Number of operating segments Number of Operating Segments Contract with customer, liability Contract with Customer, Liability Deferred revenue, percent Contract With Customer, Liability, Deferred Revenue, Percent Contract With Customer, Liability, Deferred Revenue, Percent Lessee, Lease, Description [Table] Lessee, Lease, Description [Table] Subsequent Event Type [Axis] Subsequent Event Type [Axis] Subsequent Event Type [Domain] Subsequent Event Type [Domain] Subsequent Event Subsequent Event [Member] Lease Arrangement, Type [Axis] Lease Arrangement, Type [Axis] Lease Arrangement, Type [Domain] Lease Arrangement, Type [Domain] NY Office Lease NY Office Lease [Member] NY Office Lease [Member] Operating Lease in New York Operating Lease in New York [Member] Operating Lease in New York [Member] Operating Lease in Texas Operating Lease in Texas [Member] Operating Lease in Texas [Member] Operating Lease in Australia Operating Lease in Australia [Member] Operating Lease in Australia [Member] Dublin Lease Dublin Lease [Member] Dublin Lease [Member] Lessee, Lease, Description [Line Items] Lessee, Lease, Description [Line Items] Rentable office space (in sqft) Finance Leases, Net Rentable Area Finance Leases, Net Rentable Area Term of contract Lessee, Finance Lease, Term of Contract Total minimum payments Finance Lease, Liability, Payment, Due Option to extend Lessee, Finance Lease, Option to Extend Rent expense Operating Leases, Rent Expense Operating lease, liability Operating Lease, Liability Letters of credit outstanding Letters of Credit Outstanding, Amount Area of leased space (in sq ft) Area of Real Estate Property Term of lease Lessee, Operating Lease, Term of Contract Lease not yet commenced, estimated base rent payments Lessee, Operating Lease, Lease Not Yet Commenced, Undiscounted Amount Lessee, Operating Lease, Lease Not Yet Commenced, Undiscounted Amount Statement of Stockholders' Equity [Abstract] Statement [Table] Statement [Table] Equity Components [Axis] Equity Components [Axis] Equity Component [Domain] Equity Component [Domain] Redeemable Convertible Preferred Stock Preferred Stock [Member] Class A and Class B Common Stock Common Stock [Member] Additional Paid-In Capital Additional Paid-in Capital [Member] Treasury Stock Treasury Stock [Member] Accumulated Other Comprehensive Loss AOCI Attributable to Parent [Member] Accumulated Deficit Retained Earnings [Member] Statement [Line Items] Statement [Line Items] Increase (Decrease) in Temporary Equity [Roll Forward] Increase (Decrease) in Temporary Equity [Roll Forward] Beginning Balance, Redeemable Convertible Preferred Stock (in shares) Temporary Equity, Shares Outstanding Beginning Balance, Redeemable Convertible Preferred Stock Temporary Equity, Carrying Amount, Attributable to Parent Exercise of preferred stock warrants (in shares) Temporary Equity, Stock Issued During Period, Shares, New Issues For Exercise Of Warrants Temporary Equity, Stock Issued During Period, Shares, New Issues For Exercise Of Warrants Exercise of preferred stock warrants Temporary Equity Issued During Period, Shares, New Issues For Exercise Of Warrants Temporary Equity Issued During Period, Shares, New Issues For Exercise Of Warrants Conversion of redeemable convertible preferred stock to common stock (in shares) Stock Issued During Period, Shares, Conversion of Convertible Securities Conversion of redeemable convertible preferred stock to common stock Stock Issued During Period, Value, Conversion of Convertible Securities Ending Balance, Redeemable Convertible Preferred Stock (in shares) Ending Balance, Redeemable Convertible Preferred Stock Increase (Decrease) in Stockholders' Equity [Roll Forward] Increase (Decrease) in Stockholders' Equity [Roll Forward] Common stock, beginning balance (in shares) Beginning balance Stockholders' Equity Attributable to Parent Cumulative effect of accounting change Cumulative Effect of New Accounting Principle in Period of Adoption Exercise of common stock warrants (in shares) Stock Issued During Period, Shares, New Issues for Exercise Of Warrants Stock Issued During Period, Shares, New Issues For Exercise Of Warrants Exercise of common stock warrants Stock Issued During Period, Value, New Issues For Exercise Of Warrants Stock Issued During Period, Value, New Issues For Exercise Of Warrants Stock option exercises (in shares) Stock option exercises Stock Issued During Period, Value, Stock Options Exercised Repurchase of early exercised options (in shares) Early Exercises, Stock Repurchased During Period, Shares Early Exercises, Stock Repurchased During Period, Shares Issuance of common stock upon initial public offering, net of offering costs (in shares) Stock Issued During Period, Shares, New Issues Issuance of common stock upon initial public offering, net of offering costs Stock Issued During Period, Value, New Issues Vesting of early exercised stock options Adjustments To Additional Paid In Capital, Early Exercise Of Stock Options Adjustments To Additional Paid In Capital, Early Exercise Of Stock Options Stock-based compensation APIC, Share-based Payment Arrangement, Increase for Cost Recognition Unrealized gain (loss) on available-for-sale securities Other Comprehensive Income (Loss), Available-for-sale Securities Adjustment, Net of Tax, Portion Attributable to Parent Foreign currency translation adjustment Other Comprehensive Income (Loss), Foreign Currency Transaction and Translation Adjustment, Net of Tax, Portion Attributable to Parent Vesting of restricted stock units (in shares) Stock Issued During Period, Shares, Restricted Stock Award, Gross Issuance of common stock under the Employee Stock Purchase Plan (in shares) Stock Issued During Period, Shares, Employee Stock Purchase Plans Issuance of common stock under the Employee Stock Purchase Plan Stock Issued During Period, Value, Employee Stock Purchase Plan Equity component of the 0.75% convertible senior notes due 2024 Adjustments to Additional Paid in Capital, Equity Component of Convertible Debt Purchase of capped calls Adjustments to Additional Paid in Capital, Purchase of Capped Calls for Convertible Note Hedges Adjustments to Additional Paid in Capital, Purchase of Capped Calls for Convertible Note Hedges Impact from 2024 Notes Partial Repurchase Adjustments to Additional Paid in Capital, Equity Component of Convertible Debt, Subsequent Adjustments Net loss Net Income (Loss) Attributable to Parent Common stock, ending balance (in shares) Ending balance Summary of Significant Accounting Policies Significant Accounting Policies [Text Block] Schedule of Acquired Finite-Lived Intangible Asset by Major Class [Table] Schedule of Acquired Finite-Lived Intangible Asset by Major Class [Table] Developed technology Developed Technology Rights [Member] Domain name Internet Domain Names [Member] Acquired Finite-Lived Intangible Assets [Line Items] Acquired Finite-Lived Intangible Assets [Line Items] Weighted average useful life Acquired Finite-lived Intangible Assets, Weighted Average Useful Life Amortization of intangible assets Amortization of Intangible Assets Contractual interest expense Interest Expense, Debt, Excluding Amortization Amortization of debt discount Amortization of Debt Discount (Premium) Amortization of issuance costs Amortization of Debt Issuance Costs Total Interest Expense, Debt Number of revenue sources Number of Revenue Sources Number of Revenue Sources Capitalized contract cost, amortization period Capitalized Contract Cost, Amortization Period Typical payment term period Revenue From Contract With Customer, Payment Term Revenue From Contract With Customer, Payment Term Schedule of other commitments Other Commitments [Table Text Block] Disaggregation of revenue Disaggregation of Revenue [Table Text Block] Statement of Cash Flows [Abstract] Cash flows from operating activities Net Cash Provided by (Used in) Operating Activities [Abstract] Adjustments to reconcile net loss to net cash provided by (used in) operating activities: Adjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract] Depreciation and amortization Depreciation, Depletion and Amortization Stock-based compensation Share-based Payment Arrangement, Noncash Expense Amortization of debt discount and issuance costs Amortization of Debt Issuance Costs and Discounts Amortization of finance right-of-use assets Amortization of operating right-of-use assets Operating Lease, Right-of-Use Asset, Amortization Operating Lease, Right-of-Use Asset, Amortization Non-cash interest on finance lease liabilities Non-Cash Interest On Build-To-Suit Lease Non-Cash Interest On Build-To-Suit Lease Deferred income taxes Deferred Income Taxes and Tax Credits Accretion of discount on short-term investments Accretion (Amortization) of Discounts and Premiums, Investments Change in fair value of warrant liability Fair Value Adjustment of Warrants Loss on early extinguishment of debt Change in operating assets and liabilities, net of the impact from the acquisition: Increase (Decrease) in Operating Capital [Abstract] Accounts receivable, net Increase (Decrease) in Accounts Receivable Prepaid expenses and other current assets Increase (Decrease) in Prepaid Expense and Other Assets Deferred commissions Increase (Decrease) in Deferred Charges Other long-term assets Increase (Decrease) in Other Noncurrent Assets Accounts payable Increase (Decrease) in Accounts Payable Deferred rent Increase (Decrease) in Deferred Liabilities Accrued liabilities Increase (Decrease) in Accrued Liabilities Operating lease liabilities Increase (Decrease) In Operating Lease Liability Increase (Decrease) In Operating Lease Liability Deferred revenue Increase (Decrease) in Contract with Customer, Liability Other liabilities, non-current Increase (Decrease) in Other Noncurrent Liabilities Net cash used in operating activities Net Cash Provided by (Used in) Operating Activities Cash flows from investing activities Net Cash Provided by (Used in) Investing Activities [Abstract] Purchases of property and equipment Payments to Acquire Property, Plant, and Equipment Acquisition, net of cash acquired Payments to Acquire Businesses, Net of Cash Acquired Proceeds from maturities of marketable securities Proceeds from Sale and Maturity of Debt Securities, Available-for-sale Purchases of marketable securities Payments to Acquire Marketable Securities Net cash used in investing activities Net Cash Provided by (Used in) Investing Activities Cash flows from financing activities Net Cash Provided by (Used in) Financing Activities [Abstract] Proceeds from exercise of stock options, including early exercised stock options Proceeds from Stock Options Exercised Proceeds from the issuance of common stock under the Employee Stock Purchase Plan Proceeds from Issuance of Common Stock Repurchase of early exercised stock options Payments for Repurchase of Common Stock Principal repayments of finance leases Finance Lease, Principal Payments Payments for 2024 Notes Partial Repurchase Payment for Debt Extinguishment or Debt Prepayment Cost Payment for purchase of capped calls Payments For Purchase Of Capped Calls Payments For Purchase Of Capped Calls Proceeds from tenant improvement allowance on build-to-suit lease Payments for (Proceeds from) Tenant Allowance Proceeds from initial public offering, net of underwriting discounts and commissions Proceeds from Issuance Initial Public Offering Proceeds from exercise of redeemable convertible preferred stock warrants Proceeds from Warrant Exercises Payment of initial public offering costs Payments of Stock Issuance Costs Net cash provided by financing activities Net Cash Provided by (Used in) Financing Activities Effect of exchange rate changes on cash, cash equivalents and restricted cash Effect of Exchange Rate on Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents Net increase (decrease) in cash, cash equivalents and restricted cash Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate Effect Cash, cash equivalents and restricted cash, beginning of year Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents Cash, cash equivalents and restricted cash, end of year Supplemental cash flow disclosure Additional Cash Flow Elements [Abstract] Cash paid during the period for: Supplemental Cash Flow Information [Abstract] Income taxes, net of refunds Income Taxes Paid, Net Interest expense, net Interest Paid, Excluding Capitalized Interest, Operating Activities Noncash investing and financing activities Noncash Investing and Financing Items [Abstract] Construction costs related to build-to-suit lease obligations Construction Costs, Build-To-Suit Lease Obligations Construction Costs, Build-To-Suit Lease Obligations Vesting of early exercised stock options Vesting Of Early Exercised Stock Options, Noncash Vesting Of Early Exercised Stock Options, Noncash Conversion of redeemable convertible preferred stock warrant liability to redeemable convertible preferred stock as a result of warrant exercise Stock Issued Conversion of redeemable convertible preferred stock to common stock Conversion of Stock, Amount Issued Debt issuance and capped call costs included in accounts payable and accrued liabilities Debt Issuance Costs Incurred During Noncash or Partial Noncash Transaction Purchases of property and equipment included in accounts payable and accrued liabilities Capital Expenditures Incurred but Not yet Paid Estimated fair value of office space under a build-to-suit lease Estimated Fair Value, Build-To-Suit Office Lease Estimated Fair Value, Build-To-Suit Office Lease Earnings Per Share [Abstract] Net Loss per Share Earnings Per Share [Text Block] Fair Value, Recurring and Nonrecurring [Table] Fair Value, Recurring and Nonrecurring [Table] Cash and Cash Equivalents [Axis] Cash and Cash Equivalents [Axis] Cash and Cash Equivalents [Domain] Cash and Cash Equivalents [Domain] Money market funds Money Market Funds [Member] U.S. government treasury securities US Treasury Securities [Member] Financial Instrument [Axis] Financial Instrument [Axis] Financial Instruments [Domain] Financial Instruments [Domain] Measurement Frequency [Axis] Measurement Frequency [Axis] Measurement Frequency [Domain] Measurement Frequency [Domain] Recurring Fair Value, Recurring [Member] Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Axis] Fair Value Hierarchy and NAV [Domain] Fair Value Hierarchy and NAV [Domain] Level 1 Fair Value, Inputs, Level 1 [Member] Level 2 Fair Value, Inputs, Level 2 [Member] Level 3 Fair Value, Inputs, Level 3 [Member] Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] Financial Assets: Assets, Fair Value Disclosure [Abstract] Cash and cash equivalents: Cash and Cash Equivalents [Abstract] Money market funds Cash and Cash Equivalents, Fair Value Disclosure Short-term investments: Short-term Investments [Abstract] U.S. government treasury securities Debt Securities, Available-for-sale Total financial assets Assets, Fair Value Disclosure Convertible Senior Notes Debt Disclosure [Text Block] Unbilled Receivables Contract with Customer, Asset, Net, Current Property, Plant and Equipment [Table] Property, Plant and Equipment [Table] Property, Plant and Equipment, Type [Axis] Property, Plant and Equipment, Type [Axis] Property, Plant and Equipment, Type [Domain] Property, Plant and Equipment, Type [Domain] Build-to-suit Building Improvements [Member] Adjustments for New Accounting Pronouncements [Axis] Adjustments for New Accounting Pronouncements [Axis] Type of Adoption [Domain] Type of Adoption [Domain] ASC 842 Accounting Standards Update 19-2016 [Member] Accounting Standards Update 2016-19 [Member] Property, Plant and Equipment [Line Items] Property, Plant and Equipment [Line Items] Rentable area (in sq ft) Operating Leases, Net Rentable Area Operating Leases, Net Rentable Area Property and equipment, net Property, Plant and Equipment, Net Depreciation and amortization, property, plant and equipment Depreciation And Amortization, Property, Plant and Equipment Depreciation And Amortization, Property, Plant and Equipment Lease, Cost Lease, Cost [Table Text Block] Assets And Liabilities, Lessee Assets And Liabilities, Lessee [Table Text Block] Assets And Liabilities, Lessee [Table Text Block] Finance Lease, Liability, Maturity Finance Lease, Liability, Maturity [Table Text Block] Lessee, Operating Lease, Liability, Maturity Lessee, Operating Lease, Liability, Maturity [Table Text Block] Schedule of future minimum lease payments for finance leases Schedule of Future Minimum Lease Payments for Capital Leases [Table Text Block] Schedule of future minimum rental payments for operating leases Schedule of Future Minimum Rental Payments for Operating Leases [Table Text Block] Other-than-temporary impairment charges Other-than-temporary Impairment Loss, Debt Securities, Available-for-sale Related Party Transactions [Abstract] Related party transactions Related Party Transaction, Amounts of Transaction Due to (from) related parties Related Party Transaction, Due from (to) Related Party Document Information [Abstract] Document Information [Abstract] Document Type Document Type Document Annual Report Document Annual Report Document Period End Date Document Period End Date Document Transition Report Document Transition Report Entity File Number Entity File Number Entity Registrant Name Entity Registrant Name Entity Incorporation, State or Country Code Entity Incorporation, State or Country Code Entity Tax Identification Number Entity Tax Identification Number Entity Address, Address Line One Entity Address, Address Line One Entity Address, Address Line Two Entity Address, Address Line Two Entity Address, City or Town Entity Address, City or Town Entity Address, State or Province Entity Address, State or Province Entity Address, Postal Zip Code Entity Address, Postal Zip Code City Area Code City Area Code Local Phone Number Local Phone Number Title of 12(b) Security Title of 12(b) Security Trading Symbol Trading Symbol Security Exchange Name Security Exchange Name Entity Well-known Seasoned Issuer Entity Well-known Seasoned Issuer Entity Voluntary Filers Entity Voluntary Filers Entity Current Reporting Status Entity Current Reporting Status Entity Interactive Data Current Entity Interactive Data Current Entity Filer Category Entity Filer Category Entity Emerging Growth Company Entity Emerging Growth Company Entity Small Business Entity Small Business Entity Shell Company Entity Shell Company Entity Public Float Entity Public Float Entity Central Index Key Entity Central Index Key Document Fiscal Year Focus Document Fiscal Year Focus Document Fiscal Period Focus Document Fiscal Period Focus Amendment Flag Amendment Flag Entity Common Stock, Shares Outstanding Entity Common Stock, Shares Outstanding Current Fiscal Year End Date Current Fiscal Year End Date Summary of US GAAP purchase price Schedule of Business Acquisitions, by Acquisition [Table Text Block] Schedule of purchase price allocation Schedule of Recognized Identified Assets Acquired and Liabilities Assumed [Table Text Block] Restricted Stock Units (RSUs) Restricted Stock Units (RSUs) [Member] Shares Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number of Shares [Roll Forward] Unvested - Beginning of period (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Number RSUs granted (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period RSUs vested (in shares) RSUs forfeited and canceled (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeited in Period Unvested - End of period (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract] Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Nonvested, Weighted Average Grant Date Fair Value [Abstract] Unvested - Beginning of period (in dollars per share) RSUs granted (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in Period, Weighted Average Grant Date Fair Value RSUs vested (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Vested in Period, Weighted Average Grant Date Fair Value RSUs forfeited and canceled (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Forfeitures, Weighted Average Grant Date Fair Value Unvested - End of period (in dollars per share) Goodwill and Acquired Intangible Assets, Net Intangible Assets Disclosure [Text Block] Employee Stock Option Share-based Payment Arrangement, Option [Member] Statistical Measurement [Axis] Statistical Measurement [Axis] Statistical Measurement [Domain] Statistical Measurement [Domain] Minimum Minimum [Member] Maximum Maximum [Member] Expected term (in years) Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Term Expected volatility, minimum Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Volatility Rate, Minimum Expected volatility, maximum Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Volatility Rate, Maximum Risk-free interest rate, minimum (as a percent) Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Risk Free Interest Rate, Minimum Risk-free interest rate, maximum (as a percent) Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Risk Free Interest Rate, Maximum Dividend yield (as a percent) Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Expected Dividend Rate Options granted (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, Gross Employee Stock Purchase Plan Employee Stock [Member] Risk-free interest rate (as a percent) Share-based Compensation Arrangement by Share-based Payment Award, Fair Value Assumptions, Risk Free Interest Rate Gross Carrying Value Finite-Lived Intangible Assets, Gross Accumulated Amortization Finite-Lived Intangible Assets, Accumulated Amortization Net Book Value Finite-Lived Intangible Assets, Net Numerator: Net Income (Loss) Available to Common Stockholders, Basic [Abstract] Net loss Denominator: Earnings Per Share, Basic and Diluted, Other Disclosures [Abstract] Weighted-average shares used to compute net loss per share, basic and diluted (in shares) Weighted Average Number of Shares Outstanding, Basic and Diluted Net loss per share, basic and diluted (in dollars per share) Earnings Per Share, Basic and Diluted Advertising costs Advertising Expense Shares Available for Grant Share Based Compensation Arrangement by Share-based Payment Award, Shares Available for Grant [Roll Forward] Share Based Compensation Arrangement by Share-based Payment Award, Shares Available for Grant [Roll Forward] Balance - beginning of period (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Available for Grant Authorized (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Number of Additional Shares Authorized Early exercised shares repurchased (in shares) Share Based Compensation By Share Based Payment Award, Early Exercises in Period, Shares Available for Grant Share Based Compensation By Share Based Payment Award, Early Exercises in Period, Shares Available for Grant Options forfeited and expired (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period RSUs granted (in shares) RSUs forfeited and canceled (in shares) Balance - end of period (in shares) Shares Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding [Roll Forward] Balance - beginning of period (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Number Options exercised (in shares) Options forfeited and expired (in shares) Balance - end of period (in shares) Options vested and exercisable (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Number Options vested and exercisable - Stock options vested and expected to vest (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested and Expected to Vest, Exercisable, Number Weighted- Average Exercise Price Per Share Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price [Abstract] Balance - beginning of period (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Exercise Price Options exercised (in dollars per share) Share-based Compensation Arrangements by Share-based Payment Award, Options, Exercises in Period, Weighted Average Exercise Price Options forfeited and expired (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Options, Forfeitures and Expirations in Period, Weighted Average Exercise Price Balance - end of period (in dollars per share) Options vested and exercisable (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Weighted Average Exercise Price Options vested and exercisable - Stock options vested and expected to vest (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested and Expected to Vest, Outstanding, Weighted Average Exercise Price Weighted- Average Remaining Contractual Term (In Years) Share Based Compensation Arrangement by Share-based Payment Award, Weighted Average Remaining Contractual Term [Roll Forward] Share Based Compensation Arrangement by Share-based Payment Award, Weighted Average Remaining Contractual Term [Roll Forward] Balance Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Weighted Average Remaining Contractual Term Options vested and exercisable Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Weighted Average Remaining Contractual Term Stock options vested and expected to vest Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested and Expected to Vest, Outstanding, Weighted Average Remaining Contractual Term Aggregate Intrinsic Value Share Based Compensation Arrangement by Share-based Payment Award, Aggregate Intrinsic Value [Roll Forward] Share Based Compensation Arrangement by Share-based Payment Award, Aggregate Intrinsic Value [Roll Forward] Balance Share-based Compensation Arrangement by Share-based Payment Award, Options, Outstanding, Intrinsic Value Options vested and exercisable Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercisable, Intrinsic Value Stock options vested and expected to vest, intrinsic value Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested and Expected to Vest, Outstanding, Aggregate Intrinsic Value Income Taxes Income Tax Disclosure [Text Block] Concentration Risk [Table] Concentration Risk [Table] Concentration Risk Type [Axis] Concentration Risk Type [Axis] Concentration Risk Type [Domain] Concentration Risk Type [Domain] Geographic Concentration Risk Geographic Concentration Risk [Member] Concentration Risk Benchmark [Axis] Concentration Risk Benchmark [Axis] Concentration Risk Benchmark [Domain] Concentration Risk Benchmark [Domain] Revenue from Contract with Customer Revenue from Contract with Customer Benchmark [Member] United States UNITED STATES Concentration Risk [Line Items] Concentration Risk [Line Items] Disaggregation of Revenue [Abstract] Disaggregation of Revenue [Abstract] Concentration risk, percentage Concentration Risk, Percentage Stockholders’ Equity (Deficit) Stockholders' Equity Note Disclosure [Text Block] Balance Sheet Location [Axis] Balance Sheet Location [Axis] Balance Sheet Location [Domain] Balance Sheet Location [Domain] Equity Equity [Member] Debt Instrument, Redemption, Period [Axis] Debt Instrument, Redemption, Period [Axis] Debt Instrument, Redemption, Period [Domain] Debt Instrument, Redemption, Period [Domain] Redemption Period 1 Debt Instrument, Redemption, Period One [Member] Redemption Period 2 Debt Instrument, Redemption, Period Two [Member] Additional Convertible Senior Notes Due 2026 Additional Convertible Senior Notes Due 2026 [Member] Additional Convertible Senior Notes Due 2026 [Member] Convertible Senior Notes, Equity Component Convertible Senior Notes, Equity Component [Member] Convertible Senior Notes, Equity Component [Member] Convertible Senior Notes, Interest Component Convertible Senior Notes, Interest Component [Member] Convertible Senior Notes, Interest Component [Member] Convertible Senior Notes Due 2026, Liability Component Convertible Senior Notes Due 2026, Liability Component [Member] Convertible Senior Notes Due 2026, Liability Component [Member] Convertible Senior Notes Due 2026, Equity Component Convertible Senior Notes Due 2026, Equity Component [Member] Convertible Senior Notes Due 2026, Equity Component [Member] Face amount of debt Debt Instrument, Face Amount Interest rate Debt Instrument, Interest Rate, Stated Percentage Effective discount rate Fair Value, Cash Consideration, Effective Discount Rate Fair Value, Cash Consideration, Effective Discount Rate Convertible debt, conversion ratio Debt Instrument, Convertible, Conversion Ratio Convertible debt, conversion ratio denominator Debt Instrument, Convertible, Conversion Ratio, Denominator Debt Instrument, Convertible, Conversion Ratio, Denominator Initial conversion price (in dollars per share) Debt Instrument, Convertible, Conversion Price Threshold trading days Debt Instrument, Convertible, Threshold Trading Days Consecutive threshold trading days Debt Instrument, Convertible, Threshold Consecutive Trading Days Threshold percentage of stock price trigger Debt Instrument, Convertible, Threshold Percentage of Stock Price Trigger Trading price as a percentage of stock price and debt conversion rate Debt Instrument, Convertible, Trading Price As A Percentage Of Stock Price And Debt Conversion Rate Debt Instrument, Convertible, Trading Price As A Percentage Of Stock Price And Debt Conversion Rate Percentage of principal amount redeemed Debt Instrument, Redemption Price, Percentage of Principal Amount Redeemed Carrying amount of convertible debt equity component Debt Instrument, Convertible, Gross Amount of Equity Component Debt Instrument, Convertible, Gross Amount of Equity Component Debt issuance costs Effective interest rate Debt Instrument, Interest Rate, Effective Percentage Fair value of convertible debt Convertible Debt, Fair Value Disclosures Net deferred tax liabilities Convertible debt schedules Convertible Debt [Table Text Block] Interest expense related to Notes Interest Income and Interest Expense Disclosure [Table Text Block] Schedule of basic and diluted earnings (loss) per share Schedule of Earnings Per Share, Basic and Diluted [Table Text Block] Schedule of antidilutive securities excluded from computation of earnings per share Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block] United States Income (Loss) from Continuing Operations before Income Taxes, Domestic Foreign Income (Loss) from Continuing Operations before Income Taxes, Foreign Loss before provision for (benefit from) income taxes Income (Loss) from Continuing Operations before Income Taxes, Noncontrolling Interest Restricted cash Restricted Cash Leases Lessee, Finance Leases [Text Block] Leases Lessee, Operating Leases [Text Block] Property, plant and equipment Property, Plant and Equipment [Table Text Block] Reserved for future issuance (in shares) Share-based Compensation Arrangement by Share-based Payment Award, Number of Shares Authorized Maximum employee contribution rate Share-based Compensation Arrangement by Share-based Payment Award, Maximum Employee Subscription Rate Duration of separate offering periods Share-based Compensation Arrangement by Share-based Payment Award, Duration Of Offering Periods Share-based Compensation Arrangement by Share-based Payment Award, Duration Of Offering Periods Purchase price of common stock, as a percent Share-based Compensation Arrangement by Share-based Payment Award, Purchase Price of Common Stock, Percent Shares issued (in shares) Share-based Payment Arrangement, Nonvested Award, Excluding Option, Cost Not yet Recognized, Amount Share-based Payment Arrangement, Nonvested Award, Excluding Option, Cost Not yet Recognized, Amount Computer and office equipment Computer And Office Equipment [Member] Computer And Office Equipment [Member] Purchased software Software and Software Development Costs [Member] Servers Computer Equipment [Member] Furniture and fixtures Furniture and Fixtures [Member] Building Building [Member] Useful life Property, Plant and Equipment, Useful Life Current: Current Income Tax Expense (Benefit), Continuing Operations [Abstract] Federal Current Federal Tax Expense (Benefit) State Current State and Local Tax Expense (Benefit) Foreign Current Foreign Tax Expense (Benefit) Total Current Income Tax Expense (Benefit) Deferred: Deferred Income Tax Expense (Benefit), Continuing Operations [Abstract] Federal Deferred Federal Income Tax Expense (Benefit) State Deferred State and Local Income Tax Expense (Benefit) Foreign Deferred Foreign Income Tax Expense (Benefit) Total Deferred Income Tax Expense (Benefit) Provision for (benefit from) income taxes Income Tax Expense (Benefit) Subsequent Event [Table] Subsequent Event [Table] Sydney Office Sydney Office [Member] Sydney Office [Member] Subsequent Event [Line Items] Subsequent Event [Line Items] Weighted-average grant date fair value (in dollars per share) Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, Weighted Average Grant Date Fair Value Intrinsic value Share-based Compensation Arrangement by Share-based Payment Award, Options, Exercises in Period, Intrinsic Value Stock options vested, fair value Share-based Compensation Arrangement by Share-based Payment Award, Options, Vested in Period, Fair Value Share-based compensation cost not yet recognized Share-based Payment Arrangement, Nonvested Award, Option, Cost Not yet Recognized, Amount Share-based compensation, period for recognition Share-based Payment Arrangement, Nonvested Award, Cost Not yet Recognized, Period for Recognition Capitalized computer software costs Capitalized Computer Software, Additions Organization, Consolidation and Presentation of Financial Statements [Abstract] Organization and Description of Business Organization, Consolidation and Presentation of Financial Statements Disclosure [Text Block] Statement of Comprehensive Income [Abstract] Other comprehensive income (loss), net of tax: Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent [Abstract] Unrealized gain (loss) on available-for-sale securities Foreign currency translation adjustment Other comprehensive income (loss) Other Comprehensive Income (Loss), Net of Tax, Portion Attributable to Parent Total comprehensive loss Comprehensive Income (Loss), Net of Tax, Attributable to Parent Option Indexed to Issuer's Equity, Equity [Table] Option Indexed to Issuer's Equity, Equity [Table] Option Indexed to Issuer's Equity [Axis] Option Indexed to Issuer's Equity [Axis] Option Indexed to Issuer's Equity, Type [Domain] Option Indexed to Issuer's Equity, Type [Domain] Capped Calls Call Option [Member] Option Indexed to Issuer's Equity [Line Items] Option Indexed to Issuer's Equity [Line Items] Strike price (in dollars per share) Option Indexed to Issuer's Equity, Strike Price Cap price (in dollars per share) Option Indexed To Issuer's Equity, Cap Price Option Indexed To Issuer's Equity, Cap Price Underlying capped calls (in shares) Option Indexed to Issuer's Equity, Shares Purchase of capped calls Cash paid for amounts included in the measurement of lease liabilities: Cash Paid For Amounts Included In The Measurement Of Lease Liabilities [Abstract] Cash Paid For Amounts Included In The Measurement Of Lease Liabilities [Abstract] Operating cash flows from finance lease Finance Lease, Interest Payment on Liability Operating cash flows from operating leases Operating Lease, Payments Financing cash flows from finance lease Right-of-use assets obtained in exchange for lease obligations: Right-of-use assets obtained in exchange for lease obligations [Abstract] Right-of-use assets obtained in exchange for lease obligations [Abstract] Finance lease Right-of-Use Asset Obtained in Exchange for Finance Lease Liability Operating leases Right-of-Use Asset Obtained in Exchange for Operating Lease Liability Weighted-average remaining lease term (in years): Weighted average remaining lease term: [Abstract] Weighted average remaining lease term: [Abstract] Finance lease Finance Lease, Weighted Average Remaining Lease Term Operating leases Operating Lease, Weighted Average Remaining Lease Term Weighted-average discount rate: Weighted average discount rate [Abstract] Weighted average discount rate [Abstract] Finance lease Finance Lease, Weighted Average Discount Rate, Percent Operating leases Operating Lease, Weighted Average Discount Rate, Percent Schedule of financial assets and liabilities measured at fair value on a recurring basis Schedule of Fair Value, Assets and Liabilities Measured on Recurring Basis [Table Text Block] Finance Lease Finance Lease, Liability, Payment, Due [Abstract] 2021 Finance Lease, Liability, Payments, Remainder of Fiscal Year 2022 Finance Lease, Liability, Payments, Due Year Two 2023 Finance Lease, Liability, Payments, Due Year Three 2024 Finance Lease, Liability, Payments, Due Year Four 2025 Finance Lease, Liability, Payments, Due Year Five Thereafter Finance Lease, Liability, Payments, Due after Year Five Total minimum payments Less imputed interest Finance Lease, Liability, Undiscounted Excess Amount Present value of future minimum lease payments Finance Lease, Liability Less current obligations under leases Finance Lease, Liability, Current Non-current lease obligations Finance Lease, Liability, Noncurrent Operating Leases Lessee, Operating Lease, Liability, Payment, Due [Abstract] 2021 Lessee, Operating Lease, Liability, Payments, Remainder of Fiscal Year 2022 Lessee, Operating Lease, Liability, Payments, Due Year Two 2023 Lessee, Operating Lease, Liability, Payments, Due Year Three 2024 Lessee, Operating Lease, Liability, Payments, Due Year Four 2025 Lessee, Operating Lease, Liability, Payments, Due Year Five Thereafter Lessee, Operating Lease, Liability, Payments, Due after Year Five Total minimum payments Lessee, Operating Lease, Liability, Payments, Due Less imputed interest Lessee, Operating Lease, Liability, Undiscounted Excess Amount Present value of future minimum lease payments Less current obligations under leases Operating Lease, Liability, Current Operating lease liabilities, non-current Operating Lease, Liability, Noncurrent Equity Incentive Plans Share-based Payment Arrangement [Text Block] New Accounting Pronouncements or Change in Accounting Principle [Table] New Accounting Pronouncements or Change in Accounting Principle [Table] New Accounting Pronouncements or Change in Accounting Principle [Line Items] New Accounting Pronouncements or Change in Accounting Principle [Line Items] Operating lease right-of-use assets Operating Lease, Right-of-Use Asset Deferred rent liability Deferred Rent Liability Deferred Rent Liability Finance lease, right-of-use asset Finance Lease, Right-of-Use Asset Finance lease, liability Financing Lease Capital Leases, Future Minimum Payments, Net Minimum Payments, Fiscal Year Maturity [Abstract] 2020 Capital Leases, Future Minimum Payments Due, Next Twelve Months 2021 Capital Leases, Future Minimum Payments Due in Two Years 2022 Capital Leases, Future Minimum Payments Due in Three Years 2023 Capital Leases, Future Minimum Payments Due in Four Years 2024 Capital Leases, Future Minimum Payments Due in Five Years Thereafter Capital Leases, Future Minimum Payments Due Thereafter Total minimum payments Capital Leases, Future Minimum Payments Due Operating Leases Operating Leases, Future Minimum Payments Due, Fiscal Year Maturity [Abstract] 2020 Operating Leases, Future Minimum Payments Due, Next Twelve Months 2021 Operating Leases, Future Minimum Payments, Due in Two Years 2022 Operating Leases, Future Minimum Payments, Due in Three Years 2023 Operating Leases, Future Minimum Payments, Due in Four Years 2024 Operating Leases, Future Minimum Payments, Due in Five Years Thereafter Operating Leases, Future Minimum Payments, Due Thereafter Total minimum payments Operating Leases, Future Minimum Payments Due Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table] Schedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table] Antidilutive Securities [Axis] Antidilutive Securities [Axis] Antidilutive Securities, Name [Domain] Antidilutive Securities, Name [Domain] Redeemable convertible preferred stock (as converted) Redeemable Convertible Preferred Stock [Member] Redeemable convertible preferred stock warrants (as converted) Warrants and Rights Subject to Mandatory Redemption [Member] Common stock warrants Warrant [Member] Stock options to purchase common stock Unvested restricted stock units Early exercised stock options Shares underlying the conversion spread in the 2024 Notes Convertible Debt Securities [Member] Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] Antidilutive Securities Excluded from Computation of Earnings Per Share [Line Items] Antidilutive securities excluded from computation of earnings per share (in shares) Antidilutive Securities Excluded from Computation of Earnings Per Share, Amount Statement of Financial Position [Abstract] Current assets: Assets, Current [Abstract] Allowance for doubtful accounts Accounts Receivable, Allowance for Credit Loss, Current Stockholders’ equity: Stockholders' Equity Attributable to Parent [Abstract] Treasury stock (in shares) Treasury Stock, Shares Average treasury stock repurchase price (in dollars per share) Treasury Stock Acquired, Average Cost Per Share Schedule of goodwill Schedule of Goodwill [Table Text Block] Gross carrying amount and accumulated amortization of intangible assets Schedule of Finite-Lived Intangible Assets [Table Text Block] Future amortization expense related to intangible assets Schedule of Finite-Lived Intangible Assets, Future Amortization Expense [Table Text Block] Schedule of Earnings Per Share, Basic, by Common Class, Including Two Class Method [Table] Schedule of Earnings Per Share, Basic, by Common Class, Including Two Class Method [Table] Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items] Earnings Per Share, Basic, by Common Class, Including Two Class Method [Line Items] Shares issuable upon conversion (in shares) Debt Conversion, Convertible Instrument, Shares Issuable Debt Conversion, Convertible Instrument, Shares Issuable Average market price Debt Instrument, Convertible, Conversion Price, Average Market Price Debt Instrument, Convertible, Conversion Price, Average Market Price Commitments and Contingencies Commitments and Contingencies Disclosure [Text Block] Goodwill impairment Goodwill, Impairment Loss Income Statement [Abstract] Product and Service [Axis] Product and Service [Axis] Product and Service [Domain] Product and Service [Domain] Subscription License [Member] Services Service [Member] Revenue: Revenues [Abstract] Total revenue Revenue from Contract with Customer, Excluding Assessed Tax Cost of revenue: Cost of Revenue [Abstract] Total cost of revenue Cost of Goods and Services Sold Gross profit Gross Profit Operating expenses: Operating Expenses [Abstract] Sales and marketing Selling and Marketing Expense Research and development Research and Development Expense General and administrative General and Administrative Expense Total operating expenses Operating Expenses Loss from operations Operating Income (Loss) Other income (expense): Other Nonoperating Income (Expense) [Abstract] Interest income Investment Income, Net Interest expense Interest Expense Other income (expense), net Other Nonoperating Income (Expense) Provision for (benefit from) income taxes Net loss Net loss per share, basic and diluted - (in dollars per share) Weighted-average shares used to compute net loss per share, basic and diluted (in shares) Award requisite service period Share-based Compensation Arrangement by Share-based Payment Award, Award Requisite Service Period Stock Option Repricing Stock Option Repricing [Member] Stock Option Repricing [Member] Title of Individual [Axis] Title of Individual [Axis] Title of Individual [Domain] Title of Individual [Domain] Executive Officer Executive Officer [Member] Weighted average exercise price (in dollars per share) Share-based Payment Arrangement, Option, Exercise Price Range, Outstanding, Weighted Average Exercise Price Options outstanding (in shares) Compensation cost Share-based Payment Arrangement, Plan Modification, Incremental Cost Purchase price pursuant to the merger agreement Payments to Acquire Businesses, Gross Estimated cash amount Payments To Acquire Businesses, Excess Cash Amount Payments To Acquire Businesses, Excess Cash Amount Downward closing working capital adjustment Business Combination, Consideration Transferred, Liabilities Incurred Income Statement Location [Axis] Income Statement Location [Axis] Income Statement Location [Domain] Income Statement Location [Domain] Cost of revenue—subscription Cost of Revenue - Subscription [Member] Cost of Revenue - Subscription [Member] Cost of revenue—services Cost of Revenue - Services [Member] Cost of Revenue - Services [Member] Sales and marketing Selling and Marketing Expense [Member] Research and development Research and Development Expense [Member] General and administrative General and Administrative Expense [Member] Total stock-based compensation expense Consideration transferred Business Combination, Consideration Transferred Number of acquired finite-lived intangible assets Number Of Acquired Finite-Lived Intangible Assets Number Of Acquired Finite-Lived Intangible Assets Goodwill expected to be tax deductible Business Acquisition, Goodwill, Expected Tax Deductible Amount Goodwill adjustment Goodwill, Purchase Accounting Adjustments Goodwill resulting from deferred tax liabilities Acquisition-related costs Business Combination, Acquisition Related Costs Schedule of stock option activity Share-based Payment Arrangement, Option, Activity [Table Text Block] Schedule of RSU activity Schedule of Nonvested Restricted Stock Units Activity [Table Text Block] Schedule of stock option valuation assumptions Schedule of Share-based Payment Award, Stock Options, Valuation Assumptions [Table Text Block] Schedule of ESPP valuation assumptions Schedule of Share-based Payment Award, Employee Stock Purchase Plan, Valuation Assumptions [Table Text Block] Schedule of stock-based compensation expense recognized in consolidated statements of operations Share-based Payment Arrangement, Expensed and Capitalized, Amount [Table Text Block] Reconciliation of cash, cash equivalents and restricted cash within the consolidated balance sheets to the amounts shown in the statements of cash flows above: Cash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents [Abstract] Cash and cash equivalents Cash and Cash Equivalents, at Carrying Value Restricted cash, non-current Restricted Cash, Current Total cash, cash equivalents and restricted cash Leasehold improvements Leasehold Improvements [Member] Construction in process Construction in Progress [Member] Finance lease right-of-use assets Leaseholds and Leasehold Improvements [Member] Total property and equipment Property, Plant and Equipment, Gross Less: accumulated depreciation and amortization Accumulated Depreciation, Depletion and Amortization, Property, Plant, and Equipment Property and equipment, net Income tax benefit at statutory rate Effective Income Tax Rate Reconciliation at Federal Statutory Income Tax Rate, Amount State taxes, net of federal benefit Effective Income Tax Rate Reconciliation, State and Local Income Taxes, Amount Impact of foreign income taxes Effective Income Tax Rate Reconciliation, Foreign Income Tax Rate Differential, Amount Stock based compensation Effective Income Tax Rate Reconciliation, Nondeductible Expense, Share-based Payment Arrangement, Amount Non-deductible expenses Effective Income Tax Rate Reconciliation, Nondeductible Expense, Other, Amount Change in valuation allowance Effective Income Tax Rate Reconciliation, Change in Deferred Tax Assets Valuation Allowance, Amount Research and development credits Effective Income Tax Rate Reconciliation, Tax Credit, Research, Amount Prior year true ups Effective Income Tax Rate Reconciliation, Prior Year Income Taxes, Amount Change in tax rate due to the Tax Act Effective Income Tax Rate Reconciliation, Change in Enacted Tax Rate, Amount Other Effective Income Tax Rate Reconciliation, Other Adjustments, Amount Disaggregation of Revenue [Table] Disaggregation of Revenue [Table] Americas Americas [Member] EMEA EMEA [Member] Asia Pacific Asia Pacific [Member] MongoDB Atlas-related MongoDB Atlas Related [Member] MongoDB Atlas Related [Member] Other subscription Other Subscription [Member] Other Subscription [Member] Disaggregation of Revenue [Line Items] Disaggregation of Revenue [Line Items] Total 2021 Finite-Lived Intangible Assets, Amortization Expense, Next Twelve Months 2022 Finite-Lived Intangible Assets, Amortization Expense, Year Two 2023 Finite-Lived Intangible Assets, Amortization Expense, Year Three 2024 Finite-Lived Intangible Assets, Amortization Expense, Year Four 2025 Finite-Lived Intangible Assets, Amortization Expense, Year Five Finance Lease: Finance Leases [Abstract] Finance Leases [Abstract] Property and equipment, net Other accrued liabilities (current) Other liabilities, non-current Operating Leases: Operating Leases [Abstract] Operating Leases [Abstract] Operating lease liabilities (current) Operating lease liabilities, non-current Assets Assets [Abstract] Short-term investments Debt Securities, Available-for-sale, Current Accounts receivable, net of allowance for doubtful accounts of $2,515 and $1,539 as of January 31, 2020 and 2019, respectively Accounts Receivable, after Allowance for Credit Loss, Current Deferred commissions Deferred Costs, Current Prepaid expenses and other current assets Prepaid Expense and Other Assets, Current Total current assets Assets, Current Goodwill Acquired intangible assets, net Deferred tax assets Deferred Income Tax Assets, Net Other assets Other Assets, Noncurrent Total assets Assets Liabilities and Stockholders’ Equity Liabilities and Equity [Abstract] Current liabilities: Liabilities, Current [Abstract] Accounts payable Accounts Payable, Current Accrued compensation and benefits Employee-related Liabilities, Current Operating lease liabilities Other accrued liabilities Accrued Liabilities, Current Deferred revenue Contract with Customer, Liability, Current Total current liabilities