Fair Value Measurements - Assets Measured at Fair Value on a Recurring Basis (Details) - USD ($) $ in Thousands | Jan. 31, 2023 | Apr. 30, 2022 |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | $ 759,465 | $ 914,840 |
Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 155,476 | 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 | 64,252 | 97,205 |
U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,442 | 12,763 |
U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 26,428 | 13,890 |
Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 121,995 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 180,413 | 241,132 |
Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 3,327 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 195,132 | 287,729 |
Fair Value, Recurring | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 759,465 | 914,840 |
Fair Value, Recurring | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 155,476 | 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 | 64,252 | 97,205 |
Fair Value, Recurring | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,442 | 12,763 |
Fair Value, Recurring | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 26,428 | 13,890 |
Fair Value, Recurring | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 121,995 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 180,413 | 241,132 |
Fair Value, Recurring | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 3,327 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 195,132 | 287,729 |
Fair Value, Recurring | Level 1 | | |
Available-for-sale marketable securities: | | |
Total cash equivalents and available-for-sale marketable securities | 155,476 | 107,726 |
Fair Value, Recurring | Level 1 | Money market funds | | |
Cash equivalents: | | |
Estimated Fair Value | 155,476 | 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 | 603,989 | 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 | 64,252 | 97,205 |
Fair Value, Recurring | Level 2 | U.S. treasury securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 12,442 | 12,763 |
Fair Value, Recurring | Level 2 | U.S. government agencies securities | | |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 26,428 | 13,890 |
Fair Value, Recurring | Level 2 | Commercial paper | | |
Cash equivalents: | | |
Estimated Fair Value | 121,995 | 142,511 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 180,413 | 241,132 |
Fair Value, Recurring | Level 2 | Corporate debt securities | | |
Cash equivalents: | | |
Estimated Fair Value | 3,327 | 8,884 |
Available-for-sale marketable securities: | | |
Available-for-sale marketable securities, fair value | 195,132 | 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 |