Net Loss Per Share - Weighted Average Shares (Details) - USD ($)
$ / shares in Units, $ in Thousands
3 Months Ended 12 Months Ended
Dec. 31, 2018
Sep. 30, 2018
Jun. 30, 2018
Mar. 31, 2018
Dec. 31, 2017
Sep. 30, 2017
Jun. 30, 2017
Mar. 31, 2017
Dec. 31, 2018
Dec. 31, 2017
Dec. 31, 2016
Numerator:                      
Net loss                 $ (89,195) $ (43,847) $ (11,016)
Accretion of Series A redeemable convertible preferred stock to redemption value                   (656) (748)
Net loss attributable to common stockholders $ (27,183) $ (26,362) $ (21,239) $ (14,411) $ (17,517) $ (11,919) $ (9,834) $ (5,233) $ (89,195) $ (44,503) $ (11,764)
Denominator:                      
Weighted average common shares outstanding basic and diluted                 39,285,468 8,023,785 7,200,581
Net loss per share attributable to common stockholders, basic and diluted $ (0.35) $ (0.42) $ (2.43) $ (1.72) $ (2.07) $ (1.48) $ (1.25) $ (0.68) $ (2.27) $ (5.55) $ (1.63)