How to create an api for contact us page

how to create an api for contact us page