Sinatra API Helpers