code: function getReply(req, res) {
  	// Get data from the JSON post.
  	var username = req.body.username;
  	var message  = req.body.message;
  	var vars     = req.body.vars;
  
  	// Make sure username and message are included.
  	if (typeof(username) === "undefined" || typeof(message) === "undefined") {
  		return error(res, "username and message are required keys");
  	}
  
  	// Copy any user vars from the post into RiveScript.
  	if (typeof(vars) !== "undefined") {
  		for (var key in vars) {
  			if (vars.hasOwnProperty(key)) {
  				bot.setUservar(username, key, vars[key]);
  			}
  		}
  	}
  
  	// Get a reply from the bot.
  	bot.reply(username, message, this).then(function(reply) {
  		// Get all the user's vars back out of the bot to include in the response.
  		vars = bot.getUservars(username);
  
  		// Send the JSON response.
  		res.json({
  			"status": "ok",
  			"reply": reply,
  			"vars": vars
  		});
  	}).catch(function(err) {
  		res.json({
  			"status": "error",
  			"error": err
  		});
  	});
  }
docs: POST to /reply to get a RiveScript reply.