         if err?
             next err
         else
-            res.status(200).send success: true
+            res.status(200).send success: true, shareID: share.shareID
 
 
 # Send a sharing revocation for each target defined in the share object

        db.merge doc._id, doc, (err, result) ->
            return next err if err?

            # Add the shareID for each shared document
            addShareIDDocs doc.rules, doc._id, (err) ->
                return next err if err?

                # Params structure for the replication
                share =
                    target : target
                    doc    : doc

                req.share = share
                next()


# Replicate documents to the target url

            next err
        else
            share.shareID = res._id

            # Add the shareID for each shared document
            addShareIDDocs share.rules, share.shareID, (err) ->
                return next err if err?

                req.share = share
                next()


# Delete an existing sharing, on the sharer side
