How to implement action web service interacting with a bookmarklet

Is REST is a must for the application?

Anyone has experience developing web service like this?

Any hint and suggestion is appreciated.