How long undesirable revisions persist is highly variable and depends on the language project, its editor community and its guidelines. If you are using the Realtime API, when community editors handle vandalized content it will update you with the new page content automatically in a new revision event. If you are not using the Realtime API, you can query a specific page using the On-demand API to get the most up-to-date version of the page and replace it..
Wikimedia Enterprise provides you with several indictors for assessing the risk of vandalism or otherwise inaccurate information in Wikimedia project data. You can read more about how to implement anti-vandalism measures in your consumption of the Wikimedia Entrprise APIs in this document on anti-vandalism.