Convertible Senior Notes - Additional Information (Details)
1 Months Ended 3 Months Ended 6 Months Ended
Sep. 30, 2020
USD ($)
Sep. 24, 2020
USD ($)
d
$ / shares
Sep. 30, 2021
USD ($)
d
$ / shares
shares
Jan. 31, 2018
USD ($)
d
$ / shares
shares
Jan. 31, 2022
USD ($)
d
$ / shares
shares
Jan. 31, 2022
USD ($)
$ / shares
Jan. 31, 2021
USD ($)
Oct. 31, 2021
USD ($)
Sep. 22, 2021
USD ($)
Sep. 15, 2021
USD ($)
Jul. 31, 2021
USD ($)
Debt Instrument [Line Items]                      
Payments for unwinding of warrants           $ (18,390,000) $ 0        
Proceeds from unwinding of convertible note hedges           39,880,000 0        
Loss on debt extinguishment           (64,910,000) 0        
Proceeds from the issuance of convertible notes, net of issuance costs           89,128,000 $ 723,617,000        
Derivative liability         $ 0 0   $ 0   $ 698,213,000 $ 500,175,000
2023 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Loss on debt extinguishment           $ 64,900,000          
Number of securities called by warrants or rights (in shares) | shares       11,800,000              
Payments for convertible note hedges       $ 143,200,000              
Exercise price of warrants (in dollars per share) | $ / shares       $ 73.46 $ 73.46 $ 73.46          
Proceeds from issuance of warrants       $ 88,000,000.0              
Transaction cost       $ 55,200,000              
Dilutive effect of $10 increase in share price (in shares) | shares         400,000            
Dilutive effect of warrants (in shares) | shares         2,100,000            
Share price threshold for dilutive effect of warrants (in dollars per share) | $ / shares         $ 83.46 83.46          
2023 Convertible Senior Notes | Common Class A                      
Debt Instrument [Line Items]                      
Share price (in dollars per share) | $ / shares         $ 27.34 $ 27.34          
2027 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Interest rate, stated percentage         0.25% 0.25%          
Convertible Debt | 2023 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Interest rate, stated percentage       0.00% 0.00% 0.00%          
Face amount       $ 575,000,000.0              
Principal amount       575,000,000 $ 145,704,000 $ 145,704,000         575,000,000
Debt outstanding                 $ 145,700,000    
Convertible debt     $ 416,500,000 $ 75,000,000.0              
Repurchase amount     12,800,000                
Proceeds from unwind transactions     21,500,000                
Payments for unwinding of warrants     (18,400,000)                
Proceeds from unwinding of convertible note hedges     $ 39,900,000                
Conversion ratio       2,047.0500              
Conversion price (in dollars per share) | $ / shares       $ 48.85              
Threshold trading days | d       20 20            
Threshold consecutive trading days | d       30 30            
Threshold percentage of stock price trigger       130.00% 130.00%            
Redemption price, percentage       100.00%              
Unamortized discount, net       $ 10,781,000              
Less: other issuance costs       707,000              
Transaction costs attributable to equity component                     3,000,000.0
Debt instrument, term         11 months            
Payments for convertible note hedges       143,175,000              
Proceeds from issuance of warrants       $ 87,975,000              
Convertible Debt | 2023 Convertible Senior Notes | Common Class A                      
Debt Instrument [Line Items]                      
Threshold percentage of stock price trigger       98.00%              
Convertible Debt | 2026 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Interest rate, stated percentage   2.50%     2.50% 2.50%          
Face amount $ 750,000,000.0                    
Principal amount         $ 750,000,000 $ 750,000,000         $ 750,000,000
Conversion ratio   0.036036                  
Conversion price (in dollars per share) | $ / shares   $ 27.75 $ 27.75                
Threshold trading days | d   20                  
Threshold consecutive trading days | d   30                  
Threshold percentage of stock price trigger   150.00%                  
Redemption price, percentage   100.00%                  
Debt instrument, term           4 years 7 months 6 days          
Proceeds from the issuance of convertible notes, net of issuance costs 723,700,000                    
Payments of debt issuance costs $ 26,300,000                    
Debt instrument, principal amount for conversion into common stock   $ 1,000                  
Derivative liability   $ 230,900,000 $ 698,200,000                
Convertible Debt | 2027 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Interest rate, stated percentage     0.25%   0.25% 0.25%          
Face amount     $ 575,000,000                
Principal amount         $ 575,000,000 $ 575,000,000          
Convertible debt     477,300,000                
Debt instrument for cash, net     88,400,000                
Notes for cash     97,700,000                
Repurchase amount     $ 14,700,000                
Conversion ratio     17.3192                
Conversion price (in dollars per share) | $ / shares     $ 57.74                
Threshold trading days | d     20                
Threshold consecutive trading days | d     30                
Redemption price, percentage     100.00%                
Debt instrument, term           5 years 8 months 12 days          
Debt instrument, principal amount for conversion into common stock     $ 1,000                
Convertible Debt | 2027 Convertible Senior Notes | Minimum                      
Debt Instrument [Line Items]                      
Threshold percentage of stock price trigger     130.00%                
Convertible Debt | 2027 Convertible Senior Notes | Common Class A                      
Debt Instrument [Line Items]                      
Repurchase amount     $ 58,500,000                
Number of share repurchase | shares     1,400,000                
Convertible Debt | 2027 Convertible Senior Notes | Common Class A | Maximum                      
Debt Instrument [Line Items]                      
Threshold percentage of stock price trigger     98.00%                
Convertible Debt | Exchange Transactions | 2023 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Face amount                 416,500,000    
Convertible Debt | Exchange Transactions | 2027 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Face amount                 477,300,000    
Convertible Debt | Cash Transaction | 2023 Convertible Senior Notes                      
Debt Instrument [Line Items]                      
Repurchase amount                 $ 12,800,000