Marginal structural models (MSMs) allow estimating the causal effect of a time‐varying exposure on an outcome in the presence of time‐dependent confounding. The parameters of MSMs can be estimated utilizing an inverse probability of treatment weight estimator under certain assumptions. One of these assumptions is that the proposed causal model relating the outcome to exposure history is correctly specified. However, in practice, the true model is unknown. We propose a test that employs the observed data to attempt validating the assumption that the model is correctly specified. The performance of the proposed test is investigated with a simulation study. We illustrate our approach by estimating the effect of repeated exposure to psychosocial stressors at work on ambulatory blood pressure in a large cohort of white‐collar workers in Québec City, Canada. Code examples in SAS and R are provided to facilitate the implementation of the test.