Is it okay to have sex when on period

Me and my bf had sec when I'm on my period is that okay