can you have sex with UTI if you are on antibiotics?

can I have sex if I have a UTI and I just started my antibiotics?