 			return RocketChat.API.v1.failure e.name + ': ' + e.message
 		
 		
-### Create outgoing webhooks,
-user must also have manage-integrations role
-creating a push point for messages to be push to from Rocket Chat.
+### Create outgoing webhook
+User must have manage-integrations role
 ###		
 RocketChat.API.v1.addRoute 'integrations.outgoingWebhook.create', authRequired: true,
 	post: ->
 	
 		if RocketChat.authz.hasPermission(@userId, 'manage-integrations') is false
 			return RocketChat.API.v1.unauthorized()
-		console.log 'Web integration data: ', @bodyParams
 					
 		try
 			check @bodyParams,				

			body: [ name:@bodyParams.name]
				
				
### Retrieve integrations
requires manage-integrations role 
**Note make sure you encode all channel/private rooms  because they start with '#' === '%23' 
Example string ('http://your url here : 3000/api/v1/roomIntegrations.id/%23testRoom/list',headers={'X-User-Id':'user_token','X-Auth-Token':'user_token'})
###
RocketChat.API.v1.addRoute 'roomIntgrations.id/:channel/list', authRequired: true,
	get: ->
		
		if RocketChat.authz.hasPermission(@userId, 'manage-integrations') is false
			return RocketChat.API.v1.unauthorized()
		try	
			this.reaponse.setTimeout(1000)			
			id = RocketChat.models.Integrations.find({"channel":decodeURIComponent(@urlParams.channel)}).fetch()
			return RocketChat.API.v1.success
				body: [ status: 'success', Integrations: id]
		catch e 
			return RocketChat.API.v1.failure e.name + ': ' + e.message
		

			return RocketChat.API.v1.failure e.name + ': ' + e.message
		

### Remove outgoing webhook
Delete an integration, user must also have manage-integrations permissions
###			
RocketChat.API.v1.addRoute 'integrations.outgoingWebhook.delete', authRequired: true,
	post: ->
	
		if RocketChat.authz.hasPermission(@userId, 'manage-integrations') is false
			return RocketChat.API.v1.unauthorized()
				
		try

			check @bodyParams,
				integrationId: String

			this.response.setTimeout(1000)
			
			Meteor.runAsUser this.userId, () =>
				Meteor.call 'deleteOutgoingIntegration', @bodyParams.integrationId
			return RocketChat.API.v1.success
				body: [integration: @bodyParams.integrationId]
		
		catch e
			return RocketChat.API.v1.failure  @bodyParams.integrationId, message: e.name + ' :: ' + e.message
			
