Fair Value Measurements - Schedule of Assets are Measured at Fair Value on Recurring Basis (Details) - Recurring - USD ($) $ in Thousands | Oct. 31, 2023 | Apr. 30, 2023 |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | $ 308,136 | $ 304,167 |
Marketable Securities, Fair Value Disclosure | 376,674 | 271,041 |
Assets, Fair Value Disclosure | 684,810 | 575,208 |
Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 299,934 | 194,261 |
Marketable Securities, Fair Value Disclosure | 68,919 | 47,627 |
Assets, Fair Value Disclosure | 368,853 | 241,888 |
Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 8,202 | 109,906 |
Marketable Securities, Fair Value Disclosure | 307,755 | 223,414 |
Assets, Fair Value Disclosure | 315,957 | 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 | 299,934 | 194,261 |
Marketable Securities, Fair Value Disclosure | 53,092 | 31,645 |
Money market funds | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | 299,934 | 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 | 53,092 | 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 | 8,202 | 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 | 8,202 | 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 | | 60,750 |
Marketable Securities, Fair Value Disclosure | 30,044 | 33,735 |
Commercial Paper | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Financial assets | | 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 | | 60,750 |
Marketable Securities, Fair Value Disclosure | 30,044 | 33,735 |
Commercial Paper | 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 |
Corporate Debt Securities | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 178,297 | 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 | 178,297 | 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] | | |
Marketable Securities, Fair Value Disclosure | 68,919 | 47,627 |
US Treasury Bond Securities | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 68,919 | 47,627 |
US Treasury Bond Securities | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
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] | | |
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 | | 27,406 |
Marketable Securities, Fair Value Disclosure | 43,827 | 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 |
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 | | 27,406 |
Marketable Securities, Fair Value Disclosure | 43,827 | 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 |
Marketable Securities, Fair Value Disclosure | 0 | $ 0 |
Municipal Notes | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 2,495 | |
Municipal Notes | Level 1 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 0 | |
Municipal Notes | Level 2 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | 2,495 | |
Municipal Notes | Level 3 | | |
Fair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items] | | |
Marketable Securities, Fair Value Disclosure | $ 0 | |