Income taxes - Unrecognized Tax Benefits (Details) - USD ($) $ in Thousands |
12 Months Ended | |||
|---|---|---|---|---|
Jan. 31, 2020 |
Jan. 31, 2019 |
Jan. 31, 2020 |
Jan. 31, 2019 |
|
| Reconciliation of Unrecognized Tax Benefits, Excluding Amounts Pertaining to Examined Tax Returns [Roll Forward] | ||||
| Gross unrecognized tax benefits at beginning of year | $ 1,693 | $ 889 | ||
| Increases as a result of tax positions taken during a prior period | 6,888 | 0 | ||
| Decreases as a result of tax positions taken during a prior period | (1) | (1) | ||
| Increases as a result of tax positions taken during the current period | 790 | 805 | ||
| Decreases as a result of tax positions taken during the current period | 0 | 0 | ||
| Decreases resulting from the lapse of the applicable statute of limitations | 0 | 0 | ||
| Gross unrecognized tax benefits at end of year | 9,370 | 1,693 | ||
| Total gross unrecognized tax benefits | $ 9,370 | $ 889 | $ 9,370 | $ 1,693 |
| Amounts netted against related deferred tax assets | (8,914) | (1,693) | ||
| Unrecognized tax benefits recorded on the consolidated balance sheet | $ 456 | $ 0 | ||