Updated the API to take 2 params for attach: doc key + attach key
Docs