Fair Value Measurements - Schedule of Assets are Measured at Fair Value on Recurring Basis (Details) - Recurring - USD ($) $ in Thousands | Jan. 31, 2024 | Apr. 30, 2023 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | $ 207,069 | $ 304,167 |
Total marketable securities | 488,133 | 271,041 |
Total financial assets | 695,202 | 575,208 |
Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 204,839 | 194,261 |
Total marketable securities | 109,777 | 47,627 |
Total financial assets | 314,616 | 241,888 |
Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 2,230 | 109,906 |
Total marketable securities | 378,356 | 223,414 |
Total financial assets | 380,586 | 333,320 |
Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Total marketable securities | 0 | 0 |
Total financial assets | 0 | 0 |
Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 189,846 | 194,261 |
Total marketable securities | 33,177 | 31,645 |
Money market funds | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 189,846 | 194,261 |
Total marketable securities | 0 | 0 |
Money market funds | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Total marketable securities | 33,177 | 31,645 |
Money market funds | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Total marketable securities | 0 | 0 |
U.S. treasury securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 14,993 | |
Total marketable securities | 109,777 | 47,627 |
U.S. treasury securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 14,993 | |
Total marketable securities | 109,777 | 47,627 |
U.S. treasury securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | |
Total marketable securities | 0 | 0 |
U.S. treasury securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | |
Total marketable securities | 0 | 0 |
International treasuries | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 7,188 | |
International treasuries | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | |
International treasuries | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 7,188 | |
International treasuries | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | |
Certificates of deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 2,230 | 21,750 |
Certificates of deposit | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Certificates of deposit | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 2,230 | 21,750 |
Certificates of deposit | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Municipal securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 25,894 | |
Municipal securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | |
Municipal securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 25,894 | |
Municipal securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | |
Commercial paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 60,750 |
Total marketable securities | 38,757 | 33,735 |
Commercial paper | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 0 |
Total marketable securities | 0 | 0 |
Commercial paper | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 60,750 |
Total marketable securities | 38,757 | 33,735 |
Commercial paper | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 0 |
Total marketable securities | 0 | 0 |
Corporate debt securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 232,030 | 118,228 |
Corporate debt securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | 0 |
Corporate debt securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 232,030 | 118,228 |
Corporate debt securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Total marketable securities | 0 | 0 |
U.S. agency bonds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 27,406 |
Total marketable securities | 41,310 | 39,806 |
U.S. agency bonds | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 0 |
Total marketable securities | 0 | 0 |
U.S. agency bonds | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 27,406 |
Total marketable securities | 41,310 | 39,806 |
U.S. agency bonds | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 0 |
Total marketable securities | $ 0 | $ 0 |