   {
     'rooms':[ {'name': 'room1',
                'members': ['user1', 'user2']
-  	      },
-  	      {'name': 'room2',
+              },
+              {'name': 'room2',
                'members': ['user1', 'user2', 'user3']
               }
               ...

					ids = []
					endCount = @bodyParams.users.length - 1
					for incoming, i in @bodyParams.users
					 	ids[i] = {uid: Meteor.call 'registerUser', incoming}
					 	Meteor.runAsUser ids[i].uid, () =>
					 		Meteor.call 'setUsername', incoming.name
					 		Meteor.call 'joinDefaultChannels'

					status: 'success', ids: ids
				catch e

		status: 'success'   # need to handle error


###
@api {get} /rooms/:id/messages?skip=:skip&limit=:limit Get messages in a room.
@apiParam {Number} id         Room ID
@apiParam {Number} [skip=0]   Number of results to skip at the beginning
@apiParam {Number} [limit=50] Maximum number of results to return
###
Api.addRoute 'rooms/:id/messages', authRequired: true,
	get: ->
		try
			rid = @urlParams.id
			# `variable | 0` means converting to int
			skip = @queryParams.skip | 0 or 0
			limit = @queryParams.limit | 0 or 50
			limit = 50 if limit > 50
			if Meteor.call('canAccessRoom', rid, this.userId)
				msgs = RocketChat.models.Messages.findVisibleByRoomId(rid,
					sort:
						ts: -1
					skip: skip
					limit: limit
				).fetch()
				status: 'success', messages: msgs
			else
				statusCode: 403   # forbidden
