It's best to purchase travel insurance before your trip begins. However, some companies may allow you to buy it after departure, but the coverage might be limited.