How long do you have to be on the pill till you have unprotected sex?

Iv been on the pill for about 2weeks or more now and yesterday I had unprotected sex with my boyfriend. He did pull out but I'm just worried with like pre cum and if it was to early to have unprotected