             revision: revisionId
         @apiGet 'template', data, callback
 
-    saveTemplate: (template, callback, options) ->
+    saveTemplate: (template, options, callback) ->
+        # support callback function as second arg
+        if typeof options is 'function'
+            callback = options
+            options = undefined
         if options is undefined
             options = null
         data = @_getOptions options

        @apiPost 'contacts', data, callback

    # Content API Call
    pushContent: (title, url, callback, options) ->
        if options is undefined
            options = null
        data = @_getOptions options

        req.end()
        req.write url.format({query: options.query}).replace('?', ''), 'utf8' if method is 'POST'

    _api_request: (uri, data, request_method, binary_data_params, callback) ->
        # support callback function as fourth arg
        if typeof binary_data_params is 'function'
            callback = binary_data_params
            binary_data_params = undefined
        if binary_data_params is undefined
            binary_data_params = []
        return @_http_request uri, data, request_method, callback, binary_data_params
