Fair Value Measurements - Assets Measured at Fair Value on a Recurring Basis (Details) - USD ($) $ in Thousands | Oct. 31, 2022 | Apr. 30, 2022 |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | $ 820,866 | $ 914,840 |
Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 160,068 | 107,726 |
Certificates of deposit | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 3,000 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 90,481 | 97,205 |
U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,326 | 12,763 |
U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 23,836 | 13,890 |
Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 79,664 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 184,185 | 241,132 |
Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 270,306 | 287,729 |
Fair Value, Recurring | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 820,866 | 914,840 |
Fair Value, Recurring | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 160,068 | 107,726 |
Fair Value, Recurring | Certificates of deposit | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 3,000 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 90,481 | 97,205 |
Fair Value, Recurring | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,326 | 12,763 |
Fair Value, Recurring | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 23,836 | 13,890 |
Fair Value, Recurring | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 79,664 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 184,185 | 241,132 |
Fair Value, Recurring | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 270,306 | 287,729 |
Fair Value, Recurring | Level 1 | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 160,068 | 107,726 |
Fair Value, Recurring | Level 1 | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 160,068 | 107,726 |
Fair Value, Recurring | Level 1 | Certificates of deposit | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 1 | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | | 0 |
Fair Value, Recurring | Level 1 | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 1 | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 1 | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 2 | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 660,798 | 807,114 |
Fair Value, Recurring | Level 2 | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Fair Value, Recurring | Level 2 | Certificates of deposit | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 3,000 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 90,481 | 97,205 |
Fair Value, Recurring | Level 2 | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,326 | 12,763 |
Fair Value, Recurring | Level 2 | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 23,836 | 13,890 |
Fair Value, Recurring | Level 2 | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 79,664 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 184,185 | 241,132 |
Fair Value, Recurring | Level 2 | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 270,306 | 287,729 |
Fair Value, Recurring | Level 3 | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 0 | 0 |
Fair Value, Recurring | Level 3 | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Fair Value, Recurring | Level 3 | Certificates of deposit | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 3 | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 3 | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 3 | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 0 | 0 |
Fair Value, Recurring | Level 3 | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 0 | 0 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | $ 0 | $ 0 |