19 weeks and cramp in stomach after sex

I had sex today and right after I noticed I had a slight stomach cramp I guess we did it to hard? it is 100% safe to have sex while pregnant right???