As always with questions like this, the best advice is to ask your doctor.
A couple of years ago, a woman gave birth several hours after completing the Chicago Marathon. She completed it at a 15 minutes pace, essentially a very brisk walk. But ... she was a runner before her pregnancy. She had run several marathons and cleared it with her doctor first. Her advice was that she should continue her normal activity for as long as she was comfortable.
But (1) she checked with her doctor and (2) she was already an accomplished marathoner.
And seriously, it is always a good idea to check with your doctor even if you weren't pregnant.
Start by doing what is necessary, then do what is possible and suddenly you will be doing the impossible -- St Francis of Assisi
Rock 'n' Roll Dublin Half Marathon, Dublin, Ireland, 8/5/2013 ie.competitor.com/dublin/