Whitelisting of IP on http event type

I was build a REST API to post from a frontend form. To restrict the callers of this API, I wanted to know if it is possible to implement whitelisting of IP address on the http event type?