Adds API for the commands endpoint.