       callback err, data.id
 
   save: (content, metadata, callback) ->
-    content = @_wrapContent content.getContent(), metadata.sharedContentSecretKey
+    content = @_wrapContent content.getContent(), metadata
 
     withCredentials = true
     isSharing = metadata.sharedContentSecretKey?

        {withCredentials}
      success: (data) ->
        if @options.patch then @previouslySavedContent = data
        callback null, new CloudContent data.content or data
      error: ->
        message = if metadata.sharedContentId


  # The document server requires the content to be JSON, and it must have
  # certain pre-defined keys in order to be listed when we query the list
  _wrapContent: (content, metadata) ->
    if isString content
      try
        content = JSON.parse content
      catch
    docName = metadata.name or ""
    JSON.stringify
      appName: @options.appName
      appVersion: @options.appVersion
      appBuildNum: @options.appBuildNum
      docName: docName
      content: content
      _permissions: if metadata.sharedContentSecretKey then 1 else 0

  _createDiff: (json1, json2) ->
    try
