Convertible preferred stock (Details) - USD ($)
$ / shares in Units, $ in Thousands
1 Months Ended 12 Months Ended 48 Months Ended
Feb. 28, 2015
Dec. 31, 2014
Dec. 31, 2013
Dec. 31, 2014
Dec. 31, 2015
Convertible preferred stock          
Shares authorized   141,131,524   141,131,524 0
Issuance of convertible preferred stock, net of issuance costs (in shares)   141,131,524   141,131,524 0
Shares outstanding   141,131,524   141,131,524 0
Aggregate liquidation amount   $ 207,002   $ 207,002  
Proceeds, net of issuance costs   $ 115,731 $ 49,819 $ 202,305  
Number of common stock shares converted from preferred stock 23,521,889        
Series A convertible preferred stock          
Convertible preferred stock          
Shares authorized   11,693,179   11,693,179  
Original issue price   $ 0.44   $ 0.44  
Issuance of convertible preferred stock, net of issuance costs (in shares)   11,693,179   11,693,179  
Shares outstanding   11,693,179   11,693,179  
Aggregate liquidation amount   $ 5,145   $ 5,145  
Proceeds, net of issuance costs   $ 5,109      
Series B convertible preferred stock          
Convertible preferred stock          
Shares authorized   4,181,818   4,181,818  
Original issue price   $ 0.55   $ 0.55  
Issuance of convertible preferred stock, net of issuance costs (in shares)   4,181,818   4,181,818  
Shares outstanding   4,181,818   4,181,818  
Aggregate liquidation amount   $ 2,300   $ 2,300  
Proceeds, net of issuance costs   $ 2,253      
Series C convertible preferred stock          
Convertible preferred stock          
Shares authorized   31,112,750   31,112,750  
Original issue price   $ 0.95   $ 0.95  
Issuance of convertible preferred stock, net of issuance costs (in shares)   31,112,750   31,112,750  
Shares outstanding   31,112,750   31,112,750  
Aggregate liquidation amount   $ 29,557   $ 29,557  
Proceeds, net of issuance costs   $ 29,393      
Series D convertible preferred stock          
Convertible preferred stock          
Shares authorized   8,000,000   8,000,000  
Original issue price   $ 1.25 $ 1.25 $ 1.25  
Issuance of convertible preferred stock, net of issuance costs (in shares)   8,000,000 8,000,000 8,000,000  
Shares outstanding   8,000,000   8,000,000  
Aggregate liquidation amount   $ 10,000   $ 10,000  
Proceeds, net of issuance costs   $ 9,933      
Series E convertible preferred stock          
Convertible preferred stock          
Shares authorized   26,143,777   26,143,777  
Original issue price   $ 1.53 $ 1.53 $ 1.53  
Issuance of convertible preferred stock, net of issuance costs (in shares)   26,143,777 26,143,777 26,143,777  
Shares outstanding   26,143,777   26,143,777  
Aggregate liquidation amount   $ 40,000   $ 40,000  
Proceeds, net of issuance costs   $ 39,886      
Series F convertible preferred stock          
Convertible preferred stock          
Shares authorized   60,000,000   60,000,000  
Original issue price   $ 2.00   $ 2.00  
Issuance of convertible preferred stock, net of issuance costs (in shares)   60,000,000   60,000,000  
Shares outstanding   60,000,000   60,000,000  
Aggregate liquidation amount   $ 120,000   $ 120,000  
Proceeds, net of issuance costs   $ 115,731