This is an example of an API implementation that could be used in WordPress