Fair Value Measurements - Schedule of Assets are Measured at Fair Value on Recurring Basis (Details) - Recurring - USD ($) $ in Thousands | Jul. 31, 2023 | Apr. 30, 2023 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | $ 252,685 | $ 304,167 |
Marketable Securities, Fair Value Disclosure | 326,528 | 271,041 |
Assets, Fair Value Disclosure | 579,213 | 575,208 |
Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 238,114 | 194,261 |
Marketable Securities, Fair Value Disclosure | 68,573 | 47,627 |
Assets, Fair Value Disclosure | 306,687 | 241,888 |
Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 14,571 | 109,906 |
Marketable Securities, Fair Value Disclosure | 257,955 | 223,414 |
Assets, Fair Value Disclosure | 272,526 | 333,320 |
Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Assets, Fair Value Disclosure | 0 | 0 |
Money market funds | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 197,298 | 194,261 |
Marketable Securities, Fair Value Disclosure | 40,347 | 31,645 |
Money market funds | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 197,298 | 194,261 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Money market funds | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 40,347 | 31,645 |
Money market funds | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Certificates of Deposit | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 6,595 | 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 | 6,595 | 21,750 |
Certificates of Deposit | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Commercial Paper | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 2,998 | 60,750 |
Marketable Securities, Fair Value Disclosure | 39,516 | 33,735 |
Commercial Paper | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Commercial Paper | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 2,998 | 60,750 |
Marketable Securities, Fair Value Disclosure | 39,516 | 33,735 |
Commercial Paper | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Corporate Debt Securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 138,471 | 118,228 |
Corporate Debt Securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
Corporate Debt Securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 138,471 | 118,228 |
Corporate Debt Securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
US Treasury Bond Securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 40,816 | |
Marketable Securities, Fair Value Disclosure | 68,573 | 47,627 |
US Treasury Bond Securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 40,816 | |
Marketable Securities, Fair Value Disclosure | 68,573 | 47,627 |
US Treasury Bond Securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
US Treasury Bond Securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
US Government Agencies Debt Securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 4,978 | 27,406 |
Marketable Securities, Fair Value Disclosure | 39,621 | 39,806 |
US Government Agencies Debt Securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | 0 | 0 |
US Government Agencies Debt Securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 4,978 | 27,406 |
Marketable Securities, Fair Value Disclosure | 39,621 | 39,806 |
US Government Agencies Debt Securities | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 0 | 0 |
Marketable Securities, Fair Value Disclosure | $ 0 | $ 0 |