Hello,
You should wait till the bleeding after giving birth has stopped. Doctors suggest not to have sex before six weeks of giving birth, that is till their post-natal check up.
Please go through the link to have a detailed information in this context.
http://www.netdoctor.co.uk/healthy-living/sexual-health/a9103/sex-after-giving-birth/