Period and sex

Is it okay to have sex while you're on your period ? My boyfriend asked me today to have sex while I was on my period and I told him no because it's not safe. But I don't even really know if it's safe or not...