Can whatsapp be accessed by websites? I was wondering if it were possible for websites to send messages through my whatsapp without my permission, even if I mistakely clicked on an advert?

I read about whatsapp's API but it does not say much about this?

Any wisdom on this?
No.

There seems to be no possible way for any website to do this without having your WhatsApp "security token". 

What can a website do?

There is something called WhatsApp URL which lets websites build a custom link that upon pressing will redirect you to WhatsApp so you can share their content to any contact you select manually.

(See more on WhatsApp FAQ).